The use of an out of date model of WordPress core, plugins, or issues places your web page in peril. PHP isn’t any other.

Whilst WordPress technically works with some older variations of PHP, you’re sacrificing efficiency and compatibility, whilst opening your self as much as safety vulnerabilities via the usage of those.

For protection and balance, all the time purpose to make use of the WordPress really helpful variations of PHP.

On this submit, we’ll discuss methods to test what model of PHP you’re working, methods to replace your PHP to the really helpful model for WordPress, and the way a succesful website hosting supplier can maintain those components for you.

Bounce Hyperlinks for this Article:

Recognize for PHP

Should you glance on your WordPress web page folders, you’ll see numerous PHP information.

Since PHP powers a bulk of the core WordPress tool, it’s a extremely crucial language for the WordPress neighborhood.

PHP runs on more than a few platforms (Home windows, Linux, Unix, Mac OS X, and so on.), and is suitable with virtually all servers used as of late (Apache, IIS, and so on.).

No longer handiest is it a big a part of WordPress, however a big a part of the entire internet, powering 70% of all internet sites.

WordPress helps many variations of PHP, some even out of date, however as a common rule you can use handiest the ones with safety or solid fortify.

WordPress Suggestions

PHP must be up to date frequently, identical to WordPress core, issues, and plugins.

With PHP, each and every model receives fortify for 2 years after its preliminary unencumber, then there’s a length of every other 12 months the place handiest vital safety updates are launched, as wanted.

After this 3 12 months length, that model of PHP is not supported.

As of July 2021, the current recommended PHP version for WordPress is 7.4 or better.

High quality website hosting suppliers will normally require you to make use of the WP really helpful model of PHP to be able to use their servers, and can mean you can regulate your web page to be sure that the most recent model of PHP won’t ruin it.

As an example, we’ll check with ourselves (hiya, we’re happy with our website hosting!). WPMU DEV Hosting supplies your web page(s) with the most recent sanctioned PHP variations.

Upgrading (or downgrading) to more than a few variations is an easy procedure, finished via our Hub 2.0.

Infrequently, some 0.33 celebration plugins could also be outdated and purpose problems with the most recent model of PHP.

If so you’ll be able to search for updates, possible choices, or if essential, downgrade your PHP model to an older one (so long as it’s nonetheless actively supported with safety patch releases).

Click on right here should you’re desirous about our complete documentation on PHP through managed hosting in WPMU DEV.

PHP Versions WP Pie chart
Puny Helping (of) Pie — A miniscule 0.7% of websites use the latest model of PHP, whilst a minimum 36.6% use the really helpful model of PHP.

On occasion, much less respected, reasonable hosts won’t take the initiative to inspire you to improve your PHP as a result of the extra value of fortify time and assets that can assist you transition.

Since they don’t wish to ruin your web page via updating to more recent, really helpful variations of PHP, they’ll regularly go away your web page to make use of out of date variations of PHP and hope it is going overlooked.

PHP 7.2 made its debut in November 2017. Taking into consideration the 3 12 months rule, we comprehend it reached its Finish of Lifestyles cycle in November 2020 (in addition to the even older PHP variations prior).

This implies greater than one-third (37.2%) of WordPress websites are these days working variations of PHP which can be not actively supported.

That’s no longer the worst of it. Traditionally, there were prolonged sessions of time the place that quantity has hovered at or even exceeded two-thirds (66%)! That is problematic for a number of causes.

Why You Wish to Replace PHP


For one, there are super efficiency advantages that include the usage of the most recent model.

In line with speed tests conducted by Kinsta, throughout 7 variations of PHP, believe the next stats:

Benchmark results PHP versions (Kinsta)
PHP variations display demonstrable velocity variations.

You’ll see from the above desk that with each and every more recent model of PHP, the requests consistent with 2d get incrementally quicker.

Since the usage of the really helpful model of PHP takes much less time to serve the similar choice of requests, you’ll be able to give your guests a a lot better consumer revel in.

Kinsta additionally examined on PHP model 8, and I did wish to notice the rankings for it, because the enhancements in velocity actually proceed to development upwards.

With a benchmark results of 233.40 requests consistent with 2d, PHP 8.0 takes an enormous jump over PHP 7.4, proving to be 18.5% quicker.

Step again a couple of extra variations to 7.0, and it in fact handles 50% extra requests consistent with 2d, relatively.

