Customize PHP Versions and Settings Per Domain with Ease
Modern websites often rely on PHP, and different applications may require different versions to run properly. For example, WordPress might work best on PHP 8.2, while an older CMS may only support PHP 7.4. Managing these differences is simple with cPanel’s MultiPHP Manager.
This tool allows you to switch PHP versions per domain or subdomain and align your hosting environment with the specific needs of each site—without affecting the entire server.
In this guide, you’ll learn how to use the MultiPHP Manager to switch PHP versions and apply custom settings across your domains.
What Is MultiPHP Manager?
MultiPHP Manager is a feature in cPanel that lets you:
-
Assign different PHP versions to different domains or subdomains.
-
Adjust PHP handlers and system-wide settings (if you have root/WHM access).
-
Ensure compatibility for a variety of scripts, frameworks, and CMSs.
Why PHP Version Management Matters
-
Security: Newer PHP versions receive active security updates.
-
Performance: Each PHP release typically includes performance improvements.
-
Compatibility: Some apps or themes/plugins only work with specific PHP versions.
Using the wrong version can lead to errors, deprecated functions, or even a broken site.
How to Change PHP Version Using MultiPHP Manager
Step 1: Log in to cPanel
Access cPanel via yourdomain.com/cpanel
with your credentials.
Step 2: Open MultiPHP Manager
Scroll to the Software section and click on MultiPHP Manager.
Step 3: Select the Domain
You’ll see a list of all domains and subdomains on your hosting account.
-
Check the box next to the domain you want to change.
-
In the PHP Version dropdown on the right, select the desired version (e.g., PHP 8.1, 8.2, or 7.4).
Click Apply to save the changes.
The new PHP version takes effect immediately. You can test your site afterward to ensure everything works properly.
How to View the Current PHP Version
In MultiPHP Manager, the current PHP version for each domain is listed under the PHP Version column. This makes it easy to monitor and standardize settings across multiple domains.
Managing PHP Settings Per Domain
While MultiPHP Manager handles PHP version selection, changing specific PHP configuration values (like memory_limit
, upload_max_filesize
, or max_execution_time
) requires the MultiPHP INI Editor.
To change PHP settings:
-
Go back to the Software section in cPanel.
-
Click MultiPHP INI Editor.
-
Select the domain you want to modify.
-
Under Basic Mode, adjust common settings.
-
For advanced control, switch to Editor Mode to directly edit the
php.ini
configuration file.
Click Apply when done.
Common Use Cases
-
Run WordPress on PHP 8.2 for better speed and compatibility with modern plugins.
-
Host legacy apps that still require PHP 7.4 or older (if supported by the host).
-
Test new PHP versions on a staging subdomain before applying to live sites.
-
Resolve errors related to deprecated functions by downgrading temporarily.
Final Tips
-
Always check your application’s documentation for supported PHP versions.
-
Back up your site before making major version changes.
-
After switching versions, test thoroughly to catch any errors or compatibility issues.
-
Use a staging environment to safely test new PHP versions or configurations.
Conclusion
The MultiPHP Manager in cPanel gives you the flexibility to manage PHP versions and configurations on a per-domain basis—perfect for multi-site hosting, development workflows, and compatibility testing. It’s a powerful yet user-friendly tool that lets you maintain security, performance, and stability across your entire hosting environment.
By using it wisely, you ensure your websites run smoothly and stay up-to-date with PHP advancements.