How to upgrade your site's PHP version safely

Every PHP version gets security fixes for a few years, then none. Running an unsupported one is like leaving a window open. Here's how to upgrade without breaking anything.

Why it matters

  • Security. Once a PHP version reaches end of life, newly found holes in it are never fixed.
  • Speed. Each major PHP release has generally been faster than the last.
  • Compatibility. New plugin and theme versions eventually drop support for old PHP, so you get stuck on old, unpatched versions of those too.

Find out what you're running

In WordPress, go to Tools → Site Health → Info → Server. In most control panels, the PHP version is shown on the site's settings page. On PureHost you can see and change it per site.

Before you upgrade

  1. Update everything first. WordPress core, plugins and themes. Most compatibility problems are fixed in newer releases.
  2. Look for abandoned plugins. A plugin not updated in years is the most likely thing to break. Find a maintained replacement now.
  3. Take a backup. Files and database, so you can roll back completely if needed.

Upgrade one step at a time

If you're several versions behind, step up one minor version at a time (for example 8.1, then 8.2, then 8.3) rather than jumping straight to the newest. It makes any problem easier to pin down.

Test properly

  • Load the home page and a few inner pages.
  • Log in to the admin area and open the main settings screens.
  • Submit your contact form, and if you have a shop, place a test order.
  • Check your PHP error log for warnings and deprecation notices.

If something breaks

Switch the PHP version back. It takes effect straight away and nothing else changes. Then find the plugin or theme at fault (the error log usually names the file), update or replace it, and try again.

Custom PHP apps

For Laravel or other Composer-based apps, check the framework's supported PHP versions, update dependencies with composer update on your own machine first, run your tests, and deploy the updated vendor folder before switching the server's version.

PureHost lets you pick the PHP version for each site and switch back instantly. PHP and Laravel hosting.

Start with a clean slate

Choose a plan and your account is set up as soon as your card payment goes through. Hosted somewhere else already? We'll carry your site across at no charge.