How to Update PHP Version in Plesk Panel

PHP is the backbone of many websites and applications, including WordPress, Joomla, and Laravel. Keeping your PHP version up to date is essential for security, performance, and compatibility with modern web technologies. Plesk, a popular web hosting control panel, allows users to manage and update PHP versions effortlessly.

In this guide, we will walk you through the process of updating your PHP version in Plesk, ensuring your website runs smoothly and securely.

Why Update PHP in Plesk?

Updating your PHP version offers several benefits:
Improved Security – Older PHP versions may have security vulnerabilities that hackers can exploit.
Better Performance – Newer versions of PHP are optimized for speed and efficiency.
Compatibility – Many CMS platforms, plugins, and scripts require updated PHP versions to function correctly.

Prerequisites

Before updating PHP, ensure that:
You have access to your Plesk control panel.
Your website and applications are compatible with the newer PHP version.
You create a backup of your website to avoid potential issues.

Step-by-Step Guide to Updating PHP in Plesk

Step 1: Log into Plesk

  1. Open your browser and go to your Plesk login page (e.g., https://yourdomain.com:8443).

  2. Enter your Plesk username and password, then click Log in.

Step 2: Navigate to PHP Settings

  1. Once logged in, go to the Websites & Domains section.

  2. Locate the domain or subdomain you want to update.

  3. Click on PHP Settings under the domain name.

Step 3: Select the New PHP Version

  1. Under PHP Support, you will see a dropdown menu labeled PHP version.

  2. Click the dropdown and select the latest stable PHP version available (e.g., PHP 8.2).

  3. You can also modify additional PHP settings like memory limit, max execution time, and error reporting, depending on your requirements.

Step 4: Apply and Save Changes

  1. After selecting the new PHP version, click the Apply button.

  2. Then, click OK or Save to confirm the changes.

Step 5: Verify the PHP Update

To ensure that your PHP update was successful:

  1. Go to Tools & Settings > PHP Settings to confirm the selected version.

  2. Alternatively, create a phpinfo.php file in your website’s root directory:

    • Open your file manager and create a new file named phpinfo.php.

    • Add the following code:

    • Save the file and visit https://yourdomain.com/phpinfo.php in your browser.

    • You will see detailed PHP information, including the active version.

Troubleshooting Common Issues

1. Website Not Loading After Update

🔹 Try switching back to an earlier PHP version to check if the issue is version-related.
🔹 Check for compatibility issues with plugins and themes.

2. Error Messages Displaying on the Website

🔹 Enable display_errors in PHP settings to diagnose the issue.
🔹 Update outdated plugins or scripts that may not be compatible with the new PHP version.

3. PHP Version Not Updating

🔹 Ensure that your server has the required PHP versions installed.
🔹 Restart your web server from Plesk’s Tools & Settings > Restart Web Server option.

Updating your PHP version in Plesk is a straightforward process that improves security, performance, and compatibility. Regularly updating PHP ensures that your website remains protected against vulnerabilities and runs efficiently. If you encounter any difficulties, consult your hosting provider for assistance.

By following this guide, you can safely update your PHP version and maintain optimal website performance.