Home Website Building Knowledge Standard Post

Standard Post

Is it necessary to upgrade to PHP 7.3 for website building? Methods to upgrade to PHP 7

Usually, when we build a website ourselves, we choose open-source programs, and the most popular open-source program for websites should be WordPress. WordPress runs on PHP. According to statistics, most sites are still using PHP 5.* versions, and before the publication of this article, the latest PHP version is PHP 7.3. PHP7...

Updated on November 1, 2019 About 2 minutes read
做网站有必要升级到php7.3吗?升级PHP7的方法

Usually, when we build a website ourselves, we choose open-source programs, and the most popular open-source program for websites should be WordPress.

WordPress runs on PHP. According to statistics, most sites are still using PHP 5.* versions, and before the publication of this article, the latest PHP version is PHP 7.3.

Does PHP 7.3 help improve website performance? How to upgrade the PHP version? Let's take a look.

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

Concurrent users: 15

Duration: 60 seconds

OPCache memory: 128MB

Twenty Nineteen default theme

Benchmark Test Results

PHP性能对比From the figure above, you can see the number of requests processed per second by different PHP versions. It is clear that the difference between PHP 7 and above and PHP 5.6 is very significant.

The best is PHP 7.3, so if your server can choose or upgrade to PHP 7.3, upgrading is a good choice.

How to Upgrade PHP Version

Method to Upgrade PHP using Baota Panel

In the software store of the Baota Panel, select PHP 7.3 and install it.

After installation, go to the website settings and select PHP version 7.3. (The previously installed PHP version can be deleted or retained.)

Method to Upgrade PHP using LNMP One-click Installation Package

After logging into SSH, navigate to the lnmp folder of your current version, then execute: .\/upgrade_php.sh

Go to http:\/\/www.php.net\/downloads.php to get the version number, enter the version number (e.g., 7.3.7), press Enter, then press Enter again to confirm and start the upgrade.

Method to Upgrade PHP on Shared Hosting

This method may not be supported by your virtual host.

If you are using cPanel, you can find a Select PHP Version option, then enter and select 7.3.

cpanel选择PHP版本

cpanel升级PHP版本

If your Shared Hosting uses the Directadmin panel, look for the PHP version switch icon. Then, select the corresponding PHP version.

Directadmin选择PHP版本

Note: In some Directadmin panels, the PHP version selection might be located within the site settings.

5/5 - (1 vote)
Previous What to do if website images load slowly_3 methods for website image acceleration Continue reading content around the same timeline. Next How to Use WHMCS Happy Edition License.php File View the next related tutorial or experience.

AI Website Building Assistant

🤖
Hello! I am the Naibabiji AI Assistant. How can I help you?
Quick Consultation: