Every application lives in its own folder, /srv/apps/<app>, with the same few folders inside. Where a file should go depends on the platform, so pick yours below.
The folders every application has
| Folder | What it is |
|---|---|
current | The live site. This is where you work: the Files tab, SFTP and SSH open here. |
shared | Files that must survive deploys, for the platforms that deploy into new folders (Magento, Laravel, Node.js). |
releases | One folder per Git deploy, the last 5 kept for rollbacks (Magento, Laravel, Node.js). For those, current is a link to the newest one. |
logs | nginx and PHP logs of the application. |
tmp | Temporary files and PHP sessions. |
Your platform
Which platform runs your application?
Magento runs from releases: current points to the newest folder in releases, and the files that must survive a deploy live in shared with a link inside every release.
| What | Where |
|---|---|
| Code (app/code, vendor, themes) | current, or your Git repository |
| Web root | current/pub |
| Settings (database, cache, crypt key) | shared/app/etc/env.php (also reachable as current/app/etc/env.php) |
| Enabled modules | current/app/etc/config.php, part of the code |
| Product images and uploads | shared/pub/media |
| Logs and reports | shared/var/log, shared/var/report |
| Marketplace keys for composer | shared/auth.json |
| Imports and exports | shared/var/import, shared/var/export and the other var folders |
Commands
cd ~/current
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
composer require vendor/module
The Actions tab runs the same commands with a button.
Moving a store here
Put its env.php in shared/app/etc/env.php with the new database name, user and password, its media in shared/pub/media, then upload the code or deploy it from Git.
Working the classic way, in one folder
You do not have to use Git. Work inside current by SFTP and SSH as on any host: nothing replaces those files, because only a Git deploy creates a new release. env.php, pub/media and var/log inside current are links into shared, so the files land in the right place by themselves.
In the classic way, do not delete and re-upload pub/media, var/log or app/etc/env.php as a whole (that replaces the link with a plain folder or file), and do not mix it with Git deploys: a Git deploy builds the store from the repository only.
WordPress runs straight from current: one folder, as on any host. A Git deploy updates the files in place.
| What | Where |
|---|---|
| WordPress, plugins and themes | current (current/wp-content/plugins, current/wp-content/themes) |
| Web root | current |
| Settings (database, keys) | current/wp-config.php |
| Media uploads | current/wp-content/uploads |
Commands (WP-CLI is installed)
cd ~/current
wp plugin list
wp plugin update --all
wp core update
wp cache flush
wp search-replace 'https://old.example' 'https://www.example.com' --dry-run
With Git
Keep wp-config.php and wp-content/uploads out of the repository (in .gitignore). A deploy overwrites the files that are in the repository and leaves the others alone, so uploads and settings stay as they are.
PrestaShop runs straight from current: one folder, as on any host. A Git deploy updates the files in place.
| What | Where |
|---|---|
| Shop, modules and themes | current (current/modules, current/themes) |
| Web root | current |
| Settings (database) | current/app/config/parameters.php (PrestaShop 1.7 and 8) |
| Product images | current/img |
| Cache | current/var/cache |
Commands
cd ~/current
php bin/console cache:clear
php bin/console prestashop:module list
The admin folder has a random name (for example admin123abc). Keep that name when you move a shop here.
With Git
Keep app/config/parameters.php, img, var and uploaded files out of the repository. A deploy overwrites only the files that are in the repository.
Shopware 6 runs straight from current, with the web root in current/public. A Git deploy updates the files in place.
| What | Where |
|---|---|
| Shop, plugins and themes | current (current/custom/plugins) |
| Web root | current/public |
| Settings (database, app URL) | current/.env.local (or .env) |
| Media and thumbnails | current/public/media, current/public/thumbnail |
| Private files | current/files |
Commands
cd ~/current
php bin/console cache:clear
php bin/console plugin:refresh
php bin/console plugin:list
php bin/console theme:compile
With Git
Keep .env.local, public/media, public/thumbnail and files out of the repository.
Laravel runs from releases, like Magento: current points to the newest folder in releases, and .env and storage live in shared with a link inside every release.
| What | Where |
|---|---|
| Code | current, or your Git repository |
| Web root | current/public |
| Settings | shared/.env (also reachable as current/.env) |
| Uploads, logs, cache | shared/storage |
Commands
cd ~/current
php artisan migrate --force
php artisan config:cache
php artisan route:cache
php artisan queue:restart
Run php artisan storage:link once if your app serves files from storage/app/public.
Node.js applications run from releases: each Git deploy builds a new folder in releases and the app restarts on it.
| What | Where |
|---|---|
| Code | Your Git repository, deployed into releases |
| Environment variables | shared/.env, edited on the Node.js tab |
| Files your app writes | Outside the release, for example a folder in shared, or they are lost on the next deploy |
Commands
Deploys run npm ci and npm run build for you. Start, stop and logs are on the Node.js tab. Your app must listen on process.env.PORT. See Node.js applications.
A generic PHP application runs straight from current: one folder, as on any host, and current is the web root.
| What | Where |
|---|---|
| Everything (code, settings, uploads) | current |
| Web root | current (the first of index.php, index.html or index.htm) |
Commands
cd ~/current
composer install --no-dev
With Git
A deploy overwrites the files that are in the repository and leaves the others alone. Keep settings files with passwords and user uploads out of the repository.
The Files tab opens in current. Go up one level to reach shared, releases and logs. See also Folders and file ownership and Git deploys.
Did this solve it? If not, tell us what you see and we look at your server.
Open a ticket