Tune Kirby
Published
Updated
Set up the Kirby panel on the server, keep its accounts across deployments, turn on page caching, and send e-mail through SMTP or a mail provider, as fortrabbit has no sendmail.
Working with the panel
Editors manage content in the browser with the Kirby panel. Its users live in site/accounts, which Kirby keeps out of Git, so local users do not reach fortrabbit. Create the users on the server, and add /site/accounts and /site/sessions as exclude patterns, or each Git deployment deletes them, see Git and rsync.
Setup panel
Kirby blocks the panel installation on public servers, see create your first account. To create the first user on fortrabbit, enable the panel.install option for that step, then turn it off again.
Updating Kirby
Update locally first: run composer update in the project folder, test, then commit composer.lock and git push.
Kirby 6 beta
Kirby 6 is in beta, and Kirby advises against using it in production yet. It needs PHP 8.3 or newer, so raise the PHP version of the environment first.
Set the constraint of getkirby/cms in composer.json to ^6.0@beta, run composer update locally, test, then deploy. Every Panel user has to log in once more after the update, see the Kirby 6 migration guide.
Caching
Turn on the page cache of Kirby in the config file. The template empties it after each deployment.
// /site/config/config.php
return [
'cache' => [
'pages' => [
'active' => true,
]
]
];
Create the file if it does not exist. See the Kirby cache docs.
Thumbs
Kirby creates a thumb on the first view of its URL, in a PHP process of the site. A page with many new images triggers many thumbs at once.
Kirby has no official way to create thumbs in a background worker yet. The Kirby Queues plugin adds a queue and a worker to Kirby 5; the thumb jobs need own code on top. We have not tested it. Until then, keep sizes few and uploads small, see image transforms.
Sending mails
fortrabbit has no sendmail. Configure the email transport of Kirby for SMTP, with a mail account or a transactional mail provider.