Skip to Main Content

How to modify or update the PHP version of WordPress

Divi: the easiest WordPress theme to use

Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

If you want your blog, your website or your Online Store is working normally, it would be ideal to consider modifying or updating the PHP version that you use on your website. The new version of PHP (PHP7) is not yet widespread enough, but it will not be long, because it brings a lot of novelties and it is very likely that it is required for the installation or use of the next version of WordPress.

This article assumes that you have already created a website or a WordPress blog. Otherwise, see this detailed guide.

But if you have already done so let's continue.

Why should you upgrade to PHP 7?

If you use WordPress on your server, you obviously have PHP already installed. So, why upgrade when everything seems to work so well?

Here are some of the most common reasons why you should consider upgrading your version of PHP:

  • The plugins and the scripts that you have installed are no longer compatible with the version you are using
  • The minimum requirements to run WordPress have increased
  • The version you are using has security flaws and the upgrade includes a patch
  • You need to migrate towards a more stable version
  • You want to test a different version on a WordPress installation or on a test environment
  • You have found conflicts between the version you are using and the plugins, themes, or scripts that you have installed

Have you ever thought about protecting your blog or website? here is Some tips for securing your WordPress blog

These are all valid reasons, but before you go ahead and update your version of PHP, there are disadvantages to the upgrade that you should consider ...

Some important disadvantages to consider ...

Switching to a newer version of PHP has some risks. Here is a premium WordPress plugin that will back up your website entirely and restore it in case of failure.

The main thing you need to keep in mind before doing the upgrade is that all your plugins, themes and scripts are not necessarily compatible with the latest version of PHP you want to use.

In case of incompatibility, it is likely that your website is no longer usable or you see many bugs. Besides, WordPress now tells you if a plugin is compatible with your version of PHP or not.

Each version of PHP offers new variations, improvements and corrections, security patches and code structure. While some updates are less complete than others, many versions offer improvements or modifications that make some parts of older versions obsolete.

Divi: The best WordPress theme of all time!

With over 600.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

Discover too Some WordPress security plugins for your blog

In some cases, whole versions such as PHP 4 and above are no longer supported. If you use plugins, themes, or scripts on your website that depend on outdated PHP code and upgrade to a newer version of PHP, this upgrade will make the code obsolete and thus break the operation. of your blog.

Although it is not DO NOT always the case, it is important to realize that the changes you bring will have consequences. In this way, you can consider the different compatibility issues. But if you need a premium WordPress theme that will always be up to date check out the following list according to your niche.

In addition to manually checking your website to discover the possible weak points, there are many plugins that will let you know whether or not your environment is compatible with the upgrade. The good news is actually being able to downgrade the previously activated version. In other words, if you notice any bugs, it is still possible to restore the previous version of PHP ... so to go for example version 5.5 version 7.x and if everything does not work well, you can go back to the 5.5 version.

Check PHP compatibility

Here are some plugins that you can use to check the compatibility of your environment with an updated version of PHP:

  • Compatibility Checker PHP - This plugin allows you to define a version of PHP and make an analysis compared to the current version of PHP of your host. It also creates a report, to tell you what to fix.
  • Error Log Monitor - If there are errors, you can activate a log to keep track of all errors, which will help you to fix them more easily.

You can also activate manually un journal vehicule of error using " WP_DEBUG ". You can also see what has changed for each version of PHP before the upgrade:

If you find that you are using a plugin, theme or script that is not compatible with the version of PHP you want to use, you can contact the author or developer to help you solve the problem. If you need a hand, you can leave a comment in this article, I will be happy to provide you with answers.

How to change the PHP version

So, once your blog has passed the compatibility test, you can change the version of PHP you are using via SSH or cPanel. If this is not an option to which you have access, contact your web host. In most cases, they can update for you or perform other tasks.

Upgrade via SSH (advanced users)

Since the SSH commands for upgrading or installing other versions of PHP are different depending on the type of server, then there are no universal commands that work everywhere.

Protect your blog or website by consulting our tutorial: Sucuri: An effective tool to protect against attacks on WordPress

Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

Click one of the resources below to view details based on your server type:

Keep in mind that if you use the commands provided in these links, you must also remove the old PHP package from your server. Because the commands to delete old versions will also vary depending on your type of server, check your server documentation for exact commands.

PHP update or modification in the cPanel

If you prefer to choose In a few clicks a version of PHP for your server, you can do this by logging into your cPanel account. However, this option is only available in default cPanel versions. If this is not the case at home, you will need to contact your web hosting provider for this.

I will show you how to access it from your cPanel. Once you are logged in, go to the "Software" section and then click on "MultiPHP Manager".

Clicking on it will take you to PHP versioning for the different domains & subdomains available. All you have to do is choose the right version of PHP and apply it to the domain of your choice.

The procedure to follow can be done in 3 simple steps like on the following image:

You will notice that the interface will be similar to the one offered by the WHM (if you have a dedicated server).

How to edit from the WHM

If you have a server, you probably have a WHM installation, which allows you to manage your server. From the WHM, you can also change the version by default PHP on your cPanel. Just access MultiPHP Manager and change the version of PHP you want to use on each domain.

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [FREE]

The version backup is done automatically when you change version.

Recommended Resources

To go further, we will recommend some articles that will help you understand how having an updated php version is important.

Conclusion

That's about all you can do to update your version of PHP. If you have any questions, feel free to leave them in the comment section. You can also discover additional resources by going to this page.

And if you liked this article, share it on your different social networks.

This article features 9 comments
  1. Hello,
    Can not update wordpress that puts me this message
    Important: Before updating, please back up your database and files. For help with updates, visit the Updating WordPress Codex page.
    I wrote to my host who asked me to update my php version 7.3 and I still have this message blocking. I no longer access my extensions.
    Is there anything else to update?
    thanks a lot for your help
    Very good day

  2. Greetings I am currently using website templates. I have 3 sites, but I want to edit one of my site templates, but I will configure a new template. The 7 version of php will be a blank screen if the php version was set to 5.9. But if I change php version, my other sites will be corrupted.

  3. After creating my database for my project, I refreshed to work with wordpresse in wamp, here is the message I got.
    (Your server uses the 5.5.12 version of PHP but WordPress 5.2 requires at least the 5.6.20 version)
    i start and i would like to understand, should i update v wamp? or, php version if php how to proceed?

  4. Hello,

    I allow myself to send you this email because I am currently redoing entirely the site of one of my clients under WordPress.
    However some plug-ins require the update of the PHP. (Requires the 5.4 version or higher of PHP, the extension is currently not active.)
    My host does not answer me and I am a novice in computer (I take care of Webdesign)
    Can you tell me in detail how to update your PHP?
    The website dates from 2 years.

    I thank you in advance for your help and the time you will give me.

    cordialement,

Leave a comment

Your email address will not be published. Required fields are marked with *

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Back To Top
3 shares
Share1
tweet1
Save1
WhatsApp