Upgrading PHP version on a Linux-based Plesk server is a simple process. Follow these steps to ensure a smooth PHP upgrade.
Step 1: Connect to Your Server
Log in to your Linux Plesk server via SSH as the root user.
ssh root@your-server-ip
Step 2: Navigate to the Source Directory
Switch to the /usr/local/src directory:
cd /usr/local/src
Step 3: Install Atomic Repository (If Not Installed)
Plesk uses Atomicorp repositories for PHP updates. Run the following command to install it:
wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh
Step 4: Upgrade PHP Version
Run the following command to upgrade PHP:
yum upgrade php
🔹 This will update PHP to the latest version available in the repository.
Step 5: Restart Plesk Services
After upgrading PHP, restart Plesk services to apply the changes:
/etc/init.d/psa stopall
/etc/init.d/psa startall
Step 6: Verify PHP Version
To confirm that the upgrade was successful, check the installed PHP version:
php -v
✅ Example Output:
PHP 8.2.10 (cli) (built: Oct 20 2024 12:34:56)
Copyright (c) The PHP Group
Zend Engine v4.2.10
Final Check & Testing:
✔ Test your website functionality after the PHP upgrade.
✔ Update PHP extensions if needed.
✔ Modify php.ini settings for optimal performance.