How to Upgrade PHP to Version 7.3 on a VPS?
PHP is one of the most popular programming languages worldwide and is constantly updated to improve performance and security. If you have a VPS (virtual private server), you can upgrade PHP to the latest version 7.3 to take advantage of new features and enhancements.
But how exactly do you do it? In this article, we’ll walk you through the process of upgrading PHP to version 7.3 on a VPS step-by-step.
Step 1: Checking the Current PHP Version
Before upgrading PHP, you need to find out which version you currently have installed. To do this, execute the following command in your terminal:
php -v
This command will display the current PHP version on your server.
Step 2: Adding the Ondřej Surý Repository
To install PHP 7.3 on your VPS, add the Ondřej Surý repository, which contains the latest PHP versions. Execute the following commands:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Step 3: Installing PHP 7.3
Now you can install PHP 7.3 on your VPS by executing the following command:
sudo apt-get install php7.3
Step 4: Verifying the Installation
To ensure that PHP 7.3 has been successfully installed, execute the following command:
php -v
If you see PHP 7.3 as the version, then the upgrade was successful!
Now you can enjoy the new features and improvements of PHP 7.3 on your VPS server. Good luck!