Knowledgebase

Back to StackCP

How to Change PHP Version


Standard PHP Version

By default, new hosting packages run PHP 8.0. If you need to switch PHP versions:

  1. Login to StackCP by following this guide

  2. Under Web Tools , select Change PHP Version.


Available PHP Versions

We support the following PHP versions on our Linux platform:

- PHP 5.3
- PHP 5.4
- PHP 5.5
- PHP 5.6
- PHP 7.0
- PHP 7.1
- PHP 7.2
- PHP 7.3
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3
- PHP 8.4

InfoNote : Version changes are typically instant but may take up to 60 seconds.


Managed WordPress Platform

On our Managed WordPress Platform, we run PHP 7.0 and higher.

Note: PHP versions prior to 7.0 are not supported on the WordPress
platform.


Changing PHP Version for Subdirectories/Subdomains

Note : This method is applicable only to shared hosting packages and is
not supported on Managed VPS or Cloud Servers.

To host multiple websites on the same package using different PHP versions:

  1. Navigate to the directory where you want to change the PHP version.

  2. Edit or create a .htaccess file.

  3. At the top of the file, add the following line to set the PHP version:
    - For PHP 8.3: AddHandler x-httpd-php83 .php
    - For PHP 7.4: AddHandler x-httpd-php74 .php
    - For PHP 5.6: AddHandler x-httpd-php56 .php


Changing PHP Version for WordPress Staging

To change the PHP version for a WordPress staging site:

1. Navigate to staging_html within your WordPress package.
2. Add the appropriate AddHandler line to the .htaccess file with the
desired PHP version.



Related Articles

How do I connect via FTP?
How To Access Your Account Via SSH
How to Use the Content Delivery Network (CDN)
How do I log into StackCP
Maximum MySQL Database Size

Can’t Find what you need?

No worries, Our experts are here to help.