Skip to main content

Storage

After running Files Gallery for the first time, a folder _files will get created, used to store cache, config and other optional files. The _files folder is purposely excluded and not visible from the Files Gallery view. By default, the following will get created:

_files
├── cache
│   └── folders
│   └── images
│   └── menu
├── config
│   └── config.php

However, with several optional folders for specific features, it could look like this:

_files
├── assets
├── audio
├── cache
│   └── folders
│   └── images
│   └── menu
├── config
│   └── config.php
├── css
│   └── custom.css
├── include
│   └── head.html
├── js
│   └── custom.js
├── lang
├── logo
├── plugins
│   └── files.tasks.php
├── previews
├── users
│   └── UserA
│   └── config.php
├── watermark
├── zip

Change storage path

You can change the storage path from config options storage_path by default set to _files subfolder. You won't normally need to change the storage path, but it might be useful if you want to share image resize cache with other Files Gallery installations, or if you don't want to store anything in the folder where Files Gallery exists, or if you want to move storage outside of the server's web root.

Changing storage path

If you want to change storage_path you need to create a file _filesconfig.php in the same dir as your index.php, which can be populated with any config options. You can't set storage_path directly in your main config.php file, because the path needs to be resolved before we load the config (which will be in the custom storage path).

_filesconfig.php
'storage_path' => '../path/to/custom/storage'