Usually, when we build websites ourselves, we choose open-source programs, and among website open-source programs, WordPress likely has the largest user base. WordPress runs on PHP. According to statistics, most sites are still using PHP 5.* versions, and before this article was published, the latest PHP version was PHP 7.3. Does PHP 7.3 performance help improve website performance? And how to upgrade the PHP version? Let's take a look together.
Testing Environment
WordPress Version 5.1 Server:
Linode2 cores, 4GB RAM, 48GB SSD PHP Versions: 5.6, 7.0, 7.1, 7.2, and 7.3 User Concurrency: 15 Duration: 60 seconds OPCache Memory: 128MB Twenty Nineteen default Theme
Benchmark Test Results

From the chart above, you can see the number of requests processed per second by different PHP versions, indicating a very significant difference between PHP 7 and above versions and PHP 5.6. The best performer is, of course, PHP 7.3. So, if your server can choose or upgrade to PHP 7.3, upgrading is a good option.
How to Upgrade PHP Version
Method to Upgrade PHP in Baota Panel
In the Software Store of Baota Panel, select PHP 7.3 and then install it. After installation, go to the website settings and choose PHP version 7.3. (Previously installed PHP versions can be deleted or kept.)
Method to Upgrade PHP in LNMP One-Click Package
After logging into SSH, navigate to your current version's lnmp folder, then execute: `./upgrade_php.sh`. Go to http://www.php.net/downloads.php to get the version number, enter the version number, such as 7.3.7, press Enter, and press Enter again to confirm to start the upgrade.
Method to Upgrade PHP in Shared Hosting
This method is not certain whether your Shared Hosting supports it. If you use cPanel, you can find an option called Select PHP Version, then go in and choose 7.3.

If your Shared Hosting uses Directadmin Panel, then select the PHP version switch icon. Then choose the corresponding PHP version.

Note: Some Directadmin Panels may also have the PHP version selection in the site settings.
Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.