Although many WordPress customers aren’t conscious, understanding how to replace PHP in WordPress is without doubt one of the most vital components of sustaining your WordPress web site. It’s completely essential for the safety, performance, and efficiency of your web site. That being stated, it might sound overly technical and daunting, particularly when you’re new to WordPress.

In this information, we’ll allow you to conquer your fears by exhibiting you precisely how to replace your WordPress web site’s PHP model.

We’ll cowl:

  • What is PHP used for in WordPress?
  • How to replace PHP
  • FAQs

What Is PHP Used for in WordPress?

Standing for Hypertext Preprocessor, PHP is an open-source scripting language broadly used in net improvement. It’s a server-side scripting language, which suggests the code is executed by the server and never the web site customer’s pc. Because it’s open-source, present variations of PHP are repeatedly being improved and up to date by the group.

Being a standardized programming language, it ought to be no shock the majority of WordPress’ core code is constructed on PHP. While some would possibly discover this a bit technical, WordPress’ code typically executes on the server-side, which is why you want a management panel like cPanel or an area server to host a WordPress web site. This is the place PHP comes in.

In WordPress, PHP sometimes performs the function of placing collectively the web site pages from info saved in the WordPress database. So, when you’ve ever puzzled “is WordPress in PHP?” the reply is—sure, WordPress mainly consists of PHP code.

The database fields include values that correspond to the content material, design, format, and options of a WordPress web page. When a customer tries to load a web page out of your WordPress website, the PHP will likely be executed first to assemble the web page from the database settings earlier than sending it to the person.

PHP is a part of the explanation why WordPress is free and so extensible—as a generally used programming language, PHP lets builders create customized plugins or themes for WordPress and even make customized modifications to the underlying WordPress code. So, themes, plugins, and different WordPress content material sometimes consist principally of a bunch of PHP recordsdata.

The newest variations of PHP are being launched continuously—PHP has gone by way of 7 variations, and WordPress normally updates alongside every new model of PHP.

Although one of many advantages of WordPress is that customers don’t want technical coaching or skilled net improvement/design expertise to use it, it does require some information of PHP if you need to make superior customizations or modifications to your WordPress web site.

Even if that’s not the case, most WordPress customers ought to a minimum of know the steps to replace their PHP model.

How to Update PHP in WordPress

What you won’t know is that there’s a proper means and a unsuitable means to replace your PHP model. The unsuitable means is solely to leap straight into updating your PHP with none preparation or backing up your current configuration.

Why? Because if something goes unsuitable through the replace or your newest PHP bundle is corrupt, it may trigger severe issues on your web site. If you don’t have web site backups, you can lose loads of progress and even your total web site.

Generally, there’s a really small probability of a PHP replace breaking your web site, as new variations are steady and suitable. However, it’s higher to be protected than sorry, so despite the fact that and the most recent model of PHP is normally extra steady and safe than older ones, one of the best follow is to have a backup of your web site.

NOTE: The steps is perhaps considerably completely different primarily based on which internet hosting supplier you utilize. We created this information utilizing a WordPress web site hosted by Bluehost, because it’s among the best and hottest WordPress hosts. Nevertheless, most cPanel-based internet hosting suppliers ought to work virtually precisely the identical.

Step 1: Create a Backup of Your WordPress Site

Before we learn the way to replace your PHP model, we’ll first make sure you don’t lose any information or progress by making a backup.

Once once more, the steps would possibly look barely completely different relying in your internet hosting supplier, however ought to principally work the identical:

1. Log into your internet hosting supplier’s account dashboard:

2. In the lefthand menu, go to Advanced settings. This ought to take you to the cPanel dashboard, which ought to look kind of the identical for everybody:

Bluehost backup process step 2-min

3. Open the Softaculous WordPress Manager instrument, which ought to be underneath “Software” in the cPanel dashboard:

Bluehost backup process step 3-min

4. When Softaculous opens, click on on the “WordPress Manager” icon in the highest toolbar. This ought to present all of the WordPress websites you’ve put in:

Bluehost backup process step 4-min

5. If you scroll down, you’ll see the “Backup” button for every website:

Bluehost backup process step 5-min

6. On the following web page, you’ll have the option to affirm all the main points for the backup. Make certain these are appropriate so you possibly can safely proceed with updating your PHP model—except you want to change them, you possibly can go away the default settings as is. Then, click on the “Backup Installation” button to create the backup:

Bluehost backup process step 6-min

7. Softaculous will maintain you up to date on the progress of the backup and notify you by electronic mail when it’s prepared:

Bluehost backup process step 7-min

And that’s it! You ought to now have backed up your WordPress web site and might safely proceed with updating PHP.

Step 2: Checking Your Current PHP Version

Before you learn the way to replace it in WordPress, it’s helpful to understand how to examine your PHP model. Here are the steps to achieve this:

