Craft CMS tuning
Published
Updated
The Craft CMS software template configures Craft for production on fortrabbit. These pages cover what to change on top of it, from ENV vars to logging and mail.
Tuning topics
| Topic | Page |
|---|---|
| Database connection, multi-environment config, table prefix | ENV vars |
| Dev mode, updates, admin changes, control panel URL, Craft CLI | Production settings |
| Slow pages, queues, image transforms, caching | Performance |
| Craft and plugin updates, major upgrades | Updating |
Logging
The software template sets CRAFT_STREAM_LOG=true. Craft then writes its logs to stdout and stderr, and they show up in the logs of the environment in the dashboard. Without that ENV var, Craft writes to storage/logs/web.log. See Craft logging.
Sending mail
Send mail through a transactional mail provider. Pixel & Tonic, the makers of Craft, maintain a Postmark plugin. Also see the limits on sending mail.
Redirects and HTTPS
Craft ships a .htaccess file in the web folder. Extend it with redirects or HTTP headers, see the .htaccess articles.
Licensing
A Craft CMS license is tied to one domain. When the site moves from the default domain of the environment to its own domain, change the license domain in the Craft Console.
Storage folder
Plugins and crawlers can fill the storage folder: a faceted search plugin that caches a template fragment for every filter combination a bot requests, or a plugin with verbose logs. Check the size of the folder in the storage metrics, and configure the plugin or block the crawler.