WordPress Critical Error After a PHP Update: How to Troubleshoot It
If WordPress shows a critical error after a PHP change, use the logs and a safe rollback plan to find the cause without risking your live website.

In this guide
Confirm the PHP change with your host, verify a restorable backup, inspect the first matching fatal error and test one suspected plugin or theme at a time—preferably on staging.
Did your WordPress website start showing “There has been a critical error on this website” after your host changed PHP? The message usually means WordPress encountered a fatal error, but it does not identify the cause on its own. A plugin, theme, custom snippet or server resource limit may be responsible.
Follow the steps below in order. If the website takes bookings, accepts payments or generates important enquiries, avoid experimenting directly on the live site without a backup.
1. Confirm what changed
Ask your hosting provider which PHP version was active before and after the change, when the switch occurred, and whether the server error log shows a matching fatal error. A timing match is a useful clue, but it does not prove PHP itself is the only cause.
2. Make sure you can recover
Before changing plugins or theme files, confirm that you have a recent backup of both WordPress files and the database. If the host offers staging, reproduce the issue there. A backup is only useful if it can actually be restored.
3. Read the error log
Look for the first relevant PHP Fatal error or Uncaught Error around the time the problem began. The file path can point toward the component involved, such as a plugin directory, theme directory or WordPress core. A file mentioned in the stack trace is a lead to investigate, not automatic proof that it is defective.
WordPress explains common failures in its Common Errors guide and documents private debugging in its debugging guide.
4. Check plugins safely
Update plugins from trusted sources and check their compatibility notes. If you cannot access the dashboard, ask your host or developer to use staging or temporarily disable the suspected plugin with a clear rollback plan. Change one thing at a time and test again.
Do not leave essential security, backup or payment plugins disabled as a permanent fix. If disabling one plugin resolves the error, look for an updated release or contact its developer.
5. Check the active theme and custom code
An older theme, child-theme function or pasted code snippet may call a function or use syntax that is incompatible with the current runtime. Test a default WordPress theme on staging to see whether the issue is theme-related. Preserve your original theme and child-theme files before editing.
6. Understand common log messages
- Allowed memory size exhausted: the request reached a PHP memory limit. Investigate the component using memory and ask the host what limit applies before changing settings.
- Call to undefined function: code may rely on a missing extension, a function unavailable in the current environment, or an incompatible dependency.
- Uncaught TypeError: code may be passing a value of an unexpected type, often exposed by stricter runtime behaviour.
- Headers already sent: unexpected output may have been emitted before WordPress attempted to send headers.
- HTTP 500 or a blank page: this is a symptom, not a diagnosis; check server and PHP logs for the underlying error.
7. Should you roll back PHP?
A temporary rollback may help restore service if the host confirms a compatibility problem, but it should be a controlled decision—not a long-term security strategy. Use a supported PHP release, test compatibility, and arrange a plan to update the component causing the failure. Never roll back to an unsupported version without understanding the security risk.
8. Turn debugging off for visitors
If debugging is enabled during diagnosis, ensure detailed errors are written to a private log rather than displayed publicly. Error output can reveal file paths and implementation details. Secure or remove debug logs after the issue is resolved.
After the site comes back
Test the homepage, mobile layout, contact forms, email notifications, booking flow and checkout. Clear relevant caches, then check that important pages return normally. If the issue persists, provide your host or developer with the PHP version, timestamp, exact error and steps to reproduce it.
Need help with a WordPress issue?
Our team helps small businesses keep websites stable, clear and ready to generate enquiries. Request a free five-point website review and include your site URL and the exact error message. You can also read our guide to recovering from a hacked website if you suspect unauthorised changes.
We help small businesses with website design, hosting, maintenance and SEO foundations. Plans start at £39/month; scope and terms should be confirmed in writing before you commit. No website or SEO service can guarantee leads or rankings.
Contact: hello@afaqdesign.com or send an enquiry.
Make your website more useful
Tell us what your business needs and we will help you plan the next improvement.