Running the right PHP version is important for security, performance, and compatibility. This guide covers checking, switching, and managing PHP versions in cPanel.
Check Your Current PHP Version
Via cPanel MultiPHP Manager
- Log in to cPanel
- Go to Software > MultiPHP Manager
- Your domain and its current PHP version are listed
Via WordPress Site Health
- Go to Tools > Site Health > Info > Server
- Look for PHP version
Via Command Line (Terminal)
php -v
Switch PHP Versions
- Go to cPanel > Software > MultiPHP Manager
- Check the box next to your domain
- Select the desired PHP version from the dropdown
- Click Apply
Changes take effect immediately.
Available PHP Versions
| Version | Status | Support Until | Notes | |---|---|---|---| | PHP 7.4 | End of Life | Dec 2022 | Security risk — upgrade immediately | | PHP 8.0 | End of Life | Nov 2023 | Security risk — upgrade soon | | PHP 8.1 | Security fixes only | Dec 2025 | Stable, widely compatible | | PHP 8.2 | Active support | Dec 2026 | Recommended for most sites | | PHP 8.3 | Active support | Dec 2027 | Latest stable, best performance |
Recommendation: Use PHP 8.2 or 8.3 for the best balance of performance and compatibility.
Before Upgrading: Check Compatibility
Check Plugin and Theme Requirements
- Visit each plugin and theme's page on wordpress.org
- Look for "Requires PHP" in the sidebar
- Check the support forum for reports of PHP 8.x issues
Use PHP Compatibility Checker Plugin
- Install PHP Compatibility Checker from the WordPress plugin directory
- Go to Tools > PHP Compatibility
- Select the target PHP version
- Click Scan site
- Review any warnings or errors
Test on a Staging Site
Before switching PHP on your live site:
- Create a staging copy (see our staging guide)
- Switch the staging site to the new PHP version
- Test all pages, forms, checkout, and plugin features
- If everything works, switch the live site
Common Migration Issues
PHP 7.4 to 8.0
each()function removed — older plugins may break- Stricter type checking — some code that worked may throw errors
create_function()removed — affects old themes
PHP 8.0 to 8.1
FILTER_SANITIZE_STRINGdeprecated- Return types enforced in internal classes
- Fibers introduced (no action needed)
PHP 8.1 to 8.2
- Dynamic properties deprecated (common in older plugins)
- Readonly classes introduced
utf8_encode()andutf8_decode()deprecated
PHP 8.2 to 8.3
- Generally smooth transition
- Typed class constants introduced
json_validate()function added
Manage PHP Extensions
- Go to cPanel > Software > MultiPHP INI Editor
- Select the Editor Mode tab
- Choose your domain
- You can enable or disable PHP extensions here
Common extensions needed for WordPress:
mysqli(database)curl(API calls)gdorimagick(image processing)mbstring(multibyte strings)xml(RSS feeds, sitemaps)zip(plugin/theme installation)intl(internationalisation)
Different PHP per Subdomain
MultiPHP Manager lets you set different PHP versions per domain and subdomain. This is useful when:
- A staging subdomain needs a newer PHP version for testing
- An older application on a subdomain requires PHP 7.4
- You want to test PHP 8.3 on a subdomain before switching the main site
Cron Job PHP Paths
When running cron jobs, you may need to specify the PHP version explicitly:
# System default PHP
/usr/local/bin/php /home/user/script.php
# Specific PHP version (EA4)
/usr/local/bin/ea-php82 /home/user/script.php
/usr/local/bin/ea-php83 /home/user/script.php
Rolling Back
If the new PHP version causes problems:
- Go to MultiPHP Manager
- Switch back to the previous version
- The change is instant — your site will work again immediately
- Investigate compatibility issues before trying to upgrade again