Question

Is PHP8 now recommended for Wordpress 5? (CentOS)

Just checking from fellow CentOS and Wordpress users. Last time, a year ago, I tried upgrading PHP 7.4 to 8.0 it gave massive issues with WP. Is this now a safe option? My CentOS is 8.5.11.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello there,

I would also like to join the discussion. In the first place, you should always check the official supported PHP versions of WordPress when you’re in the process of upgrading the server’s PHP version/s. I believe that Rexford already provided the link with the requirements, but I’ll post it as well just as a reference:

https://wordpress.org/about/requirements/

Another thing to bring is what Bobby already mentioned - CentOS Linux 8 has reached End Of Life (EOL) on December 31st, 2021. You need to plan a migration to another distro or upgrade the server to CentOS stream.

Also when you perform a PHP upgrade your site is likely to experience some issues due to the fact you also have third-party themes and plugins installed which might not work well or at all with the new PHP version in place. You can double check if every plugin and the theme in use support the PHP version and also take a backup of your files and database before you upgrade the PHP version.

Updating your WordPress core installation and all third-party tools (themes, plugins) is also recommended in another to have a smooth transition during version updates and PHP version upgrade as well.

Hope that this helps! Regards, Alex

Hello,

In addition to what has already been mentioned, I wanted to point out that CentOS Linux 8 has reached End Of Life (EOL) on December 31st, 2021.

I would strongly recommend planning either migration to another OS like Debian or Ubuntu, or upgrading to CentOS Stream.

Best,

Bobby

These are the recommended combinations of versions for WordPress: https://wordpress.org/about/requirements/

Were your massive issues related primarily to WordPress, or the third-party plugins/themes you might have been using which were not updated to support PHP 8?

Hi @Nearly Normal,

I’ve looked around and it seems like the currently supported PHP versions for WordPress are:

PHP Version 7.4 (Security Support, ends on 28/11/2022)
PHP Version 8.0 (Active Support, ends on 26/11/2022)
PHP Version 8.1 (Active Support, ends on 25/11/2023)

This means it should be safe to upgrade your PHP version to 8. Having said that, if you think there might be issues, I’ll recommend creating a snapshot of your Droplet prior to upgrading the PHP version.