I didn’t come with PHP model 8.0 in my chart, as a result of its fortify within the common WordPress purlieu may be very tough to evaluate. (WordPress 5.6 is right now thought to be beta compatible with PHP 8.0.)

Understanding this, please continue with warning and do thorough trying out prior to upgrading any the most important or consumer websites to PHP 8.0.


Keeping up code takes effort, and that effort is multiplied when you wish to have to make sure backward compatibility for added variations.

There’s a collective sigh of aid amongst overworked theme and plugin builders on every occasion WordPress bumps up the minimal really helpful PHP model, successfully knocking every other out of date model (and all of its related coding efforts) off the desk.

Quite than spending time parsing throughout the code to be sure that any adjustments to PHP don’t impact it, builders can spend their time including new options or bettering safety as a substitute.


Identical to plugins, issues, and WordPress core get updates to mend safety vulnerabilities, so does PHP.

This may be why the usage of a PHP model that also will get updates is so necessary; it protects you from vulnerabilities comparable to SQL injection, XSS and DoS assaults.

In line with safety vulnerability datasource CVE Details, there have been handiest 2 identified vulnerabilities present in PHP in 2021 YTD.

Evaluate this to the 14 vulnerabilities came upon in 2020, the 23 famous in 2018, and the 105 present in 2016, and you’ll be able to see why updating can lend a hand give protection to you from many identified safety exploits.

CVE vulnerabilities in PHP versions.
Selection of vulnerabilities consistent with PHP in a given 12 months.

It’s a question of indisputable fact that some hackers glance to look what model of PHP you’re working to resolve what sort of assault could be efficient.

An Aversion to Variations?

Step one in compatibility is understanding what model of PHP your web page is the usage of.

You’ll simply see this data proper inside the WordPress dashboard.

Pass to: Equipment > Website online Well being > Standing.

In case your web page will have to be the usage of a more recent model of PHP, it’ll be proven underneath really helpful growth.

Whether it is, then open the handed checks phase to make sure. You’ll see that it says Your web page is working the present model of PHP, adopted via the model quantity in parentheses.

WP Site Health, status passed tests
The WordPress dashboard Website online Well being display finds your PHP model.

Alternately, you’ll be able to move to Equipment > Website online Well being > Data > Server out of your web page Dashboard, to look what model of PHP you’re the usage of.

WP dashboard settings to view PHP model data.

The way to Replace PHP in WordPress

If you test to look what model of PHP your website hosting server is working, you’ll know if you wish to have to improve to the most recent model of PHP.

Should you do, checking your web page’s compatibility with the brand new model of PHP is crucial. You by no means wish to take a look at main adjustments like updating your PHP to your reside web page, as a result of if there are main incompatibilities, you might want to critically hinder or cripple your web page.

Because of this, it’s very best to create an alternative web page the place you’ll be able to take a look at your adjustments first.

Step 1: Create a Reproduction of Your Website online

Get started via getting a duplicate of your present web page. You’ll want all the information and a duplicate of the database.

You’ll do that via the usage of SFTP for your files and exporting a duplicate of your database the usage of MyPHP.

In some circumstances, you could possibly use your final backup, in case your backups come with each the information and the database.

It’s good to reduce the weight via the usage of a plugin made particularly for this process. Duplicator is a loose plugin presented on that has certain critiques.

If you need probably the most streamlined, painless procedure for duplicating your web page, and also you’re already the usage of WPMU DEV as your website hosting supplier, it’s your fortunate day!! Cloning is already part of your club!

With a couple of easy issues and clicks via our Hub 2.0, you’ll have totally configured, deployment in a position WP Websites in mere mins.

No longer already website hosting with us however wish to get at the bandwagon?! No drawback, simply click here.

For extra main points, see our documentation on cloning sites through WPMU DEV hosting.

Step 2: Create a Native or Staging Website online

After getting a duplicate of your web page, you’ll want to arrange a trying out setting. You’ll both use an area setting or arrange a staging setting in case your host lets in it*.

We now have a really perfect submit on how to set up XAMPP to your native pc if you wish to have lend a hand putting in your native setting.

As soon as your trying out setting is about up, you’ll be able to upload the information and database from the former step in your trying out setting, so you’ve gotten an actual reproduction of your reside web page.

Upon getting a duplicate of your web page on your trying out setting arrange, you’re in a position to improve the PHP model of your trying out web page.

*Webhosting via WPMU DEV contains the power to create a staging setting, and this can be a breeze to do. Click here for main points.


Now comes the joys section, and via a laugh, I imply the tedious process of QC-ing.

