Running a separate application on a different PHP version in cPanel

A folder does not automatically receive an independent PHP runtime under every cPanel handler. For an application needing a different supported version, a separate domain or subdomain with its own document root is usually the clearer managed configuration.

What you need before you begin

Identify the application’s PHP and extension requirements, current handler and document root. Back up the site and plan any URL changes. PHP-FPM operates at the virtual-host or pool scope, so old per-folder .htaccess recipes may not apply.

01 Run a separate application on a different PHP version in cPanel

  1. Create an appropriate subdomain or separate domain entry using Domains, with a distinct document root for the application.
  2. Open MultiPHP Manager, select that hostname and assign the required available PHP version.
  3. Place the application in its assigned root and configure its base URL, database and HTTPS according to the application’s instructions.
  4. Test its effective runtime and required extensions. Verify the original site still uses its intended version.
  5. If the application must remain under a path such as example.com/app, ask support to confirm a supported handler arrangement instead of copying a version-specific AddHandler line from another server.

Confirm the expected result

Test both applications independently, including background jobs and command-line tasks that may use a separate PHP binary. Confirm no document root is unintentionally shared.

Can .user.ini select a different PHP executable version?

A .user.ini file changes permitted PHP directives, not the PHP executable version. If a copied handler causes downloads of PHP source or server errors, remove the unsafe change and restore the backed-up configuration immediately. Do not use an unsupported runtime as a permanent substitute for application maintenance.

  • 0 Users Found This Useful
  • cpanel-whm, development
Was this answer helpful?

Related Articles

Changing the PHP upload_max_filesize limit with CloudLinux in cPanel

upload_max_filesize sets the maximum size of an individual uploaded file accepted by PHP. The...

Changing the PHP post_max_size limit with CloudLinux in cPanel

post_max_size limits the size of the entire HTTP POST body received by PHP. It includes...

Managing PHP extensions with CloudLinux in cPanel

Extensions add capabilities such as database access, multibyte text handling, image processing...

Configuring allow_url_fopen with CloudLinux in cPanel

allow_url_fopen controls whether PHP file functions can use supported URL wrappers, such as...

Configuring PHP error display and logging with CloudLinux in cPanel

PHP errors are useful for diagnosis, but displaying them on a public site can expose filesystem...