1. Log into your WordPress admin dashboard.

2. In the principle navigation menu on the left, hover over “Tools” and click on on “Site Health” in the dropdown menu. This is the place you possibly can examine the PHP model in WordPress in addition to different vital website particulars:

Check your PHP version - Step 1-min

3. That will take you to the Site Health web page. Click on the “Info” tab subsequent to the “Status” tab:

Check your current PHP version - Step 2-min

4. Scroll down to the “Server” possibility and click on on it to increase the panel with details about your WordPress server. You’ll see “PHP version” is without doubt one of the objects listed underneath the Server dropdown. Next to it, it’s best to see the present PHP model quantity—in this case, our WordPress PHP model is 8.0.17:

Check your current PHP version - Step 3-min

So, that’s the way you examine your PHP model in WordPress. If you don’t have essentially the most up-to-date model for no matter motive, you possibly can proceed with the next steps to replace your PHP.

Step 3: Update WordPress Core

Now that you understand how to examine the PHP model in WordPress, it’s time to really go forward and replace your WordPress core recordsdata.

As talked about, your WordPress web site principally runs on PHP, so it’s vital you replace your WordPress core set up to the newest model earlier than updating the PHP in your server to keep away from compatibility points.

Luckily, that is very simple to do:

1. Log into your WordPress dashboard and click on on “Updates” in the lefthand menu. A pink dot with a quantity will point out the accessible updates on your WordPress core recordsdata, plugins, or themes:

Update WP Core - Step 1

2. Below, we’re on the newest model of WordPress, so we solely have the choice to re-install model 6.0. You can even see your present model to decide what’s one of the best PHP model for WordPress. However, if there’s a more moderen WordPress model accessible, the re-install button will likely be changed with one to replace your WordPress model. All you want to do is click on the button, and WordPress will do the remainder:

Update WP Core - Step 2

DID YOU KNOW: All WordPress installations are set by default to mechanically keep up to date with the newest model. If you need to change this, you possibly can add the snippet “define( ‘WP_AUTO_UPDATE_CORE’, false )” to your wp-config.php file.

Step 4: Update Themes and Plugins

One of the important thing benefits of utilizing WordPress is the power to design and construct your web site utilizing themes and plugins. However, these instruments can break in the event that they don’t adhere to the identical PHP model as your WordPress set up, so it’s vital you replace these first earlier than continuing to replace PHP in your WordPress server.

Although some WordPress installations will mechanically detect outdated plugins and replace them, it’s best to at all times examine for your self when you’re doing a serious PHP replace. Here’s how you are able to do it:

1. Log again into your WordPress dashboard. WordPress ought to present if some themes or plugins are outdated by exhibiting a pink circle with a counter subsequent to “Updates,” “Appearance,” or “Plugins” in the lefthand menu:

Update themes and plugins in WP-min

2. Although you possibly can click on on any of the choices, we’ll use “Updates” for the needs of this tutorial. Once you click on on it, you’ll see the Update web page that comprises lists of all outdated plugins and themes, which we advocate you replace earlier than you replace PHP in your WordPress server. To achieve this, click on “Select All” or examine the precise plugins/themes you need to replace. Once you’ve chosen all of them, click on “Update Plugins” or “Update Themes”:

Update themes and plugins in WP - step 2-min

3. If the updates had been profitable, you’ll see the next web page. Keep in thoughts you have got to repeat the identical steps for plugins and themes individually:

Update themes and plugins in WP - Step 3-min

Step 5: Run a Compatibility Check (Optional)

If you have got any important plugins and also you’re anxious upgrading your PHP model would possibly break compatibility, it is a precautionary step you possibly can take to stop it. It’s at all times advisable to use the newest variations of all the things earlier than you progress on to the newest variations of PHP.

To examine the PHP compatibility of your plugins, you’ll want to set up a third-party plugin particularly for the job. For these steps, we advocate the PHP Compatibility Checker plugin:

1. Log into the WordPress dashboard, hover over “Plugins” in the lefthand menu, and click on on “Add New”:

Run a compatibility checkup - step 1-min

2. Search for the “PHP Compatibility Checker” plugin. When you discover it, click on “Install Now” after which “Activate”:

Run a compatibility checkup - Step 2-min

3. Go to “Tools” after which “PHP Compatibility” in the lefthand menu to open the plugin interface—normally, the plugin will present the present variations of PHP. You can select the PHP model you need to examine the compatibility for, in addition to which plugins and themes to scan. Click “Scan site” to provoke the scan:

Run a compatibility checkup - Step 3-min

When it’s performed, it’s best to see a listing of all of the plugins suitable with that PHP model. You ought to do that earlier than updating your PHP to see the way it might have an effect on your website.

Step 6: Update PHP Version

