If you want your blog, your website or your Online Store works normally, it would be ideal to consider changing or updating the PHP version you are using on your website. The new version of PHP (PHP7) is not yet widespread enough, but it will not be long in coming, because it brings a lot of new features and it is very likely that it will be required for the installation or the use of the next versions of WordPress.
This article assumes that you have already created a website or 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 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 to secure your WordPress blog
These are all valid reasons, but before you go ahead and update your version of PHP, there are some downsides to upgrading that you should consider ...
Some important drawbacks to take into consideration ...
Switching to a newer version of PHP has some risks. Here's a very WordPress Plugin premium that will back up your entire website and restore it in the event of a failure.
The main thing that you need to keep in mind before you upgrade is that all your plugins, themes and scripts are not necessarily compatible with the latest version of PHP you want to use.
In the event of incompatibility, it is very likely that your website is no longer usable or that you notice many bugs. Moreover, 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 possible fixes, security fixes and code structure. While some updates are less complete than others, many versions offer improvements or changes that make parts of older versions obsolete.
See also 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 to 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 depending on your niche.
In addition to manually checking your website for 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, in fact, is that you can downgrade the previously activated version. In other words, if you notice any bugs, it is always possible to restore the previous version of PHP ... so switch from version 5.5 to version 7.x for example and if everything does not work well, you can go back to version 5.5.
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 to 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 any errors, you can enable a log to keep track of all the errors, which will help you to fix them more easily.
You can also activate manually un journal private error using " WP_DEBUG ". You can also see what has changed for each version of PHP before the upgrade:
- Migrating from PHP 4 to PHP 5.0.x
- Migrating from PHP 5.0.x to PHP 5.1.x
- Migrating from PHP 5.1.x to PHP 5.2.x
- Migrating from PHP 5.2.x to PHP 5.3.x
- Migrating from PHP 5.3.x to PHP 5.4.x
- Migration from 5.4.x PHP for PHP 5.5.x
- Migration from 5.5.x PHP for PHP 5.6.x
- Migration from 5.6.x PHP for PHP 7.0.x
- Migration from 7.0.x PHP for PHP 7.1.x
- Migration to the latest version of PHP
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 resolve the issue. If you need a helping hand, you can leave a comment in this article, I will be happy to provide 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
Click on any of the resources below to view details based on your server type:
Keep in mind that if you are using the commands provided in these links, you must also remove the old PHP package from your server. Since the commands to remove older versions will also vary depending on your server type, consult your server's documentation for the exact commands.
Update or change PHP 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 versions of cPanel. If this is not the case for you, you will need to contact your supplier.Web hosting for it.
I'll show you how to access it from your cPanel. Once you are connected, go to the "Software" section and then click on "MultiPHP Manager".
By clicking on it, you will come to the PHP version management 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 can be done in 3 simple steps as in 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 of PHP on your cPanel. You just need to go to MultiPHP Manager and change the version of PHP you want to use on each domain.
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.
- Introduction to understanding php errors on WordPress
- How to Fix Pluggable.php Files on WordPress
- What can you do with the functions.php file?
- ...
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.
Hello,
Unable to update wordpress which gives 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 to version 7.3 and I still have this blocking message. I no longer access my extensions either.
Is there anything else to update?
thanks a lot for your help
Very good day
Hi,
Please try to disable all plugins then try again.
Greetings I am currently using website templates. I have 3 sites, but I want to change one of my site templates, but I will set up a new template. Version 7 of php will be a white screen if the version of php was set to 5.9. But if I change my php version, my other sites will be corrupted.
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 am a beginner and I would like to understand, should I update the wamp version? or the php version if php how to proceed?
Hello,
You must update PHP. Please activate the 7 version if available on your server!
Hello, how much does it cost to upgrade your php?
Hi,
We no longer offer these services sorry.
Hello,
I allow myself to send you this email because I am currently in the process of completely redoing 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 computer novice (I take care of the Webdesign)
Can you tell me in detail the procedure to be able to update your PHP?
The website dates from 2 years.
Thank you in advance for your help and for the time you will give me.
Sincerely,
Hello,
Sorry, but we can not have documentation for all the hosts.