🚀 A new era: Kirby 4 Get to know
Skip to content

Installation issues

We try our best to make the installation of Kirby as effortless as possible, but with multiple server setups and PHP versions, there's unfortunately always space for problems.

Broken subpages

Your homepage is working great, but subpages won't open or lead to a server error?

  1. Make sure that the .htaccess file that ships with Kirby is present in your Kirby folder.
  2. Check if mod_rewrite is enabled on your server (Apache).
  3. Check if the .htaccess file gets loaded. You can test this by putting some nonsense characters into your .htaccess. If this triggers an "Internal Server Error", the file gets loaded. Otherwise, you need to enable AllowOverride all in your Apache configuration.
  4. Please try setting the RewriteBase in the .htaccess file:
RewriteBase /

If you run Kirby in a subfolder, make sure to set the RewriteBase according to the name of your subfolder:

RewriteBase /my-subfolder

URLs to other pages and assets don't use the correct hostname

By default, Kirby detects the base URL of the site automatically using the SERVER_NAME environment variable that is passed to PHP by your web server. If this variable is set incorrectly, Kirby will also generate incorrect URLs. If it is not set at all, Kirby will fall back to the server's IP address.

The best fix for this issue is to update the configuration of your web server and set a correct SERVER_NAME.

If you don't have access to this configuration, you can manually set the correct base URL with Kirby's url option.

Thumbs not generated, Panel not working

If you use PHP's built-in server (not recommended), you have to start it up with Kirby's router:

php -S localhost:8000 kirby/router.php

PHP "Cannot redeclare" error

If you get an error like this:

PHP Fatal error: Cannot redeclare xxx() in /path/to/kirby/config/helpers.php on line xxx

you are most likely using a library or framework together with Kirby with functions that clash with Kirby's helper function (in particular dump() or go(). These come with packages such as:

  • Symfony VarDumper (redeclares the dump() function)
  • Swoole Framework (redeclares the go() function)

To deactivate one of Kirby's helper functions globally, you need to set a specific constant in your index.php to false. The name of the corresponding constant is always KIRBY_HELPER_ + name of the helper (uppercased). For example:


define('KIRBY_HELPER_DUMP', false);

require __DIR__ . '/kirby/bootstrap.php';

echo (new Kirby)->render();

When you disable a helper function, it won't be registered anymore by Kirby. Make sure not to use the deactivated helper function in your code anymore, but rather use the corresponding class methods.

Weird PHP syntax errors

Please make sure that you use the required PHP version.

Issues with date & time handling

Check if you have set the correct timezone in your php.ini file with the date.timezone option. If you don't have access to the php.ini file, check if your hosting provider allows changing this in their web interface, otherwise contact your hosting provider.

Subpages and files not working

Check your file and folder permissions. Files should be 644, folders 755.

Broken data after saving

Your content files seem to be corrupted after you tried to save a page in the Panel? Make sure the PHP mb_string extension is installed on your server. A missing extension leads to broken data in text files.

Error 500 when trying to access Panel

Make sure that the PHP mb_string extension is installed/enabled.

More problems?

Don't hesitate to ask questions in the forum or send us an email: support@getkirby.com