You’ll want to undergo your take a look at web page to be sure that not anything is damaged.

Pay cautious consideration to the vital capability of your web page. Take a look at processes, publication signups, feedback, internet bureaucracy, navigation, and all the different components that give a contribution to anticipated usability and customer engagement.

You need to catch any problems prior to they’ve an opportunity to wreak havoc to your reside web page and purpose a foul consumer revel in in your guests or shoppers.

To hand Equipment

There are some equipment that may lend a hand with the QC procedure, for devs and non-devs alike. Any problems came upon which can be outdoor your scope of information may also be intelligently relayed to fortify.

Error Log Monitor – This plugin will show a listing of PHP problems as an error log on your WordPress dashboard.

WP_DEBUG – No longer a plugin, reasonably a PHP consistent (aka, an enduring international variable), this can be utilized to cause debug mode during WordPress.

Turning on WP_DEBUG will help you see the PHP failure sorts in an effort to repair them on your code. It additionally means that you can see any deprecated purposes which can be working to your web page (ie, those who exist in WP however are not the usual option to carry out a specific process).

To activate debugging, head in your WordPress set up information, open the wp-config.php report (positioned within the root listing), and upload the next line of code close to the ground:

If that line of code already exists however says false, exchange it to true.

WP_DEBUG set to true
Be sure this code line in PHP suits the only on your report.

Take a look at this newsletter from our weblog, for a extra indepth have a look at using WP_DEBUG.

Solving Problems

If a plugin or theme is inflicting problems, determine the problem first to your take a look at web page, and discover a appropriate choice this is suitable with the most recent model of PHP.

If you’ve discovered an answer, head over in your reside web page and make the adjustments there.

Smush showing version of PHP
PeeHP the supported model when taking into account plugins in your web page.

While you’re searching for an acceptable plugin within the WordPress repository, take into account to test what variations of PHP are supported.


If you’ve labored via all the insects and kinks with compatibility, you’ll be able to both push staging to reside, or make any essential adjustments to the reside web page, after which exchange the PHP model to your reside web page.

This procedure will range from host to host, however will perhaps contain converting a environment on your website hosting cPanel. Some shared hosts won’t permit you to get entry to this environment, during which case you’ll want to succeed in out to them for help.

Right here’s a listing with directions on how to update the PHP version for a collection of popular hosts, together with WP Engine, Pantheon, Kinsta, Pagely, Bluehost, Hostgator, GoDaddy, and extra.

Webhosting with WPMU DEV contains our Hub interface, which a great deal streamlines converting your PHP model.

Getting access to PHP settings by way of WPMU DEV’s Hub.

Should you want a easy answer with a blank UI for checking or updating PHP variations, give WPMU DEV hosting a try, and take yet one more process off your plate.

PHP Host Partnering

Would you reasonably be in a Pretty Horrible Position, or a Professionally Happy Place? Rhetorical query… I actually simply sought after to play with that acronym. 🙂

Affordable, shared website hosting has satisfied numerous people who website hosting internet sites is an easy and simple procedure. In fact, there’s a lot that is going into keeping up your web page information and database.

Preserving all your tool up-to-date is among the duties that your host can and will have to mean you can with.

In the event that they’re unwilling that can assist you, or conceal variations to stay you at the hours of darkness, that’s a crimson flag that you’ll be able to do a lot better, and will have to critically believe switching hosts.

At WPMU DEV, our website hosting (sponsored via Virtual Ocean) leads the trade in price.

No longer handiest can we mean you can replace your PHP model, we additionally supply a large ole goody bag of options, comparable to safety, caching configuration, uptime tracking, devoted IP, nightly backups, loose & computerized migration, web site analytics, and extra.

Should you ever want lend a hand on compatibility problems along with your issues or plugins, or have questions on the rest WP, our top-rated fortify workforce is able to soar in and lend a hand, 24/7.

Additionally, each website hosting plan is roofed via our complete 30-day a refund ensure (we’ll fortuitously refund 100% of your cash if making a decision you don’t adore it).

Whether or not you host with us or in different places, bear in mind how much value your host can and should provide.

Make a selection an organization you’ll be able to consider to maintain the ones automation and replace duties, like retaining your PHP model present with WP suggestions.

Don’t let subpar website hosting scouse borrow your center of attention. You will have to be capable of commit your time and energies to the finer main points; making your websites shine with the skills that set you except the contest.

WordPress Developers

[ continue ]