Because PHP is essential to WordPress, it’s also a central part of site performance. TrulyWp makes it easier for users to update and or change PHP versions for their installed WordPress sites individually via the Trulywp dashboard. We highly recommend using PHP 7.3 as this is the latest PHP version with elevated protection, resource-friendly and much faster than its predecessors.
With the continuous development and upgrade of the PHP programming language, PHP versions generally have a life cycle of three years, after which it should no longer be used. Each release is maintained for two years and receives an additional year of security update and support. With PHP, it is best practice to move with the trend and continually update your PHP site versions for optimal site performance.
WHY UPDATE YOUR PHP VERSIONS
Upgrading your site’s PHP to the current version comes with several benefits. It protects your website against security vulnerabilities, as well as provides continual support from the PHP team. With each version upgrade in PHP comes a significant leap forward in performance. For example, PHP 7.0 was a huge leap forward more than doubling performance with indices such as speed, resource optimization, and security compared with the previous version 5.6. After the launch of version 7.0, a remarkable forward-leap in performance was observed also.
To ascertain the version of PHP you are using on your WordPress site, on your admin dashboard, go to “Site Health” >> Tools
How to safely update PHP versions
Before embarking on a PHP update for your WordPress site, it is good practice to first test your WordPress site for compatibility. This is quite simple, with a few steps on Trulywp. Some users might require additional troubleshooting, especially when there are compatibility issues; this mostly happens when you are using an older version of PHP such as 5.6.
- Step 1: Create a staging site
- Step 2: change PHP engine
- Step 3: Test site
Step 1: Create a staging site:
Create a staging site the first step to follow in updating the version of your WordPress site is to create a staging environment. This is separate from your live website and enables you to make tests, updates and troubleshoots without breaking your live site. See the article about the staging environment.
Go to your TrulyWp dashboard, click on sites at the top menu bar, a list of your installed sites is displayed. Click to select the one you would like to push to a staging area (the site you intend updating PHP version on). Click to change from live to staging on the drop-down menu that appears at the top right of your Trulywp dashboard.
Note: disable any third-party CDN running on your site; this is because your staging site uses a different URL.
Step 2: Update/change PHP engine
To change your PHP version, go to your TrulyWp dashboard, click on sites at the top menu bar, a list of your installed sites is displayed. Click to select the site you intend updating PHP version on. Then click on the “Advanced” option, which is the last tab on the right-option pane. A field with a drop-down containing a list of available PHP versions appears. Select from the options which one you want to change to. We recommend testing the current version (7.3). If your site encounters any problems, then you can revert to a lower version.
After selecting the PHP version you want, click the “switch PHP version” tab to change your PHP version. You will get a prompt, click on the “switch PHP version” tab to confirm your selection.
This process may take up to two minutes. At the end of the process, your PHP engine will be restarted with your selected version.