How to Update PHP Version of a WordPress Site (The Easy Way)

how to update PHP in WordPress

The world of WordPress constantly moving forward. As such, it’s not uncommon to find that the PHP version of your website suddenly became incompatible with the plugins or the site itself.

In these cases, you will see a notice on your admin dashboard, suggesting you update the PHP version. Alternatively, you can also manually check if you’re using an outdated version. In either case, you’d surely want to know how to update PHP in WordPress sites.

Fortunately, updating your PHP version is a relatively painless process, and this guide will help you through it. Let’s start by sharing the reasons why you should update the PHP version in the first place.

Why Update the PHP Version of Your WordPress Site?

how to update PHP in WordPress

WordPress is a CMS platform powered by a programming language called PHP. Thus, a big part of the security and speed of your WordPress site depends on the version of PHP you are using to power your site.

A newer PHP version comes with more stability, efficiency and of course fewer vulnerability issues. This helps your site to become faster and more secure.

Right now, WordPress requires that you use PHP 7.4 at least on your website, while the latest version is 8.1.1. Because of the requirement set by WordPress, most hosting providers now use at least 7.4 or newer.

Moreover, many WordPress plugins also depend on having a newer version of PHP. These plugins may not work properly if you don’t update the PHP version of your website.

PHP warning

Now you know why it is very important to update the PHP version of your website.

How to Check PHP Version of Your WordPress Site?

There are two different ways to know which PHP version you are using on your website. You can either know it from the WordPress admin dashboard, or from the hosting panel (cPanel/any other backend panel that your hosting uses).

The easiest way is obviously using the admin dashboard, as you won’t have to log in to your hosting backend panel.

  • To check PHP Version in this way, first, navigate to WordPress Admin Dashboard > Tools > Site Health.
Check PHP version
  • Now click on the Info tab and you will find the PHP Version under the Server option.
PHP version checking settings

Now if your website does need a PHP update, don’t worry, we’ll now show you how to update PHP in WordPress, step by step.

How to Update PHP Version of a WordPress Site (Using cPanel)

Now let’s take a look at how you can update your PHP version if you are indeed using an older version. To update the PHP version of a WordPress website, first, you have to access your cPanel.

There are two ways to access your cPanel.

  1. Directly visiting yourdomain.cpanel.com and then login with your email and password
  2. One click log in from hosting provider’s dashboard.

Let’s show you the easiest way, which is the second option. We will access cPanel from Namecheap hosting.

  • First, log in to Namecheap or any hosting you might be using. Now navigate to Account > Dashboard > Hosting List. (You can find almost similar options from other hosting providers as well.)
  • Now click on Go to cPanel button of the domain, of which you want to update the PHP version.
Access your cPanel
  • Now you should be inside the cPanel of your domain. Scroll down, and you will find an option called Select PHP Version. Click on IT.
Select PHP version

Now you will be able to see the current PHP version that you are using, as well as get a drop down along with it.

The dropdown will show you all the previous and newer PHP versions. You can easily choose the newest or any PHP version that you may want to use on your website.

PHP extensions

And you are done! How easy was that?

Also Read: How to Reset phpMyAdmin and WordPress Admin Password

Can Your Site Break If You Update the PHP Version & How to Fix?

This is a common question that arises in everyone’s mind when they start seeking ways of how to Update PHP in WordPress.

Can my site break when updating the PHP version? The answer is Yes, but the instance of it is happening is very rare.

Your site (or a portion of it) can break if your site hosts any outdated plugin or theme that might not support a newer PHP version or has errors in the code.

However, there are generally very rare instances of a site breaking after updating the PHP version.

How to Stop a Site from Breaking by PHP Version Update?

There are simple ways to prevent or repair your site from breaking before and after you update your PHP version.

  • You can test the PHP update by first applying it on your staging WordPress site and see if it breaks anything. If everything goes okay, then update the PHP for live site as well.
  • After updating the PHP version, if the site breaks you should try uninstalling the plugins on your site one by one to find out if any plugin is causing the issue. If not, try switching the theme.

By now your problem should get fixed. And if the problem still persists, contact your hosting providers and they should be able to take care of it.

Now that we pushed the issues aside, let’s get to know when it is time to update your PHP version and what PHP version you’re using on your website.

Wrapping Up

So there you go! We have reached the end of our article.

Within the blog, we shared the reason you should update the PHP version of your website. We also shared two different ways to check the PHP version of your website. Finally, we showed you the easiest way to update the PHP version of a website.

Hopefully, this guide will give you some helpful tips along the way to getting that new, shiny version of PHP installed.

If you have any specific questions (or if you think we made a mistake), feel free to post them in the comments! Additionally, if you need help with this process, don’t hesitate to ask for assistance.

Want to read more such tutorial blogs? Then you should definitely subscribe to our newsletter. You can also follow our Twitter and Facebook handle to get regular updates from us.

Share:

https://wphive.com/tutorials/how-to-update-php-in-wordpress-site/Copy icon

Faisal Sarker

Faisal is a tech blogger who excels at WordPress Content Writing. Apart from sharing useful info pieces that help people around the world, he also likes to travel and read books of all genres in his leisure time.

Subscribe To Our Newsletter

Leave a Reply

Your email address will not be published.