Short answer: Open cPanel Select PHP Version, choose your preferred PHP release from the dropdown, click 'Set as current', and toggle required extensions like opcache, imagick, and redis. We recommend PHP 8.4, or 8.5 if your script supports it.
Switch between any PHP version from 7.4 to 8.5 and toggle specialized modules (mbstring, curl, gd, pdo) in cPanel.
Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup
Quick reference
| Tool Location | cPanel > Software > Select PHP Version |
|---|---|
| Supported Versions | PHP 7.4 to 8.5 |
| Recommended version | PHP 8.4, or PHP 8.5 if your script supports it |
| Architecture | CloudLinux CageFS isolated environment per cPanel user |
Steps
- Access PHP Selector: Under Software in cPanel, click Select PHP Version.
- Change PHP Version:
- Click the Current PHP Version dropdown.
- Select your target version (we recommend
8.4, or8.5if your script supports it). - Click Set as current. All websites and subdomains on this account immediately adopt the selected version.
- Toggle Extensions: Under the Extensions tab, check or uncheck individual modules (such as
redis,imagick,zip,fileinfo). Changes save automatically in real-time. - DirectAdmin Control Panel: If your hosting plan is hosted on DirectAdmin, navigate to Extra Features » Select PHP Version to access the identical CloudLinux environment for version selection and extension management.
Troubleshooting and tips
- Deprecated Warnings after Upgrading: If older plugins display deprecation notices on PHP 8.2+, you can switch back to PHP 8.1 in one click while your developers update the code.
- Native PHP vs Alt-PHP: Avoid selecting "native". Native inherits server defaults and disables the custom extensions and options tabs.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket