Score:0

After upgrading Debian Bullseye to Bookworm, problems with Wordpress and PHP

cn flag

OS: Debian Bookworm, WordPress: 6.2, PHP: 8.2

I upgraded my webserver from Debian Bullseye to Bookworm today. Everything worked - except all Wordpress sites. When visiting such a site (on my server), I first got the following error message:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Please check that the mysqli PHP extension is installed and enabled.

I knew my PHP was upgraded from v7.4 to v8.2 so I thought installing the mysql extension for 8.2 would solve the problem:

apt-get install php8.2-mysql

Some Wordpress sites now worked, others were giving this error:

There has been a critical error on this website.

So no idea where to go from here... Can anybody give me some pointers? Thanks in advance!

EDIT:

I activated debug mode on one of the non-working sites, and the debug log showed this:

[25-Jul-2023 14:07:21 UTC] PHP Fatal error:  Uncaught TypeError:
call_user_func_array(): Argument #1 ($callback) must be a valid callback,
non-static method MerlicFilterCategoryLite::filter() cannot be called
statically in /usr/sites/asite/htdocs/wp-includes/class-wp-hook.php:308

Stack trace:
#0 /usr/sites/asite/htdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
Score:2
cn flag

Apparently, the problem is caused by plug-ins which are not compatible with PHP 8.2.

To solve:

1) Disable all plugins

If you are unable to open your WP dashboard in a browser, connect to your server either using SSH or FTP. Next, go to your wp-content folder. Rename your plugins folder to plugins.old. You should now be able to load your site's dashboard in your browser again. Rename the plugins.old folder back to plugins. Your plugins are now all disabled.

2) Update all your plugins

In your WP dashboard, click Plugins in the left menu. Update any plugin that needs updating without activating it yet.

3) Enable plugins one by one

After all plugins are updated, enable them one by one, reloading the page after each plugin you enable. If you get an error message after enabling a plugin, you know that plugin is causing the problem. Move that plugin out of the plugins folder on your server. Check all plugins for problems in the same way.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.