How to Use a Different PHP Version for a Single Site
Your hosting account has one default PHP version, but you can run a different one for a single site or folder when an app needs it. The quickest way is the MultiPHP Manager in cPanel, and for a single folder you can set it with one line in a .htaccess file. This guide shows both, with the exact handler line to use. Every JetHost hosting plan lets you pick the PHP version per domain from cPanel.
Why run a different PHP version
Different applications need different PHP versions. A newer app runs best on the latest PHP for speed and security, while an older plugin or script may break on a new version and need an older one. If you host more than one site on the same account, you can give each the version it needs instead of forcing them all onto one.
The easy way: MultiPHP Manager
For a whole domain, use the tool built for it. In cPanel, open MultiPHP Manager under the Software section, tick the domain you want to change, pick a version from the PHP Version dropdown, and click Apply. This is the recommended method and needs no code. For the full walkthrough, see how to change the PHP version on cPanel.
Set the version for one folder with .htaccess
When you only want to change PHP for a single folder, such as one app in a subdirectory, add a handler line to the .htaccess file in that folder. Open File Manager, go into the folder, and edit (or create) its .htaccess file. Add this line, which sets PHP 8.2 for every .php file in that folder and below:
AddHandler application/x-httpd-alt-php82 .phpSave the file, then reload your site. The folder now runs PHP 8.2 regardless of the account default. To change the version later, edit the number in the handler, and to go back to the account default, delete the line.
Pick the handler for your PHP version
The number at the end of the handler is the PHP version without the dot. Use the one that matches the version you need:
- PHP 7.4 →
application/x-httpd-alt-php74 .php - PHP 8.1 →
application/x-httpd-alt-php81 .php - PHP 8.2 →
application/x-httpd-alt-php82 .php - PHP 8.3 →
application/x-httpd-alt-php83 .php
Only use a version that JetHost supports and that is available on your plan. See the PHP versions we support. If a handler points to a version that is not installed, the folder returns an error, so pick one you can also see in the MultiPHP Manager dropdown.
Check which version is running
After the change, confirm the folder is on the version you wanted. The simplest check is a small file: create a file named info.php in the folder with the single line below, open it in your browser, and look at the version at the top. Delete the file afterwards, as it exposes server details.
<?php phpinfo(); ?>On JetHost hosting
The per-folder handler uses the alt-php name on our servers. Several PHP versions are available on every plan, and you can switch a whole domain from MultiPHP Manager in a couple of clicks. If a site needs a version you do not see, or the handler line gives an error, open a ticket and we will check what is enabled for your account.
JetHost Experts Tip
Prefer MultiPHP Manager for a whole domain and keep the .htaccess handler for a single folder that needs something different. Mixing both on the same domain makes it hard to tell which version is really running.
Frequently asked questions
Yes. Set each domain from MultiPHP Manager, or use a .htaccess handler line to give a single folder its own version while the rest of the account stays on the default.
Our servers serve PHP through handlers named application/x-httpd-alt-phpXX, where XX is the version without the dot. PHP 8.2 is alt-php82.
Delete the AddHandler line from the folder’s .htaccess file to return it to the account default, or change the version in MultiPHP Manager.
Need more help?
Not sure which PHP version a site needs, or seeing an error after the change? Open a ticket through Client Area → Support Tickets and we will check your account and set the right version with you.


