Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Storage layout

What an Exponential installation keeps on disk, which directories must be writable, which hold customer data and which can be thrown away, and how a multi-site installation spreads logs and caches.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/hosting/operations/storage-layout.md

On this page

Storage layout

This page is for system administrators who size disks, write backup jobs and set file permissions for hosted Exponential sites. It answers: what is in the installation directory, where uploaded files, caches and logs go, which of them are customer data that must be backed up, which can be regenerated, and which settings move them.

Every path and setting below is from settings/site.ini [FileSettings] and the installation book; follow the links to check them.

Contents

  1. The installation directory at a glance
  2. The var directory
  3. The settings that place files
  4. What must be writable
  5. Several sites in one installation
  6. What to watch
  7. Checklist

The installation directory at a glance

PathWhat it isWritable by PHPBack up
index.php, index_rest.php, index_treemenu.phpthe front controllersnocomes with the code
index_soap.php, soap.phpthe SOAP server, and its former name, which only forwards to it (6.0.15)nocomes with the code
kernel/, lib/, bin/, share/, update/the kernel, libraries, scripts, translations, database updatesnocomes with the code
vendor/the Composer packagesno (Composer writes it)rebuilt by Composer from composer.lock
extension/extensions, from Composer or written by handonly while packages are installed from the administrationyes, when not in a repository
design/designsonly while packages are installed from the administrationyes, when not in a repository
settings/shipped settings (settings/*.ini)yes, when administrators edit settings in the browsersettings/override/ and settings/siteaccess/ always
var/everything the running site writesyespartly, see below
config.php, config.env.phpPHP-level configuration, the environment namenoyes, when present

config.env.php names the environment of a machine (EXP_ENV), and .gitignore keeps it out of version control (Settings per environment).

The var directory

var/ is the one tree the running site writes. Its layout, with the shipped settings:

PathHoldsCustomer data?
var/storage/ and var/<site>/storage/uploaded images and files and their image variations (original/, reference/, variations/)yes
var/storage/sqlite3/the database file of a SQLite site, with its -wal and -shm filesyes (back it up with the database tool, never by copying)
var/cache/, var/<site>/cache/compiled templates, INI cache, view cache, template blocks, translations, packed scripts and stylesno: regenerated
var/<site>/cache/exphttpcache/the HTTP cacheno: regenerated
var/log/, var/<site>/log/the kernel's logsoperational, optional in a backup
var/<site>/log/audit/the audit trail (audit.ini [AuditSettings] LogDir=log/audit, inside the var directory)yes: a record you may have to produce
var/autoload/generated class mapsno: php bin/php/ezpgenerateautoloads.php -e
var/vc/Exponential Velocity: logs, pid files, its own configuration when /etc/vc is not usedno, except a configuration kept here
var/log/mail/mails written by the file transportno
var/<site>/cronjobs/output and history of jobs started from Setup > Cronjobsno
var/maintenance.jsonpresent only while maintenance mode is onno
var/tmp/temporary work, for example the HTTP cache moved aside by maintenance modeno

<site> stands for the site's var directory when its siteaccesses set VarDir=var/<site>; many installations keep everything in var/ alone. The cronjob paths follow the var directory of the administration siteaccess (Cronjobs, section 14); the Velocity tree is described in 8.3.12 Logs.

Files under storage/ are spread over subdirectories by the first characters of their name ([FileSettings] DirDepth=3), so no single directory grows too large.

Note

Caches can be deleted at any time; the site rebuilds them on the next requests, at the cost of slower first pages. php bin/php/ezcache.php --clear-all is the supported way, because it also handles the expiry timestamps (Caches).

The settings that place files

All in site.ini [FileSettings]; set them in settings/override/site.ini.append.php or per siteaccess.

SettingShippedMeaning
VarDirvarthe root of everything written; only relative paths are supported
StorageDirstorageuploaded files, below VarDir
CacheDircachecaches, below VarDir; an absolute path is "not supported" (its public caches would not be served)
LogDirloglogs, below VarDir; an absolute path is supported
TemporaryDir/tmp/temporary files of uploads and conversions
DirDepth3directory depth in the storage
StorageDirPermissions, StorageFilePermissions0777, 0666modes of new storage directories and files
TemporaryPermissions0777mode of temporary files
LogFilePermissions0666mode of new log files

The shipped modes are world-writable. site.ini itself recommends 0770 and 0660 with the right owner and group, which is the hardened choice (8.7.2 One user, or one group).

Warning

TemporaryDir=/tmp/ lies outside the installation. Under an open_basedir restriction (common on shared hosting panels) either allow /tmp/ or point TemporaryDir at a directory inside the installation that PHP may write.

What must be writable

The setup wizard checks the list in settings/setup.ini [directory_permissions] CheckList: design, extension, settings with settings/override and settings/siteaccess, and var with its cache, log, storage and autoload directories. After installation, design/ and extension/ can be made read-only again when nothing installs packages from the administration (8.7.1).

The most common cause of odd failures is two system users writing the same files: the PHP-FPM pool, Velocity's workers, cronjobs and command-line scripts. Run all of them as the site's user, or give them a common group with setgid directories (8.7.2). The details for a hosting platform are on Writable directories and permissions.

Several sites in one installation

An installation can serve many sites, each with its own VarDir. Six settings in [FileSettings] decide where their logs and caches go (Logs, INI cache and expiry timestamps per site):

SettingShippedEffect
UseGlobalLogDirenableddisabled writes each site's debug logs into its own log directory
LogVarDiremptya separate tree for all logs: var/example logs to var_log/example/log
CacheVarDiremptya separate tree for all caches: var_cache/example/cache, for example one memory file system
ExpiryDiremptykeeps expiry.php out of a cache directory that is emptied at a restart
INICacheDirglobalsite caches each site's INI files in its own cache directory
AllowedDeletionDirs[]emptyextra absolute directories a cache clear may delete in

The feature page shows a complete example with a tmpfs cache for all sites. A cache in memory is fast and is lost at every reboot; keep ExpiryDir on disk so image variations made before a clear are not taken as current again.

What to watch

  • Disk growth: storage grows with the customer's uploads; caches grow with traffic and templates; logs are rotated (see Log viewer and rotation). ./console exp:systeminfo --sizes and Setup > System information > Measure sizes report the size of var/ and of each cache directory (System information).
  • Inodes: the view cache and image variations are many small files; watch inode use on the file system that holds var/ as well as bytes.
  • Owners: after any command run as root, check the owner of new files in var/.

Checklist

  • To do: var/ is on a file system with room for caches, logs and a local backup.
  • To do: The PHP-FPM pool, Velocity workers and cronjobs run as one user, or share a group with setgid directories.
  • To do: StorageDirPermissions and StorageFilePermissions are set to 0770 and 0660 where the owner allows it.
  • To do: TemporaryDir is reachable under the account's open_basedir.
  • To do: Backups include var/storage, the per-site storage, the audit directory and the settings overrides.
  • To do: Caches, var/autoload and var/vc logs are excluded from backups to save space.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x