Upgrading PHP can improve a WordPress site’s security, performance, and long-term maintainability, but changing versions without testing can cause plugin errors or downtime. This checklist explains how to assess WordPress PHP version compatibility, prepare a safe hosting upgrade, test themes and plugins, and create a rollback plan you can reuse during every maintenance cycle.
Overview
WordPress runs on several connected layers: WordPress core, the PHP runtime, the database server, the web server, the active theme, and installed plugins. A PHP upgrade changes the runtime underneath the application. WordPress core may work correctly while an older plugin, custom theme, or bespoke code produces warnings or fatal errors.
There is no single “best PHP version for WordPress” that applies to every site. The right choice is the newest PHP branch that is supported by your hosting provider, compatible with your WordPress release and extensions, and confirmed to work with your active themes and plugins. Treat compatibility as a testing process rather than a setting to change blindly.
Before making a change, record the current PHP version, WordPress version, database type and version, active theme, plugin list, and hosting configuration. WordPress Site Health can provide useful environment details, while your hosting control panel may show additional PHP extensions, memory limits, and error logs. For a broader infrastructure review, compare these checks with your cloud hosting resource monitoring checklist.
What to track
1. WordPress and PHP compatibility
Maintain a simple compatibility record rather than relying on memory. Use the following decision table when reviewing an upgrade:
| Item | What to confirm | Action if uncertain |
|---|---|---|
| WordPress core | The installed release supports the proposed PHP branch and has no pending critical update. | Review the release documentation and test the upgrade on staging. |
| PHP runtime | The proposed branch is actively supported or otherwise approved by your hosting provider. | Ask the host which maintained branches and required extensions are available. |
| Theme | The theme is maintained and compatible with the target PHP syntax and functions. | Update it, check its changelog, or test a current default theme. |
| Plugins | Each active plugin has a recent compatibility statement or successful staging test. | Update, replace, or temporarily deactivate the plugin before production. |
| Database | The database server and WordPress database driver meet the application requirements. | Confirm versions and extensions with the hosting provider. |
| Custom code | Snippets, child-theme functions, mu-plugins, and integrations avoid removed or deprecated PHP behavior. | Search logs and test key workflows with debugging enabled only on staging. |
Do not use a PHP compatibility checker as the only approval method. Static scanners can identify suspicious functions, but they may not reproduce runtime behavior, API responses, scheduled jobs, or interactions between plugins.
2. Application behavior
List the actions that matter to the site owner and visitors: viewing posts, submitting forms, logging in, uploading media, searching, checking out, receiving webhooks, and sending transactional email. Test those actions after every PHP change. A site can appear visually normal while an admin screen, payment callback, or scheduled task is failing in the background.
3. Hosting controls and recovery data
Record how your hosting environment changes PHP. Depending on the provider, the control may be in a hosting panel, a site management dashboard, a container configuration, or a server package manager. Also note the current PHP-FPM setting, memory limit, max execution time, enabled extensions, and error-log location.
Confirm that you have a recent database and file backup, access to the hosting account, and a way to restore the previous PHP setting. A backup is not a complete recovery plan until you know how to restore it; use the workflow in this cloud backup and restore testing guide as a model.
Cadence and checkpoints
A quarterly compatibility review is a practical baseline for an actively maintained WordPress site. Review sooner when WordPress core, PHP, a major plugin, or the hosting platform announces a significant release or end-of-life change. High-traffic stores and sites with custom integrations may need a staging test for every planned runtime change.
- Inventory: Export or record WordPress, PHP, database, theme, plugin, and server-extension versions.
- Check dependencies: Read the compatibility notes for core, the theme, plugins, and important external services. Mark unsupported or abandoned components.
- Prepare staging: Create a staging copy with production-like content and configuration. Protect it from search indexing and avoid sending real customer email or payment requests.
- Upgrade staging: Change PHP through the same control path used in production. Clear relevant caches only after noting their original settings.
- Run the worksheet: Test the homepage, representative content, login, admin editor, forms, media uploads, search, ecommerce flows if applicable, scheduled tasks, and integrations.
- Inspect logs: Look for fatal errors, warnings, deprecations, timeout messages, and failed background jobs. Compare response times and error rates with the previous staging run.
- Schedule production: Choose a low-risk maintenance window, notify stakeholders, confirm the backup, and keep the previous PHP option available.
- Verify after release: Test key workflows again, monitor logs, and ask site owners to report any unexpected behavior.
For the plugin-and-theme testing worksheet, use one row per component with these columns: component name, current version, target PHP result, tested workflows, errors found, fix or replacement, owner, and approval date. This turns an informal check into a reusable maintenance record.
How to interpret changes
A blank page or “critical error” immediately after the switch usually indicates a fatal PHP error in a plugin, theme, custom snippet, or required extension. Check the hosting error log and WordPress recovery email if available. If the log identifies a component, deactivate or update that component from a controlled access path, then retest rather than repeatedly changing PHP versions.
Warnings and deprecation notices deserve attention even when the site still works. They can identify code that may fail in a later PHP branch. Do not display debugging output on a public site; reproduce the issue on staging and send logs to a protected location.
If only one feature fails, isolate the workflow. For example, a working homepage with broken form submissions points toward the form plugin, mail transport, permissions, or an integration rather than WordPress rendering as a whole. If the entire site slows down, check PHP worker limits, memory usage, database load, and cache behavior before assuming the runtime alone is responsible. The website speed optimization checklist can help separate application and hosting symptoms.
Rollback is appropriate when a critical business function cannot be restored quickly and the cause is not yet understood. Revert to the previously tested PHP version, preserve the error logs, and document the exact component that needs remediation. A rollback should be a temporary safety measure, not a reason to remain indefinitely on an unsupported runtime.
When to revisit
Return to this checklist at least quarterly and before every planned PHP or WordPress upgrade. Revisit immediately when your host changes available PHP branches, when a security or end-of-life notice affects your current runtime, when a plugin or theme introduces a major release, or when the site gains a new integration.
At each review, update four records: the version inventory, the compatibility worksheet, the staging test results, and the rollback instructions. Remove inactive plugins, confirm that backups can be restored, and verify that the person responsible for the site still has hosting access. If you are also moving environments, pair this process with the cloud hosting migration checklist rather than changing PHP and infrastructure at the same time without a recovery plan.
The practical goal is not to chase every version immediately. It is to keep WordPress core, PHP, themes, plugins, and hosting controls within a tested and supportable combination. A short recurring review makes upgrades predictable, limits emergency troubleshooting, and gives you evidence for deciding when a PHP change is ready for production.