Magento reference

File layout, command-line reference and cron for Magento 2 / Adobe Commerce on TurboStack.

Reference for running Magento 2 (Adobe Commerce) on TurboStack: where the files live, the command-line tool, and the scheduled jobs. For setup see Deploy Magento; for tuning see Magento best practices.

File layout

Everything lives under your system user's home directory. ~ is that home directory (for example /var/www/prod/). Run every bin/magento command from ~/public_html.

Path What it is
~/public_html/ Magento project root; run the command-line tool from here
~/public_html/pub/ Web document root (the served files)
~/public_html/bin/magento The Magento command-line tool
~/public_html/app/ Core modules, configuration (app/etc) and custom themes
~/public_html/vendor/ Composer dependencies
~/public_html/var/ Cache, generated code, sessions and logs
~/nginx/ Custom Nginx configuration
~/.config/systemd/user/magento-consumer@.service Message-queue consumer service

For ownership and permissions, see Application file layout and permissions.

Command-line reference

Magento ships a command-line interface (CLI) at bin/magento. Run php bin/magento list for the full list; the common commands are below.

Command What it does
setup:upgrade Apply database schema and data changes from modules
setup:di:compile Compile dependency injection code
setup:static-content:deploy Generate static view files for the storefront
deploy:mode:set {developer\|production} Set the deployment mode (deploy:mode:show reads it)
cache:clean / cache:flush Clear enabled cache types / flush all cache backends
cache:status / cache:enable / cache:disable Show or change which cache types are active
indexer:reindex Rebuild indexers (for example catalog and search data)
indexer:status / indexer:reset / indexer:set-mode Inspect, reset or switch schedule/realtime indexer mode
config:set <path> <value> / config:show <path> Set or read a store configuration value
maintenance:enable / maintenance:disable / maintenance:status Control maintenance mode
module:status / module:enable / module:disable List, enable or disable a module
admin:user:create / admin:user:unlock <user> Create an admin user or unlock a locked one
cron:run / cron:install Run due cron jobs now / install the cron entries
queue:consumers:list / queue:consumers:start <name> List message-queue consumers or start one

Full-page cache debugging

Magento's built-in full-page cache adds an X-Magento-Cache-Debug response header: HIT means the page was served from cache, MISS means it was rendered fresh. The header appears only in developer mode (bin/magento deploy:mode:set developer) and is suppressed in production. Check it over SSH:

curl -sI https://example.com/ | grep -i x-magento-cache

With Varnish in front, use the Varnish cache headers instead.

Cron and message-queue consumers

TurboStack installs the Magento cron entries for your system user automatically (bin/magento cron:run, setup:cron:run and the updater). These drive indexing, emails and scheduled jobs. Do not disable cron on a live store.

On a busy store, run each message-queue consumer as a persistent user system service so it restarts on failure, rather than relying on cron alone. The Magento consumer template unit and the exact systemctl --user commands are in Magento best practices.