Upgrading PHP can improve compatibility, security, and application performance, but changing versions without preparation can expose outdated plugins, themes, extensions, or custom code. This reusable checklist explains how to inventory your site, test the new version, create a reliable rollback path, change PHP in common hosting environments, and verify the result before visitors encounter problems.
Overview
PHP is the server-side language used by many content management systems, ecommerce applications, frameworks, and custom websites. Your hosting account runs one PHP version at a time for a domain, directory, account, container, or server configuration. The exact control depends on your provider and hosting plan.
A safe upgrade is not simply a version change. It is a small maintenance project with four stages:
- Inventory: identify the current PHP version, application, plugins, themes, extensions, and scheduled tasks.
- Compatibility review: check whether the CMS, application code, extensions, and integrations support the target version.
- Testing and recovery: test a copy of the site and confirm that backups can actually be restored.
- Controlled deployment: change the version during a low-risk period, inspect logs and key workflows, and roll back if necessary.
Before changing anything, record the current PHP version and the target version offered by your host. Do not assume that the newest option in a control panel is suitable for every application. Check the current compatibility documentation for your CMS, framework, plugins, and hosting provider. PHP branches and provider menus change over time, so treat support information as an input to verify before each upgrade.
If your site is on a managed plan, ask the host whether PHP changes are handled automatically, whether the version applies to all domains, and how long a rollback remains available. On a VPS or dedicated server, the process may involve package repositories, PHP-FPM pools, web-server configuration, and extension packages rather than a single control-panel setting. See our guide to managed versus unmanaged VPS hosting if you need to clarify which server responsibilities belong to you.
Checklist by scenario
For WordPress and other CMS sites
- Note the current PHP version in the hosting panel or application health screen.
- Update the CMS, plugins, themes, and translations on a staging copy first. Avoid combining the PHP change with several unrelated updates on the live site.
- Review each plugin and theme for a stated PHP compatibility range. Pay special attention to abandoned, custom, or rarely updated components.
- Check whether the site uses image-processing, caching, database, XML, internationalization, or other PHP extensions that may need to be enabled separately.
- Test the homepage, login, search, forms, media uploads, administrator screens, and any ecommerce or membership workflow.
For custom PHP applications
- Record the application runtime requirements and the versions of its framework and dependencies.
- Run the application’s automated tests, if available, against the target PHP version.
- Review deprecation and fatal-error messages in development and staging logs.
- Confirm that required extensions, command-line tools, queue workers, cron jobs, and deployment scripts use the same intended PHP version.
- Test authentication, database queries, file uploads, email delivery, API calls, background jobs, and payment or webhook flows.
For shared hosting with cPanel or a similar panel
- Open the hosting account’s PHP version or multi-version manager. The label may vary by provider.
- Select the correct domain or document root if the account hosts multiple sites.
- Choose the target version and review the available extensions before saving.
- Apply the change, then clear application and server-side caches if your host instructs you to do so.
- Visit the site and inspect the PHP error log. If the site fails, return to the previous version while investigating.
Some panels apply PHP settings per domain; others apply them per account, directory, or hosting subscription. If the setting is missing, contact the provider rather than editing unrelated configuration files. A host may also restrict version changes on older plans or require a support request.
Compatibility testing worksheet
| Item | Current state | Target-state check | Result |
|---|---|---|---|
| PHP runtime | Version and handler | Target version available and selected for the correct site | Pass / investigate |
| CMS or framework | Name and release | Declared support for the target PHP branch | Pass / investigate |
| Extensions | Enabled modules | Required modules present with compatible settings | Pass / investigate |
| Code and dependencies | Custom code and package versions | Tests and logs show no blocking errors | Pass / investigate |
| Critical workflows | Forms, checkout, login, APIs | Completed successfully on staging and production checks | Pass / investigate |
What to double-check before changing PHP
Backups are usable only when they can be restored. Create or confirm a backup of both the site files and database. If possible, restore it to a staging location and check that the restored site loads. Keep the current backup separate from any automated rotation that might overwrite it. Our guide to verifying and restoring hosting backups covers this preparation in more detail.
Record a rollback plan. Write down the current version, the panel path or server command used to change it, and the support contact for your provider. Define what counts as a failure: a blank page, repeated fatal errors, broken checkout, failed background jobs, or another business-critical symptom.
Check more than the homepage. A PHP upgrade may leave the homepage functional while breaking administrative screens, scheduled tasks, contact forms, search, imports, or integrations. Use a short list of real user journeys and test them after the change.
Inspect logs safely. Look in the hosting panel, application log, web-server log, and PHP-FPM log where available. Do not display detailed errors to public visitors on a production site. Error messages can reveal paths, configuration details, or other information that should remain private.
Separate variables. If you upgrade PHP, the CMS, several plugins, and the database server at the same time, identifying the cause of a failure becomes harder. Stage related changes first, but keep the production change as narrow as practical.
Common mistakes
- Changing the wrong site: verify the domain, document root, and environment before saving the new version.
- Skipping custom code: older snippets in a theme, mu-plugin, checkout integration, or cron script can fail even when the main CMS is current.
- Assuming a backup equals a rollback: a backup does not restore the previous PHP runtime. Confirm that the old version is still available or that your host can provide an alternative recovery method.
- Ignoring command-line PHP: web requests and command-line tasks may use different binaries. Check scheduled jobs, deployment tools, and queue workers separately.
- Testing only while logged in: cached administrator sessions can hide problems. Test in a private browser window and as an ordinary visitor.
- Leaving the old version indefinitely: rollback is a safety measure, not a permanent compatibility strategy. Once the site is stable, plan the remaining code and dependency work.
When to revisit
Revisit this checklist before every planned PHP upgrade, after a major CMS or framework update, and whenever your hosting provider announces that a PHP branch will be removed or changed. It is also worth reviewing after moving a site to a new host, changing from shared hosting to a VPS, or adding a plugin, theme, extension, or integration that has specific runtime requirements.
Keep a small maintenance record containing the date, old and new versions, backup location, test results, observed warnings, and rollback outcome. Refresh the version-support table in your internal documentation whenever PHP branches, CMS requirements, or hosting-panel options change. If you are planning a broader move, combine this process with a website migration checklist rather than treating the PHP change as an isolated task.
Practical next step: copy the worksheet into your maintenance notes, identify the current PHP version, confirm a restorable backup, and create a staging test before touching production. If any compatibility answer is unknown, pause the upgrade and resolve that question with the application documentation or hosting provider first.