Site black with PHP 8.1

Hi,

I need to set the php version of my server from 8.0 to 8.1.
But when I change that, the website turns black.

Is there something I need to be aware of or change in the kirby files?

Thank you in advance for any help!

What’s your Kirby version?

Not sure where to check this but my kirby/composer.json says

{
  "name": "getkirby/cms",
  "type": "kirby-cms",
  "description": "The Kirby 3 core",
  "keywords": [
    "kirby",
    "cms",
    "core"
  ],
  "homepage": "https://getkirby.com",
  "version": "3.5.7.1",
  ...

If that’s your version, then it doesn’t have support for PHP 8.1 yet, see PHP compatibility matrix here:

So you have 2 options:

  1. Do not update PHP and stick with PHP 8.0
  2. Update your Kirby installation with a Kirby version that supports at least PHP 8.1 (at least 3.6.1)

Also keep in mind that if you update your Kirby install to a version that supports PHP 8.1, you need to be aware of breaking changes, that might also break your site.

Okay! What would I need to do to update the Kirby Version?

My page now also shows
“Change the PHP version to 7.3, 7.4 or 8.0 (PHP 7.4 is recommended)” instead of black screen

Never update directly on the server without testing locally first.

If you are not experienced doing updates, you might want to get a developer to do this for you. See my comment above about breaking changes. 3.5.x to 3.6.x is an update to a major version.

1 Like

Thank you @texnixe, I will then try to upgrade to the highest version of Kirby 3.

Is there any way to see if anything is not working after upgrading or do I have to check the whole page manually? Or maybe a list of changes that happened between my version and the newest Version 3 ?

We have put together a list of all breaking changes since Kirby 3.0 here: Breaking changes | Kirby CMS

Note that if you are using any plugins, you need to check if they are compatible as well.

You would have to go through the site manually, unless you use a tool that visits all your site links.

Thank you @texnixe :slight_smile: