How to Test a WordPress Site Before You Upgrade PHP: A Step-by-Step Checklist

Backup, staging copy, plugin checks, error logs and a rollback plan: how to test a WordPress site before you change its PHP version.

A developer's screen showing a website open in one window and a code editor in another, used for testing before a PHP upgrade
Quick answer

Test a PHP upgrade on a copy of your site, never on the live one. Take a full backup, build a staging copy, update plugins and the theme there, switch the copy to the new PHP version with error logging on, then work through every form, login, checkout and search. Change the live site only when the copy runs cleanly.

Key takeaways

  • PHP 8.2 stops getting security fixes on 31 December 2026 and 8.3 on 31 December 2027, so most sites will need to change version within the next year.
  • Never test on the live site. A staging copy lets you find what breaks without customers seeing it.
  • Update WordPress, plugins and the theme first, and replace any plugin that is no longer maintained, before you change PHP.
  • Error logs show problems the screen hides. Turn logging on in staging and read the log after every test.
  • Switch the live site at a quiet time, with a fresh backup and a written plan for switching back.

Why test at all, and which version should you move to?

Changing the PHP version is a small switch in most hosting panels, but the code running on top of it is not always ready. A plugin written years ago may call a function that newer PHP has removed, and the first sign can be a blank page or a checkout that silently stops working. Testing on a copy first is how you find that out on your own terms.

The official PHP supported versions list gives the dates. PHP 8.2 receives security fixes until 31 December 2026 and 8.3 until 31 December 2027. PHP 8.4 is supported until 31 December 2028 and 8.5 until 31 December 2029, so for most sites 8.4 or 8.5 is the sensible target: it saves doing the same exercise again in a year. Our article on the risks of running an outdated PHP version explains why the deadline matters. This guide is about the testing itself.

Step 1: take a full backup you have actually checked

A backup that has never been restored is a hope, not a backup. Before you touch anything, make sure you have two things: a copy of every file on the site, including uploads, themes and plugins, and an export of the database. Many hosts take daily backups, but check how far back they go and whether you can restore them yourself or need to open a ticket.

Store one copy somewhere other than the hosting account, so a problem with the host does not take your backup with it. Write down the date and time it was taken. If the upgrade later goes wrong, this is the point you will return to.

Step 2: build a staging copy

A staging site is a private copy of your website, usually on a subdomain or a separate folder, where you can break things safely. Many hosting panels and some WordPress plugins can create one in a few clicks. If yours cannot, a developer can copy the files and database to a separate location by hand.

Two settings on the copy matter. First, stop search engines from indexing it, so the copy does not compete with your real site. Second, turn off outgoing emails and payment gateways, or switch them to test mode, so a test order does not charge a real card or email a real customer. Check that the copy loads and looks the same as the live site before going further.

Step 3: update and audit plugins before you change PHP

On the staging copy, update WordPress itself, then the theme, then every plugin, one at a time where possible. Many compatibility problems disappear at this stage, because developers who still maintain a plugin have usually already fixed it for newer PHP versions.

Then look at each plugin with a harder question: is anyone still maintaining it? These are the warning signs worth checking.

  • The plugin has had no update for a long time, or its listing warns that it has not been tested with recent WordPress releases.
  • It has been removed from the official plugin directory.
  • Its developer's website has gone, or support questions go unanswered.
  • It duplicates something another plugin or WordPress itself now does.
  • It has known security problems, which you can search for in public sources such as the National Vulnerability Database.

An abandoned plugin is the most likely thing to break on a newer PHP version, and it will not be fixed. Replace it or remove it now, while you are testing anyway.

Step 4: switch staging to the new PHP version with logging on

Change the PHP version for the staging copy only. In most hosting panels the version can be set per site or per folder, so check carefully that you have not changed the live site by mistake.

Before testing, turn on error logging for the copy. WordPress has debug settings in its configuration file that write errors and warnings to a log file instead of showing them to visitors, and most hosting panels also keep a PHP error log. Clear or note the end of the log, so you can see exactly which errors appear during your tests. Errors often happen in the background, during a form submission or a scheduled task, without anything visible on the page.

Step 5: test what your business depends on

Clicking through the home page is not a test. Work through the things that bring in enquiries and money, and the things staff use every day. Keep a simple list and tick each item off on the staging copy.

AreaWhat to tryWhat a failure looks like
Contact and quote formsSubmit each form with real-looking detailsNo confirmation, no email received, an error after pressing send
Online shopAdd to basket, apply a coupon, check out in test modeBasket empties, totals wrong, payment step fails
LoginsLog in as an admin and as a customer or memberLogin loops, blank dashboard, missing menu items
Search and filtersSearch for a product or page, use any filtersNo results, slow results, error message
Admin tasksEdit and save a page, upload an image, update a productChanges not saved, editor will not load
Scheduled jobsCheck backups, newsletters and any timed tasks still runJobs silently stop; often only visible in the log
IntegrationsCheck links to your CRM, WhatsApp, accounting or delivery toolsData stops arriving at the other system

Step 6: read the error log and fix what it shows

After each round of tests, open the error log. Entries usually name the file and line where the problem happened, which tells you whether it comes from WordPress itself, the theme or a particular plugin. Fatal errors stop something working and must be fixed. Deprecation notices are warnings that a function will be removed in a future version: they do not break the site today, but they tell you which plugin will cause trouble at the next upgrade.

Fix the cause, not the symptom. That usually means updating or replacing the plugin named in the error, or asking the theme developer for a compatible version. Custom code written for your site may need a developer to change it. Repeat the tests until the log stays clean.

Step 7: switch the live site with a rollback plan

Once the staging copy runs cleanly, apply the same plugin and theme updates to the live site first, then change its PHP version. Pick a quiet time for your business, not the morning of a sale or the end of the month.

Take a fresh backup immediately before the change, and write down how to switch back: in most panels that is simply selecting the previous PHP version again. Then run the same checklist on the live site straight away and keep an eye on the error log for the next few days. If anything serious appears, switch back first and investigate afterwards. If you would rather not do this yourself, our PHP version update service follows the same steps, and website maintenance keeps plugins and PHP current afterwards. Wider site work sits under our website development service.

Frequently asked questions

You can, but on a live site that means customers may find the problem before you do. A form that stops sending or a checkout that fails may not show an obvious error. Testing on a staging copy first costs a little time and avoids losing enquiries or orders while you work out what broke.

For most sites, 8.4 or 8.5. According to the official PHP supported versions list, 8.4 gets security fixes until 31 December 2028 and 8.5 until 31 December 2029. Moving to 8.3 only buys time until 31 December 2027. Check that your plugins and theme support the version you choose before switching.

A developer can copy the files and database to a separate folder or subdomain and point it at a copy of the database. Some WordPress plugins can also create a staging copy. Whichever method you use, block search engines from the copy and switch payments and outgoing emails to test mode.

An error means something has stopped working, such as a page failing to load or a form failing to send, and it needs fixing before you switch. A deprecation notice is a warning that code relies on something PHP will remove later. It does not break the site today, but it shows which plugin will cause trouble at the next upgrade.

In most hosting panels you simply select the previous PHP version again, which takes effect within minutes. If plugin updates made at the same time are the cause, restore the backup you took just before the change. Write the rollback steps down beforehand, so nobody has to work them out under pressure.

Yes. The same order works for any PHP site, including custom applications and other content management systems: back up, build a copy, update the code and its components, switch the copy to the new version with logging on, test what the business depends on, read the log, then change the live site with a rollback plan.

Written by Srinivasan Ramachandran, Founder, Listonics · Published Nov 30, 2026 · Last reviewed November 30, 2026 · 1607 words

Talk to an engineer about Custom website development for your office.

Contact us

This page is general information for Dubai businesses, not a substitute for a professional assessment of your own setup. For advice specific to your office, book a free assessment.

Chat on WhatsApp