You switch your hosting account from PHP 7.4 or PHP 8.0 to PHP 8.1, PHP 8.2 or PHP 8.3, or your host upgrades PHP for you. Instead of your shop, the browser shows a plain white box with a short error message saying the website has hit a problem.
On the WooCommerce checkout page, customers either see that same message or a spinner that never finishes because the underlying AJAX request to /?wc-ajax=checkout returns an HTTP 500 status code. Sometimes the WordPress dashboard at /wp-admin/ is locked out as well, displaying the same error notice with a prompt to check the site admin email inbox for instructions.
Why a PHP update breaks your site
PHP 8.0, PHP 8.1, PHP 8.2 and PHP 8.3 removed functions that had been deprecated in PHP 7.4 and tightened how data types are handled. Code that produced a harmless warning or notice in PHP 7.4 now throws an uncaught fatal TypeError or Error, which immediately stops WordPress from loading the rest of the page.
The usual causes on a WooCommerce store are:
- An outdated plugin or theme calling a removed function such as
create_function()or passingnullor a boolean where PHP 8.1 or PHP 8.2 requires a string or a countable array in internal functions likecount(),strlen()ortrim(). - A custom snippet in a child theme's
functions.phpor a code snippets plugin using old array or string syntax on cart, shipping or checkout hooks. - A missing PHP extension on the new PHP version's server profile, such as
intl,gd,imagick,curl,soapormbstring, which the host enabled on PHP 7.4 but did not enable on PHP 8.2.
Before you change anything
Take a full backup of your database and your wp-content folder through your hosting control panel before touching files, themes or plugins. Once the live store is taking orders again, always test the PHP upgrade on a test copy of the store before switching the live site back to the newer PHP version.
Step-by-step fix
1. Switch PHP back in your hosting panel to get the live store working
If your live checkout is down and your host still offers the previous PHP version, log in to your hosting control panel (such as cPanel, Plesk, or your host's custom dashboard), open the PHP version selector, and set the domain back to the version it ran before, such as PHP 7.4 or PHP 8.0. Reload the front end and test adding a product to the basket. If your host has removed the old PHP version completely, move straight to step two.
2. Check the recovery email or WooCommerce fatal error logs
WordPress automatically sends an email to the site administrator address when a fatal error happens on the admin side. That email names the exact plugin or theme that caused the crash and includes a recovery mode link that lets you log in safely.
If that email did not arrive, but you can now reach /wp-admin/ after rolling PHP back in step one, go to WooCommerce → Status → Logs. Open the latest file starting with fatal-errors- from the log list. Look at the stack trace for a file path containing /wp-content/plugins/some-plugin-name/ or /wp-content/themes/some-theme-name/. That path tells you which component crashed under the new PHP version.
3. Read the error log directly if wp-admin is still unreachable
If you cannot roll PHP back and cannot log in to WordPress, connect to your server using SFTP or your hosting control panel's file manager. Check your hosting panel's PHP error log first. If it does not show the traceback, open wp-config.php in your site's public root directory and write down the current values of WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY, or note that a line is missing, so you can put each back. Find the line that says That's all, stop editing. Immediately above it, add or update these three lines, using a log path above the public web root (the folder that holds public_html or www, not inside it):
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', '/home/youraccount/wp-debug-temp.log' );
define( 'WP_DEBUG_DISPLAY', false );
Replace /home/youraccount/ with the folder your host shows for your account. Save the file, reload the broken page once in your browser to trigger the error again, and then open that log file in your file manager. Look at the bottom of the file for a line starting with PHP Fatal error: or PHP Parse error:. It will show the exact file path and line number that failed. Once you have copied that line for reference, restore the previous values of WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY in wp-config.php, remove any of those lines you added, and delete the temporary log file, so no error details stay on the server. Do this even if the log does not exist or shows no matching line: never leave debugging on for a live store.
4. Disable the broken plugin or theme
Once the log has identified the directory inside /wp-content/plugins/ or /wp-content/themes/, disable that item so WordPress can load. If you have SSH access and WP-CLI installed on the server, you can deactivate the offending plugin without executing its broken code by running:
wp plugin deactivate plugin-folder-name --skip-plugins --skip-themes
If your active theme caused the crash, switch temporarily to a clean default theme or to Storefront using WP-CLI:
wp theme activate storefront --skip-plugins --skip-themes
If you do not have SSH access and only have SFTP or a control panel file manager, navigate to /wp-content/plugins/ and rename the broken plugin's folder by adding -disabled to the end of its folder name. WordPress will fail to find the plugin file, deactivate it automatically, and let you log back in to /wp-admin/.
5. Compare enabled PHP extensions and memory limits
Sometimes the fatal error log does not point to a plugin bug, but instead reads Uncaught Error: Call to undefined function mb_strtolower(), NumberFormatter, imagick, or curl_init(). When a hosting control panel switches your site from PHP 7.4 to PHP 8.2, it loads a separate PHP configuration profile that may have fewer extensions ticked or a lower memory limit.
Open the PHP extensions or PHP options screen in your hosting panel for the new PHP version. Compare the ticked extensions and the memory_limit value against the previous PHP version, enable any missing extensions that WooCommerce or your payment gateway requires, and save the configuration.
6. Update everything on a test copy and test the checkout
Never fix or update plugins blindly on the live shop while customers are trying to pay. Clone your store to a private test copy running the target PHP version, such as PHP 8.2. On that test copy, go to Dashboard → Updates and update WordPress core, WooCommerce, every plugin, and your theme to their current releases.
If the crash came from custom code in your child theme's functions.php or a code snippets plugin, inspect the line number from your error log and check what type the failing function needs and test the value first. For example, count() throws a TypeError in PHP 8 when given something that is not an array, so wrap it with is_countable(). isset() is not enough: it accepts false and strings, which still fail. Finally, test the product pages, basket, and payment flow by placing a full test order on the test copy checkout before applying the same updates and switching the PHP version on your live store.
If you want us to fix it for you
If you would rather not dig through error logs or edit files yourself, we offer a Store fix. We update WordPress, WooCommerce, your theme and every plugin on a private copy of your store, fix what the updates break, test the checkout, and then make the same updates on your live store. It costs £149, or $179 for US stores, paid up front, with a full refund if we cannot fix it, and is usually done in 2 working days. For a fix, you add our public SSH key to a user you choose and remove it when the work ends; we never ask for an administrator password. You can also browse our other WooCommerce how-tos for store owners or read about all of our WooCommerce upkeep and fix services.