Skip to main content
  1. Home
  2. Knowledge Base
  3. Server Questions
  4. How to Choose Your PHP Version

How to Choose Your PHP Version

Your GreenGeeks hosting account includes the ability to run your choice of several versions of PHP. This tutorial will show you how to change your PHP version using our cPanel interface.

Log in to GreenGeeks.

Click the cPanel button under the “Quick Server Login” section in your dashboard.

Open GreenGeeks cPanel

In the “SOFTWARE” section, click the “Select PHP Version” link or icon.

cPanel SOFTWARE select PHP version

Select the version you wish to use.

By default, the latest stable version (called the “native” version) will be selected and is already active. So if you wish to use the native version, you don’t need to make any of the changes described here.

Select PHP Version

When you click a PHP version other than the native version, the PHP extensions list will appear. Sometimes when choosing a new version, no extensions will be selected or activated.

sometimes no extensions will be selected

If no extensions are selected or activated for your new PHP version, click the “Reset to default” button. That will activate some of the most commonly used PHP extensions.

cPanel select PHP version - set as current

Click the “Set as current” link to save the PHP version change.

save PHP version change

Can I Run Multiple Versions of PHP on a single cPanel Account?

By default, GreenGeeks PHP Selector sets a single PHP version to use across the entire account.

Although not recommended, if you need to use a separate version of PHP for a specific site, or sub-folder, it’s possible to do this using custom .htaccess entries in that folder.

As an example, to set PHP 7.4, add the following lines to the top of the .htaccess file in the directory where the separate PHP version is to run.

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
 SetHandler application/x-httpd-alt-php74-lsphp
</FilesMatch>

To use another version of PHP, replace php74 with the version you need to run, ie for PHP 8.1:

 SetHandler application/x-httpd-alt-php81-lsphp

If you need help to run multiple versions of PHP under one cPanel, contact the Technical Support Team for assistance.

Configuring PHP Environment Variables

PHP Versions Available (as of May 2023)

  • 8.2.5
  • 8.1.18
  • 8.0.28
  • 7.4.33  [Default/Native version]
  • 7.3.33
  • 7.2.34
  • 7.1.33
  • 7.0.33
  • 5.6.40
  • 5.5.38
  • 5.4.45
  • 5.3.29
  • 5.2.17

If you run into any problems or have any questions, don’t hesitate to contact a member of our Support Staff by opening a ticket in GreenGeeks.

Was this article helpful?
Need Support?
Can't find the answer you're looking for?
Contact Support

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.