Is it worth switching to a higher PHP version? Can it speed up the WooCommerce site? How to switch to a higher PHP version in WordPress? Can this help when your server's limits are out?
WP Desk team always encourages you to use the latest WordPress and plugin versions. Users are happily updating their scripts but sometimes they forget about checking the PHP version. From the information below you will find out why is it worth switching to a higher PHP version and how to do it for WordPress.
WP Desk Plugins →
There are 2 main reasons why one would want to switch the PHP version to the newer one for WordPress. What's more, plugins, themes, and WordPress itself may require a certain PHP version to work.
Performance
Performance tests conducted by Kinsta showed clearly that the latest PHP versions are faster in executing WordPress scripts. Such a performance boost can be even 100%, so when your WordPress site is slow or you are experiencing issues with exceeded memory limit, consider switching to a higher PHP version. These tests result can speak for themselves:
source: Kinsta
You may also read more on how to raise the wp memory limit in WordPress.
Security
Since 2017, PHP 5.6 has been no longer maintained by developers, and since 2019 the support for PHP 5.6. has been completely dropped. It means that no new security updates and performance patches are released. If there's a security vulnerability, it will not receive a patch. To improve your site's security, please switch to PHP 7.2 or 7.3, which are actively maintained.
How to switch to a higher PHP version for WordPress?
Depending on your hosting company, switching to a higher PHP version may look different. The most popular ways are:
- making a change in your server's admin panel
- editing the .htaccess file in the root directory of your site
- editing the php.ini file
if you are unsure how to do it, please contact your hosting provider and ask him to do it. You can also look for information in the support database of your web hosting. Remember that WP Desk recommends using PHP 7.2 or 7.3.