Magento application environment variables
The following table lists variables that you can override using environment variables.
|Variable name||Description||Default value|
|ADMIN_USERNAME||User name for a Magento administrative user. This user is an administrator and can create other users, including other administrative users.||admin|
|ADMIN_FIRSTNAME||Administrative user's first name.||John|
|ADMIN_LASTNAME||Administrative user's last name.||Doe|
|ADMIN_EMAIL||Administrative user's e-mail email@example.com|
|ADMIN_PASSWORD||Administrative user's password.||admin12|
|ADMIN_URL||Enter the relative URL by which to access the Magento Admin. For security reasons, we recommend you choose a value other than
|ADMIN_LOCALE||Specifies the default locale used by the Magento Admin.||en_US|
The variable supports the following values:
To execute build and deploy scripts in a specific mode, set an environment variable for APPLICATION_MODE. If you execute these scripts in
The default value,
Failure to clear static view files might result in issues if there are multiple files with the same name and you don't clear all of them.
In other words, because of static file fallback rules, if you do not clear static files and there is more than one file named
On deployment, replace Magento base URLs in the database with project URLs. This is useful for local development, where base URLs are set up for your local environment. When you deploy to a Cloud environment, we change the URLs so you can access your storefront and Magento Admin using project URLs.
You should set this variable to
For an example, see Step 1, Get started setting up an environment.
In the event something goes wrong and you can’t access your environment after it deploys, try the following:
- SSH to the environment and make sure services are running.
Restore your snapshot:
magento-cloud snapshot:list magento-cloud snapshot:restore <snapshot>