Since the critical PHP vulnerability PHP2Shell, many hosts are taking tough action: websites that still run on PHP 8.1, 8.0 or 7.4 are being locked or put into a maintenance mode. The reason: there are no official security updates for these versions anymore - and without an update, they remain vulnerable. Going back to the old PHP version, which used to be the quick way out, is off the table.
If you want to get your website back online, you have to switch to PHP 8.2 or newer. And that is exactly where something many website owners already know happens: instead of the home page, you see “There has been a critical error on this website.”, an error 500 or a blank white page. This post shows you step by step how to find and fix the cause. It builds on my two earlier guides on the critical error and on WordPress going down after the PHP upgrade and brings them up to date.
No time, or no FTP access at hand? I get your website back online and switch it cleanly to a current PHP version:
Why hosts are locking websites now
On October 21, 2026, the PHP team released updates against two critical security vulnerabilities - but only for the still supported versions PHP 8.2 to 8.5. How the vulnerabilities work and which versions are safe is described in PHP2Shell: Critical PHP Vulnerability and PHP2Shell: The Security Updates Are Out.
For hosts, this means: every website on PHP 8.1 or older is a gateway into the entire server. Many are therefore reacting drastically:
- Website locked or put into maintenance mode: visitors see a notice page from the host instead of your website.
- PHP version raised by force: the host switches the domain to a newer version itself - and the website goes down with an error.
- Old versions no longer patched: even paid “extended support” offers for old PHP versions do not automatically get the fix.
In all three cases, it comes down to the same thing: your website has to work with a current PHP version.
The error messages and what they mean
After a PHP switch, you will mostly come across these messages:
| Message | What is behind it |
|---|---|
| “There has been a critical error on this website.” | A PHP error (fatal error) stopped WordPress. WordPress catches it and shows this message. |
| “There has been a critical error on this website. Please check your site admin email inbox for instructions.” | The same cause - in addition, WordPress has sent an email with a link to recovery mode. |
| “The site is experiencing technical difficulties.” | The older version of the same message from earlier WordPress versions. |
| Error 500 / Internal Server Error | The server itself could not process the request - often because of a setting in the .htaccess, sometimes also because of a PHP error. |
| White page without text | A PHP error where not even the WordPress error page is shown anymore. |
The good news: in the vast majority of cases, nothing is broken. Your content is still in the database, unchanged. Somewhere in the code there is something the new PHP version no longer accepts - and that can be found.
What you need
- FTP access (or a file manager in the hosting panel): this gives you access to your website’s files. You get the login details from your host. FileZilla for Windows and Cyberduck for Mac have proven themselves.
- Access to the hosting panel: for the PHP version, the error log and a backup.
- A plain text editor: for example Notepad, Notepad++ or Visual Studio Code. Word or WordPad are not suitable because they change the files.
Step 1: recovery mode via email
Since WordPress 5.2, WordPress sends an email to the website’s administrator address when a critical error occurs, usually with the subject “Your Site is Experiencing a Technical Issue”. It states which plugin or theme triggered the error and contains a link to recovery mode.
- Check the inbox of the administrator address - including the spam folder.
- Click the link and log in with your normal credentials.
- Under Plugins, the faulty plugin is marked. Update it if an update is available, or deactivate it.
- Exit recovery mode via the notice at the top of the admin bar and check the website.
If no email arrives - which unfortunately happens often, because many websites have no working mail delivery - continue with step 2.
Step 2: read the error log
For security reasons, WordPress hides the actual error message. There are two ways to see it:
Error log in the hosting panel: In Plesk you will find it under Websites & Domains → Logs, in cPanel under Metrics → Errors. Look for entries containing PHP Fatal error at the time of the outage.
WordPress debug log: Open the file wp-config.php in the main directory of your website via FTP. Find the line define( 'WP_DEBUG', false ); and replace it with:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Upload the file again and open the website once. WordPress now writes the errors to the file wp-content/debug.log without showing them to visitors.
A typical message looks like this:
PHP Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, null given
in /wp-content/plugins/example-plugin/includes/class-handler.php on line 142
What matters most to you is the path: wp-content/plugins/example-plugin/ tells you that the plugin “example-plugin” is to blame. If it says wp-content/themes/…, it is the theme.
Step 3: deactivate a plugin or theme via FTP
You can no longer get into the WordPress backend? Then deactivate plugins and themes directly via their folders:
- Connect via FTP and open
wp-content/plugins/. - Rename the folder of the faulty plugin, for example
example-pluginto_example-plugin. WordPress then no longer finds the plugin and deactivates it. - Open the website. If it runs again, you have found the culprit.
You do not know which plugin is to blame? Rename the whole plugins folder to plugins_off. If the website runs afterwards, a plugin is the cause: rename the folder back and deactivate the plugins one by one until the error appears again.
Is it the theme? Rename the folder of the active theme under wp-content/themes/. WordPress then falls back to a default theme such as Twenty Twenty-Five - provided one is still installed.
Step 4: error 500 - check the .htaccess
An error 500 directly after the PHP switch often has a different cause than a PHP error: many older websites have settings like these in their .htaccess:
php_value memory_limit 256M
php_flag display_errors off
These lines only work as long as PHP runs as an Apache module. If the host switches to PHP-FPM at the same time as the version change - which many do - Apache no longer understands the lines and aborts with an error 500.
How to fix it: Open the .htaccess in the main directory via FTP (it is a hidden file - you may first have to show hidden files in your FTP program), save a copy and remove the lines with php_value and php_flag. Set these values in the hosting panel’s PHP settings instead.
Step 5: increase the memory limit
If the error only occurs occasionally, or the log contains a message like this one, PHP does not have enough memory:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)
Increase the limit in wp-config.php - before the line /* That's all, stop editing! */:
define( 'WP_MEMORY_LIMIT', '256M' );
Most websites manage well with 256 MB. If your host allows less, set the limit in the hosting panel’s PHP settings. A much higher demand, on the other hand, is a warning sign - for example of a faulty plugin or a compromised website.
The most common errors after the PHP switch
If you jump directly from PHP 7.4 or 8.0 to 8.3, you skip several versions at once - and each of them removed functions or made them stricter. These messages show up most often in the error log:
TypeError: null passed to string functions
Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, null given
The most common reason for the critical error. Since PHP 8, functions such as strlen(), trim() or strtolower() no longer accept null. Under PHP 7.4, null was silently treated as an empty string. Typical trigger: a plugin reads a value with get_option() or get_post_meta() that does not exist.
// Before - fatal error under PHP 8
echo strtolower( get_post_meta( $post_id, '_custom_title', true ) );
// After - works under all versions
echo strtolower( (string) get_post_meta( $post_id, '_custom_title', true ) );
Call to undefined function
Fatal error: Uncaught Error: Call to undefined function create_function()
PHP 8 has finally removed old functions, including create_function(), each() and get_magic_quotes_gpc(). Plugins and themes that still use them have not been maintained for years.
Unsupported operand types and array errors
Fatal error: Uncaught TypeError: Unsupported operand types: string + int
PHP 8 calculates more strictly: where an empty or non-numeric string used to be silently counted as 0, PHP aborts today. This often affects old price or discount calculations in shops and self-written functions in functions.php.
Deprecated messages
Deprecated: Creation of dynamic property MyPlugin::$settings is deprecated
Deprecated: MyPlugin::save(): Implicitly marking parameter $data as nullable is deprecated
“Deprecated” means: still works, but will become an error in a future PHP version. These messages do not take your website down, but they can fill the error log with thousands of entries. If WP_DEBUG_DISPLAY is not turned off, they even appear visibly on the website. They are a clear hint as to which plugin will cause problems next.
Silent errors without a message
Particularly tricky: some changes produce no error message at all. PHP 8, for example, compares strings and numbers differently (0 == "abc" is false today, under PHP 7.4 it was true). The website runs, but a form is not sent, a discount is not applied or a permission is checked incorrectly. That is why it is always worth testing the most important functions after the switch.
Detailed examples with code for all of these errors can be found in WordPress Down After PHP Upgrade from 7.4 to 8.2+.
A plugin is to blame - now what?
Once you have found the faulty plugin, there are three ways forward:
- Install an update: Most maintained plugins have long been compatible with PHP 8.3. Often the website simply runs an old version. An update solves the problem in many cases.
- Look for an alternative: If the plugin has not received an update in years, it will not get one anymore. Then a replacement is the better solution than patching the old code. Only download plugins and themes from wordpress.org or the manufacturer’s official website - “free” premium plugins from dubious sites often contain malicious code.
- Have the code adapted: For custom-developed plugins, customized themes or functions for which there is no replacement, the code has to be reworked for the new PHP version. This is usually manageable, but it needs someone who knows PHP and WordPress.
Stuck in WordPress maintenance mode?
Not to be confused with a lock by your host: if a WordPress update is interrupted - for example because a plugin crashes under the new PHP version - the website sometimes gets stuck with the message “Briefly unavailable for scheduled maintenance. Check back in a minute.” The fix: delete the file .maintenance in the website’s main directory via FTP. Then check whether the interrupted update was installed completely.
How to avoid the next outage
- Keep an eye on your PHP version: Check once a year whether your version still gets security updates. The dates are listed on php.net. Next up is PHP 8.2 - on December 31, 2026.
- Update plugins regularly and replace those without updates early on.
- Test switches on a copy first: Many hosts offer a staging environment with one click.
- Backups outside the server: A backup that only sits on the same server is of little help in an attack or a server failure.
I can help
Your website is locked or shows a critical error after the PHP switch, and this guide does not get you any further? I find the cause, get the website back online and switch it cleanly to a current PHP version. How much work that takes depends on the website - that is why I look at it first and then tell you what needs to be done.
- WordPress emergency support & repair - fast help when the website is down
- WordPress programmer in Vienna - adapting plugins, theme and custom code so everything runs on new PHP versions
- WordPress maintenance - ongoing care with updates, backups and security, so it does not get that far
- Website takeover - also for Joomla, TYPO3, Shopware and other PHP systems




