More often, you are required to upgrade the PHP version for your web applications in Windows VPS.

Here we have compiled steps on how you can safely upgrade the PHP version on Windows without breaking the current websites.

Here, we have assumed that the latest PHP version installed in your VPS is PHP 8.1, and we are going to upgrade it to PHP 8.2.

NOTE: When you upgrade to PHP 7, you will need to take one additional step to download and install the Visual C++ Redistributable for Visual Studio 2015.

Upgrade PHP Version

Step 1: Log in to your Windows VPS and download the ZIP file of the non-thread-safe version of PHP 5.4 from here.

Step 2: Navigate to php directory of your VPS. Most probably, you will find PHP at C:\Program Files (x86)\PHP\php-8.1 (assuming that PHP version 8.1 is the latest in VPS).

Step 3: Rename the folder php-8.1, like php-8.1.older OR anything you wish.

Step 4: Create a new folder with the same name as php-8.1.

Step 5: Now, extract the downloaded ZIP file into the created folder php-8.1.

Step 6: Locate the php.ini-production file in the php-8.1 folder and rename it to just php.ini.

Install Zend Guard and IonCube Loader

Step 1: Download the ZIP file of Ioncube Windows VC16 (Non-TS) (64 bits) from here.

Step 2: Extract Zend Guard loader and Ioncube ZIPs and copy files to the folder, C:\Program Files (x86)\PHP\php-8.1\ext.

Step 3: Edit the php.ini file, usually located at C:\Program Files (x86)\PHP\php-8.1.

Step 4: Add the following lines to the php.ini file and save it.

[Zend]
zend_extension = "C:\Program Files (x86)\PHP\php-8.1\ext\ioncube_loader_win_8.1.dll"
zend_loader.enable=1
zend_loader.disable_licensing=0
Was this answer helpful? 0 Users Found This Useful (0 Votes)