Learn how to change the PHP version on your domain using cPanel? (Video)

Changing the PHP version for your domain using cPanel is a simple process. This can help you optimize your website's performance or ensure compatibility with specific scripts. Here's how to do it.


Step 1: Log in to cPanel

  1. Open your browser and navigate to your cPanel login page (e.g., https://yourdomain.com:2083).
  2. Enter your username and password, then click Log in.

Step 2: Locate the PHP Selector Tool

  1. In the cPanel dashboard, scroll down to the Software section.
  2. Click on MultiPHP Manager or Select PHP Version, depending on your hosting provider.

Step 3: Choose the Domain

  1. In the MultiPHP Manager interface, you’ll see a list of all domains and subdomains associated with your cPanel account.
  2. Select the domain or subdomain for which you want to change the PHP version by checking the box next to it.

Step 4: Change the PHP Version

  1. In the PHP Version dropdown menu, select the version you want to use (e.g., 8.1, 7.4, etc.).
    • Choose the version that is compatible with your website and scripts.
  2. Click Apply to save the changes.

Step 5: Verify the PHP Version

  1. To confirm the change, you can create a PHP info file:
    • Go to File Manager and create a new file named phpinfo.php in your website's root directory (e.g., public_html).
    • Add the following code to the file:

                         <?php

                         phpinfo();

                         ?>

 

    • Save the file and access it in your browser (e.g., https://yourdomain.com/phpinfo.php).
    • Check the displayed PHP version.
  1. Delete the phpinfo.php file after verification to avoid exposing sensitive server information.

Optional: Customize PHP Settings

If your hosting provider allows it, you can also adjust specific PHP settings:

  1. In the Select PHP Version tool, click Options or PHP Settings.
  2. Adjust values like memory_limit, upload_max_filesize, or post_max_size to suit your needs.
  3. Save the changes.

Tips for Changing PHP Versions

  • Backup Your Website: Before switching PHP versions, back up your website to avoid data loss in case of incompatibility.
  • Test Compatibility: Ensure your website and plugins/scripts are compatible with the selected PHP version.
  • Contact Support: If you encounter issues, consult your hosting provider's support team for assistance.

Changing the PHP version in cPanel allows you to optimize your website's performance and keep it compatible with modern standards and security protocols.

 

 

 

 

  • 100 Users Found This Useful
Was this answer helpful?

Related Articles

How to Download Backup using cPanel? (Video)

Downloading a backup using cPanel is a straightforward process. Here's a step-by-step...

How to generate a cPanel backup and sent it to FTP Server? (Video)

Generating a cPanel backup and sending it to an FTP server is a straightforward...

How to restore a backup in cPanel? (Video)

Restoring a backup in cPanel is straightforward and allows you to recover your website’s data...

How to change an account password in cPanel? (Video)

Changing an account password in cPanel is simple and can be done in a few quick steps. Follow...

How to update your contact information in cPanel? (Video)

Updating your contact information in cPanel is important to ensure you receive critical...