Like we stated earlier than, the steps is perhaps completely different relying in your internet hosting supplier or whether or not you host WordPress domestically. However, we created these steps utilizing Bluehost and cPanel, as most WordPress internet hosting providers are primarily based on cPanel.

Finally, we will now transfer on to updating your server to the most recent model of PHP:

1. Log into your internet hosting dashboard. Go to Advanced settings in the lefthand menu when you use Bluehost, or no matter possibility takes you to cPanel utilizing one other host:

Update php in wordpress - step 1-min

2. Scroll down to the “Software” part of the cPanel dashboard, search for the “MultiPHP Manager” icon, and click on on it:

Update php in wordpress - Step 2-min

3. In the MultiPHP Manager dashboard, you possibly can handle your PHP set up for every of your WordPress websites. In the “PHP Version” dropdown, be certain to choose the newest PHP model (PHP 8.1 in this case), and examine the field for the WordPress website you need to replace PHP for. When all the things is appropriately, click on the “Apply” button:

Update php in wordpress - Step 3-min

MultiPHP Manager ought to now undergo and replace the PHP model for all of the websites you’ve chosen. As you possibly can see, this instrument makes updating the PHP model of your WordPress server a breeze.

Step 7: Fix Possible Issues

As quickly as you do one thing main like updating your PHP, it’s best to instantly examine your website for potential points each as an administrator and as a standard web site customer.

In the admin panel, attempt to use a few of your plugins—use a number of the CMS instruments like creating pages and posts to see if any bugs come up.

Also, go to your web site from the entrance finish like a customer and take a look at all of your vital pages and take a look at to use a few of your web site’s options—for instance, filling in types, clicking hyperlinks or buttons, utilizing menus, and many others.

One factor it’s best to know is the newest PHP model isn’t at all times one of the best PHP model for WordPress.

If you do discover any points, it’s probably due to an incompatibility between the newest PHP model and your plugins. To see which plugin is inflicting the difficulty, you possibly can deactivate your plugins and themes one after the other. If the error stops occurring, you’ll understand it’s that plugin that’s affected. Your choices will then be to roll again your PHP model or go away the plugin deactivated.

If there are various points, it is perhaps greatest to first roll again your PHP model to when it was working appropriately. Keep checking when your plugins are suitable with the newest PHP model earlier than trying one other set up.

DID YOU KNOW: Statistics present that over half (52%) of all WordPress safety vulnerabilities are attributable to plugins, and the commonest root trigger is outdated plugins. So, among the best issues you are able to do on your web site’s safety is studying how to replace the PHP model in WordPress.

Key Takeaways

There are three issues to maintain in thoughts when altering your PHP model: the PHP model of your server, your WordPress model, and the PHP compatibility of your plugins.
Most WordPress web sites are configured to keep up to date by default, however you possibly can change this in the wp-config.php file.
Depending in your internet hosting supplier, you’ll both want to manually backup your WordPress web site in cPanel or use the backup options included along with your account.
Outdated WordPress installations, plugins, and themes are one of many main causes of safety vulnerabilities.
Even when you replace the PHP model in WordPress the suitable means, you would possibly nonetheless introduce some points by updating your PHP, so it’s best to at all times examine for errors afterward.

Benefits of Having the Newest PHP Version

Keeping the PHP model of your WordPress set up up-to-date is one in all your most vital upkeep duties as an internet site proprietor. Here’s why:

Most safety flaws are due to outdated plugins, themes, or WordPress core recordsdata. Plus, as PHP variations become older, hackers have extra time to determine potential vulnerabilities or safety loopholes. PHP builders are additionally repeatedly engaged on making the code extra inherently safe.

Although PHP isn’t a very sluggish or resource-intensive language, it’s additionally not among the many quickest net programming languages. So, PHP builders are repeatedly engaged on optimizing its efficiency. If you understand how to replace the PHP model for WordPress, you possibly can benefit from the efficiency enhancements of the newest variations, 7.4 and eight.0.

  • Search Engine Optimization

PHP isn’t a terrific language for search engine optimisation as a result of it has a considerably difficult and weird syntax, particularly in contrast to HTML. So, new PHP variations are repeatedly optimized for “lean and clean” code that doesn’t intervene with search engine indexing.

DID YOU KNOW: It’s estimated that roughly 80% of all web sites right now use PHP in one kind or one other. That places it in the 5 hottest languages in net app improvement right now, alongside JavaScript, HTML & CSS, and many others.


Hopefully, that solutions the query “how do I update PHP in WordPress?” Keeping your WordPress web site’s PHP model up to date and ensuring your WordPress core recordsdata, plugins, and themes are suitable is without doubt one of the greatest issues you are able to do on your web site. This sort of upkeep will play an enormous function in maintaining your web site bug-free, performance-optimized, and safe.


Please enter your comment!
Please enter your name here