Updating your WordPress website to a recent PHP version is important to ensure that your site loads fast and is as secure as possible. In this article we’ll briefly explain what PHP is and how to easily check and update your website’s PHP version.
If you’ve been seeing the warning message below in your WordPress dashboard it means the server your website is hosted on uses an older version of PHP. Your hosting provider sets the PHP version your website uses at server-level. There is unfortunately no way to change the PHP version from the WordPress admin dashboard.
What is PHP?
PHP is short for Hypertext Preprocessor, it is a server side scripting language that is widely used in website development. Server side means that processing happens on the web server before anything is displayed in your browser. Server side scripting is usually hidden from the end user and you won’t see any PHP code in your browser.
WordPress is built on PHP and the core, themes and plugins use it extensively. You don’t need know PHP to use WordPress but you will need to make sure that your website uses a recent version of the software. This is important for the security and performance of your site.
How to Check Which PHP Version Your Website is Using
Before the Site Health tool was introduced in WordPress 5.2, a separate plugin was required to check the PHP version your website uses. If the Site Health tool isn’t available, the chances are your website is uses an older version of WordPress. We strongly recommend that you update to the latest version (currently 5.8).
You can check the PHP version your website is using in the WordPress admin dashboard by hovering over Tools and selecting Site Health.
If your website uses an older version of PHP you’ll see something like the following in Site Health:-
For more information about your WordPress installation, click on the Info tab at the top of the Site Health screen.
For information about the PHP version, you need to scroll down to and expand the Server section. Here you’ll see details about the hosting server and the version of PHP version your website is using.
WordPress and Compatible PHP Versions
At the time of writing this article, the latest version of PHP is version 8 and WordPress recommends a minimum of PHP version 7.4
WordPress will work with PHP versions as far back as version 5.6 but it’s important to note that all versions prior to PHP 7.3 are end of life (EOL). This means that they no longer receive updates and can leave your website exposed to security vulnerabilities.
PLEASE NOTE: As PHP 8 is still relatively new we don’t recommend it yet for a live site as there are still many WordPress themes and plugins that are not 100% compatible. At this stage it’s only important that your web server is running version 7.4.
Why You Need to Update Your WordPress PHP Version
PHP like WordPress is Open Source software which means anyone can study the source code to learn and improve it. This unfortunately also allows hackers to study the code and look for ways to break into websites. There are luckily thousands of developers and security experts who study the source code and report weaknesses and security bugs.
When security vulnerabilities are reported, development teams work on the necessary security upgrades to correct the problems. If you don’t update and continue to use older and deprecated versions, you won’t get the benefits of these upgrades.
Speed and Performance
Updating your PHP version can provide a 3 to 4 times increase in the performance and speed of your website. Google uses page load speed as an important ranking factor, so a faster loading website has SEO benefits and can help you rank higher in Google search results.
Updating your WordPress PHP version will ensure that your website is compatible with new WordPress core updates. Theme and plugin developers also introduce new features and functionality that are only available in the newer versions of PHP.
If you don’t update your PHP version you may find that WordPress core, theme and plugin updates no longer work on your website. This means that you won’t be able to take advantage any new features and functionality.
Before You Update Your WordPress PHP Version
If your’re using the latest version of WordPress and updated your themes and plugins when necessary you shouldn’t experience any problems after updating the PHP version. It is advisable however to test your website in a staging environment before updating your live site. This will prevent possible downtime if there are problems for any any reason.
Problems WordPress users experience after updating their websites PHP version are usually caused by themes and plugins that have not been updated by the developers for some time. In a staging environment you can test problematic themes and plugins. If there aren’t updates available you should reach out to the developer or look for alternatives.
If you are unsure of anything it’s also advisable to reach out to your website hosting provider or professional web developer for help.
Backup Your Website
Making regular backups of your WordPress website should be part of your routine. If you don’t already have a backup system in place, now is a good time to get one. There are many backup plugins available for WordPress like BackupBuddy, All-in-One WP Migration and UpdraftPlus. You’ll find more in the WordPress Plugin Repository.
A backup will ensure that you can restore your website in case something goes wrong.
Update Your Version of WordPress
Keeping your website updated with the latest version of WordPress helps to protect your site from hackers. You’ll also benefit from the new features and improvements that come with the latest version.
Update Your Themes and Plugins
Since we’ve updated WordPress to the latest version, it’s important to update all your themes and plugins. This will help to ensure compatibility with the new versions of WordPress and PHP.
How to Update the PHP Version in your Hosting Account Control Panel
In order to update your version of PHP, you’ll normally have to log into your hosting account control panel. We’ve used cPanel in this example as it’s used for many shared hosting accounts.
Updating Your WordPress PHP Version in cPanel
If your hosting account uses cPanel, you can check and update the PHP version like this:-
- Log into your cPanel and scroll down to the Software section. Click on Select PHP Version.
- You’ll be presented with the current PHP version your website uses and a list of versions your hosting provider supports.
- Select the version you want to use (in this case we selected version 7.4) and set to current.
- You’ll need to wait a few minutes while the server updates to the new version. You can go back into WordPress once it’s updated.
What if You Don’t Have Access to cPanel?
Your hosting account may use a different admin control panel like DirectAdmin or Plesk. Your hosting provider may also have their own custom account control panel. Changing your PHP version should be similar to the method we used above. If you need help, you should reach out to your hosting company as they may have specific instructions.
Updating the PHP version your website uses is important for both speed and security. It’s also critical for receiving future WordPress core, theme and plugin updates.