Public
Authored by Amrit Singh

How to update the PHP version in WordPress?

If you are using PHP for your WordPress site, the latest PHP versions 7.4, 8, and 8.1 are faster, resource-friendly, and more secure than their predecessors. If you are still stuck with older PHP versions such as 6 and lower, follow these steps to upgrade to the new one.

Step 1 – Create a Staging Site

Creating a separate staging site will allow you to test newer PHP versions without breaking your live site. You can create a staging environment through several ways like one-click staging site solutions, WordPress plugins, or even manually.

Step 2 – Update PHP Version for WordPress

Next, go to Sites on your WordPress dashboard and select the site whose PHP version needs to be changed. On your preferred site, click on the Tools tab. Under PHP Engine, select the Modify button and choose the PHP version you want.

As we created the staging environment as the first step, it's best to test your new PHP version in that. Thus, if your site has problems with the latest PHP 8 or 8.1, you can always revert it to a lower version, such as PHP 7.4. Once you select the PHP version, you’ll get a prompt. Confirm your choice by finally clicking on the Modify PHP version button.

Step 3 – Test Your Updated Site

Now, as the new PHP version runs on your site, the first thing you should do is simply browse and click around on your WordPress site. If something seems broken or incompatible, such as a plugin or your theme, you might see a 500 error. In some cases, you might find a white screen of death on the front-end of your site. Check the cause of these errors by disabling all of your third-party plugins and then re-enable them one by one. Since you're on a staging site, you don’t have to worry about breaking anything.

43 Bytes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment