If you have been a proud WordPress website owner for a while, you have probably heard that you should either check or update the PHP version of your WP site from time to time.
Using the latest PHP version on your website can improve site performance and speed. For example, PHP 7.0 has double the performance compared to the 5.6 version.
In this article, we’ll show you how to update PHP in WordPress in just a few steps. Let’s get started!
Why should you update the PHP version of your site?
Before you move on to updating the PHP version of your site, it’s good to ask yourself what the update will mean for your website.
As you probably know, WordPress is developed using an open-source programming language, PHP. For your WordPress to work properly, we recommend you use PHP version 7.4 or higher. That’s why most WordPress hosting providers use PHP versions 7.4 or higher. Keep in mind that WordPress hosts usually update the PHP version in the background and that these updates do not affect most websites, so you may not notice any change.
With every PHP update, your WordPress website improves performance, as the newer version runs processes faster and reduces memory usage. For you, the user, this means that your WP website will load faster on a server, increasing the site speed.
How can you check the current PHP version in WordPress?
You can check the current PHP version of your WordPress website in a few quick steps:
1. Log in to the WordPress Admin panel (WordPress Dashboard).
2. Navigate to Tools → Site Health.
3. Switch to the Info tab.
4. Scroll down to the Server tab. Click on it.
5. The section will show you server information, including the PHP version used on your website.
How to update PHP in WordPress
Some WordPress hosting companies allow you to change the PHP version used on your site, and the steps to updating the PHP version vary from company to company.
Most commonly, you have to find a PHP Manager, like a MultiPHP Manager or a cPanel, and then select the PHP version you wish to use.
If you cannot find the option, be sure to contact the hosting provider and ask them to change the PHP version for you. Reliable hosting providers should keep everything up to date, ensuring your website uses the PHP 7.4 version or higher.
What steps should you take after updating the PHP version?
Once you update the PHP version, you should ensure that your website is working correctly.
First, visit your website to check if there are any visible issues. Then, we suggest you back up your website, just in case. 🙂 Lastly, log in to the WordPress admin panel to see whether the plugins and theme you are using are up to date. If they are not, you should update them to ensure they are compatible with the latest PHP version.
What should you do if the PHP update breaks your site?
Don’t worry; there is a slim chance that your website will break due to the PHP update. However, in some cases, it happens: if a website is filled with numerous free and paid plugins, it might result in a site break.
If such a thing occurs, we advise you to check your plugins or theme to make sure that they are not the ones causing the errors. So, deactivate the plugins and switch to a default WordPress theme. If a plugin on your WordPress website doesn’t behave as it usually does, it might have to do something with the incompatibility with a newer PHP version. In that case, we recommend you switch back to the older PHP version until the plugin creators fix the issue.
If the errors are still present, contact your hosting provider ASAP. If they are not able to give you a hand, downgrade the PHP version you are using (the same way you upgraded it). Once you return to the previous version, the issues should be resolved.
Final thoughts
We hope this post helped you understand how to update PHP in WordPress. If you are having trouble with the update, feel free to send us an email一we are happy to help.