Updated: 28 September 2026 · Applies to: cPanel & WHM 138, PHP 8.1 to 8.4

suPHP is obsolete. On current cPanel servers you choose the PHP version per domain, and there are two ways to run a folder with a different version.

Recommended: a subdomain for the folder

  1. In cPanel, open Domains › Domains and create a subdomain (for example legacy.example.com) whose document root is the folder.
  2. Open Software › MultiPHP Manager, tick the subdomain, choose the PHP version and click Apply.

Each domain and subdomain can have its own PHP version this way, and cPanel keeps the settings consistent.

Per folder with .htaccess

cPanel writes the version as a handler line in .htaccess. A .htaccess file in a subfolder with another handler, for example AddHandler application/x-httpd-ea-php81 .php .php8 .phtml, makes that folder use PHP 8.1, provided that version is installed on the server.

Note: The per-folder method does not work for domains that use PHP-FPM with a fixed pool on every server setup, and it is easy to forget when you change versions later. If it does not take effect, use the subdomain method or ask our support team.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket