I have a couple of WordPress sites on my Virtualmin server that are all using PHP-FCGId. I switched a few of them to PHP-FPM earlier today and now all those sites using PHP-FPM shows a blank page when opened.
The WordPress dashboard works fine on all of them however.
(I have tried switching them back to FCGI but that didn’t fix the blank page issue.)
Check your error log for clues as to what is going on… If no errors produce, make sure to enable “debugging” in WordPress so that it’s a bit more verbose.
What could be causing this because I have switched from PHP-CFGI to PHP-FPM for another site on another server a few months back and this problem didn’t occur.
Could it be related to the PHP version since I was using PHP 7 back then and using PHP 8 now?
Yes, it could be related to PHP 8 as this is a major release which comes with lots of changes. While as I understand it WordPress itself is compatible with PHP 8, it’s quite possible that a plugin or theme you are using is not.
Never, ever, ever, ever, ever use the latest version of anything on Wordpress for at least 6 months after it comes out.
Here’s how the flow typically works:
PHP 8 is released
Wordpress works on compatibility for about two weeks
By the end of month 1, Wordpress is compatible
Wordpress sends notices to developers that they need to provide function for PHP8
Depending on your developer, you may get it in a year. Maybe not at all, especially depending on the template you’re using.
So never, ever, ever, ever, ever upgrade to the latest PHP version on Wordpress. Or anything else for that matter until at least 6 months after it’s released.
At the very least, before upgrading make sure that any plugins, templates and the core being used is compatible. If not, reach out to see when or if it will ever be compatible. Sometimes a good developer just needs a nudge from its users to motivate them to start working out any quirks or at least confirm their code will continue working with the new version.
But yeah, as @Gomez_Adams has stated, 6 to 12 months after a new “major” release is made of most software is a good time frame for waiting for the developers to catch up. Sometimes the changes are massive so it might take a while, and sometimes the new software version might itself change a bit so developers delay their interest in making compatible until things have stabilized.
If it’s been over 6 - 12 months since the major software has been released and the developers of plugins and/or templates still haven’t moved on making necessary adjustments, you’ve nudged them and they haven’t really taken interest… Then it may be time to make the difficult decision to find an alternate plugin/theme to meet your needs.
I typically recommend you keep an eye on plugins/themes developed by third parties to ensure they remain actively developed. A plugin for instance that has had NO activity for more than 6 months may actually be dead and should be removed from your install to prevent issues; security or otherwise.