How to Update PHP Version in WordPress?

Update PHP for WordPress

PHP is a primary programming language in WordPress. It plays a crucial role in the speed and security of your website. If you do not run the latest WordPress PHP version, it will hamper the performance of your site. 

The good news is that you can easily upgrade to the latest version of PHP without any complicated process. You can use numerous methods that depend on your hosting provider. The steps are comparatively straightforward & quick. 

Let’s first read about WordPress and PHP!

PHP and WordPress

PHP was first introduced in the year 1990. It is now widely used and one of the most prominent languages. WordPress and PHP have a significant connection, as PHP is a primary programming language that runs WordPress. This means that if you use WordPress, you use PHP as well.

Since WordPress is built with the support of PHP, it affects many functions and features of CMS. It is a server-side language of a script that runs on the host server.  

When your site is visited by a user, your server runs the PHP code and returns your page in HTML. This is what your users view in their browsers. Therefore, if anything goes wrong with PHP, it directly affects the functionality and appearance of your site.

Why it is crucial to use an updated PHP version?

WordPress runs on PHP. 

The PHP version you are using can affect different aspects of your website. For this reason, you can run at least PHP 7.4 on WordPress. PHP 8.0 version is also available for you to update. 

Each PHP version brings security patches, bug fixes, and performance improvements. It is designed to make your site more secure and efficient.

How will you check the PHP version?

WordPress makes it easiest to check the PHP version. The steps for checking the PHP version are as follows:

  • Login to admin on your WordPress site
  • Go to tools< page of Site Health< Switch to the “Info” button
  • Scroll down a little and tap to expand the “Server” button

This section will show your server information including the PHP version used by your server.

You can use cPanel to find out the version of PHP. The steps for this method are as follows:

  • Access web host account
  • Go to cPanel
  • Find the “Software” section
  • Select PHP version

On selecting, you will be directed to a fresh page where you can check the PHP version. 

We recommend you install a plugin if you cannot access this option in your hosting account. 

Steps you must take before updating the PHP version

Updating the PHP version on your website can cause malfunction or break. To avert it, you can take the following measures:

1. Take a backup of your WordPress site 

You will have to create a complete backup of your WordPress site before updating the PHP version. It will support you in simply restoring your site back to normal if anything goes wrong.

The BlogVault backup plugin is one of the best backup plugins. It takes backup of your entire site automatically and in a few minutes. The plugin allows you to bring back your site with a single tap.

2. Check your themes and plugins

We suggest you visit your WordPress dashboard and review the plugins list that you have added. If any updates are pending, update them first. It is necessary because some plugins may not be able to work with the latest PHP version. 

We also recommend you enable your plugins one at a time after completing the PHP update. It will ensure whether each plugin is working properly or not. However, if any warning occurs, you must disable the plugin before updating PHP. 

3. Update WordPress

You must always ensure that you run your site on the latest version of WordPress core. It will help you while you update your PHP. There can be an issue of incompatibility if you run an outdated WordPress version and an updated PHP version. It will also render your site unusable.

To update it, go to the dashboard of your WordPress. Tap on the “Update Now” option if a new version is available.

How to update the PHP version

There are numerous web hosting providers that update PHP with different methods. However, their methods will be quite similar. It allows you to smoothly update or change the PHP version.

Let’s take the first example of the GoDaddy-web host provider. You can update your PHP version manually by following the below-mentioned steps:

  1. Log in to your GoDaddy account.
  2. Go to “Access my products”
  3. Tap on web hosting and Manage
  1. Under the settings option, switch to the server.
  2. Tap on the “PHP version” option. You will see a pop-up that will enable you to change the PHP version.
  1. Choose the version, confirm it by typing “Update” and save the changes.

Now, your WordPress site runs on the latest PHP version. You can speak with your web hosting provider if you have any issues. You can also get WordPress Support from a prominent team so that your site can run smoothly.

Another example is WP Engine- a web hosting company. They automatically update the PHP version. However, you can follow the below manual steps:

  1. Login to the dashboard of WP Engine.
  2. Tap on the PHP version next to “My Website”.
  1. Select the upgrade or downgrade option from the pop-up.
  1. After selecting, click on the tab “Change PHP version” to save changes. 

What to do if a PHP update breaks your WordPress site?

There can be a few chances of PHP updates breaking your WordPress site. 

Besides this, your site can have free and paid plugins such as Wordfence for security, Small ballon for social media feeds, etc. There is a chance that a single line of feeble code can result in an error.

For this, you must ensure that it is not a theme or plugin causing the error. You must make all your WordPress plugins inactive and switch to the default setting.

If it doesn’t solve your problem, contact the support team of your web host. You can also have support from other web hosting sites such as Bluehost, Siteground, HostGator, etc.

What’s Next?

After you have updated the PHP version, you must ensure that your WordPress site is running smoothly. We recommend you visit your site and see if there are any issues or not. 
Log in to your WordPress website and ensure that it runs on the new version. After that, check and make sure all themes and plugins are up-to-date.

Further Reading

LEAVE A REPLY

Please enter your comment!
Please enter your name here