Craft CMS troubleshooting
Published
Updated
Resolve common Craft CMS errors on fortrabbit, including database configuration, security key mismatches, and upload issues.
Errors after the first deployment
- Mismatching security key: the software template generates a random
CRAFT_SECURITY_KEY. Data encrypted locally can't be read with it. Copy the local key into the ENV vars of the environment when importing the local database. - No database connection: Craft on fortrabbit reads the database settings from the ENV vars of the environment, never from the local
.envfile. Check theCRAFT_DB_*values against the template. - Missing table prefix: a local table prefix needs the same
CRAFT_DB_TABLE_PREFIXon fortrabbit. - Missing .htaccess file: SFTP clients often hide dot files. Upload
web/.htaccesswith the rest of the project.
Show error details
On fortrabbit, Craft shows a generic error page instead of the exception. Read the error in the logs of the environment, or set CRAFT_DEV_MODE=true on an environment that is not public and back to false afterwards, see production settings.
Large uploads fail
The smallest of three limits caps the upload size, Craft's maxUploadFileSize setting or the PHP settings upload_max_filesize and post_max_size. Change the PHP ones in the PHP settings of the environment. A large image can also run out of memory while Craft creates its transforms.