WordPress is written in PHP, the programming language that runs on your web server and builds each page before it is sent to the visitor. The version of PHP your site uses has a direct effect on speed, security and which plugins will work. Yet many sites run on whatever version was set when the hosting account was created and never get touched again.
This guide explains how to check which PHP version your WordPress site uses, how to change it in common hosting control panels, and how to handle compatibility problems.
Why your PHP version matters
Security
Each PHP release branch receives security fixes for a limited time. After that, it reaches "end of life" and vulnerabilities are no longer patched. Running an end-of-life version means any newly discovered flaw stays open on your server. You can see the current supported versions on the official php.net "Supported Versions" page.
Performance
Newer PHP releases have generally brought meaningful performance improvements. The PHP 7 series was a big jump over PHP 5, and the PHP 8 series continued to refine things. In practice, a newer version often means pages are generated faster and the server can handle more visitors with the same resources.
Compatibility
WordPress core publishes a recommended PHP version, and plugin and theme developers increasingly require recent versions. Some updates will refuse to install on old PHP, so staying behind can leave you stuck on outdated plugins.
How to check your current PHP version
The easiest way is inside WordPress:
- Go to Tools → Site Health.
- Open the Info tab.
- Expand the Server section and look for PHP version.
Site Health will also flag an outdated PHP version on its Status tab.
You can also check in your hosting control panel, which is where you will make the change.
Before you change anything
Upgrading PHP is usually painless, but an old plugin or theme can break on a new version. Prepare first:
- Back up your site (files and database).
- Update WordPress core, themes and plugins. Developers fix compatibility issues in updates, so the newest versions are most likely to work.
- Remove plugins you no longer use. Abandoned plugins are the most common cause of PHP upgrade errors.
- Check plugin pages. On WordPress.org, each plugin lists the minimum PHP version and when it was last updated. A plugin that has not been updated in years is a risk.
- Use a staging site if you have one. Test the new version there first.
How to change the PHP version in cPanel
Most cPanel hosts offer one of two tools.
MultiPHP Manager
- Log in to cPanel.
- Search for MultiPHP Manager in the Software section.
- Tick the box next to the domain you want to change.
- Choose the new PHP version from the dropdown on the right.
- Click Apply.
Select PHP Version (CloudLinux)
Some hosts use CloudLinux's PHP Selector instead:
- In cPanel, open Select PHP Version.
- Pick the version from the Current PHP version dropdown.
- Click Set as current.
- Check the Extensions tab to make sure the extensions WordPress needs are enabled, such as
mysqli,curl,gdorimagick,mbstring,xml,zipandintl.
How to change the PHP version in DirectAdmin
- Log in to DirectAdmin.
- Look for PHP Version Selector, Domain Setup or Select PHP version, depending on the skin and setup.
- Choose the version for your domain and save.
If you cannot find a PHP option, your host may manage it for you. Open a support ticket and ask which versions are available.
After the change: test your site
Clear any caching plugin and your browser cache, then:
- Load the homepage and a few posts and pages.
- Log in to the dashboard and open a few plugin settings screens.
- Submit a contact form and, if you run a store, place a test order.
- Revisit Tools → Site Health to confirm the new version is in use.
What to do if something breaks
You see "There has been a critical error on this website"
WordPress usually sends an email to the admin address with details about which plugin or theme caused the error, plus a recovery mode link. Use recovery mode to deactivate the offending plugin.
The site is completely blank
Switch back to the previous PHP version in your control panel. That restores the site in seconds while you investigate.
Find the culprit
Turn on debugging by adding these lines to wp-config.php above the line that says "That's all, stop editing":
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Errors will be written to wp-content/debug.log. Look for the plugin or theme folder name in the file paths. Update it, replace it with an alternative, or contact its developer. Remember to turn debugging off afterward.
Missing extension errors
Messages like "Call to undefined function" for image or XML functions usually mean a PHP extension is not enabled for the new version. Enable it in the PHP selector or ask your host.
How often should you upgrade?
Check your PHP version a couple of times a year, and plan an upgrade whenever your current branch is getting close to end of life. Moving one version at a time is often easier to troubleshoot than jumping several releases at once.
If your site is hosted with Host Whimsy, our knowledge base has guides for the control panel, and support can help if you are unsure which version to choose.
Wrap-up
Your PHP version quietly affects how fast and secure your WordPress site is. Check it in Site Health, back up and update everything, switch versions in cPanel or DirectAdmin, and test thoroughly. If something breaks, roll back, find the plugin responsible, and try again. It is one of the simplest upgrades you can make for a healthier site.