What Is PHP and Why Does It Matter for WordPress?
PHP is the programming language that powers WordPress. Every time someone visits your site, your server runs PHP to build and deliver the page. WordPress itself is written in PHP, and so are most themes and plugins.
The version of PHP your server runs has a direct impact on:
- Speed — newer PHP versions are significantly faster. PHP 8.x can be up to 3x faster than PHP 5.x
- Security — older PHP versions stop receiving security patches, leaving your site exposed
- Compatibility — modern plugins and themes increasingly require PHP 8.0 or higher
WordPress officially recommends PHP 8.1 or higher as of 2024.
How to Check Your Current PHP Version
Before updating, find out what version you're running. You can check it in a few places:
In your WordPress dashboard: Go to Tools → Site Health → Info → Server. Your PHP version is listed there.
In your hosting control panel: Most hosts show your PHP version in cPanel, Plesk, or their custom dashboard.
Via a plugin: Plugins like Query Monitor or WP Server Info display your PHP version on the front end.
Before You Update PHP: Do This First
Updating PHP can occasionally cause compatibility issues with older plugins or themes. Before you change anything:
- Back up your site — full backup including files and database
- Check plugin and theme compatibility — the WordPress Site Health tool flags known issues
- Test on staging first — if your host offers a staging environment, update PHP there first and verify everything works before touching your live site
Cloudways makes this easy with one-click staging environments on every plan. You can test a PHP update in staging, confirm nothing breaks, then apply it to your live site with confidence.
How to Update PHP in WordPress
The actual PHP update doesn't happen inside WordPress — it happens at the hosting level. How you do it depends on your host.
On Cloudways
- Log in to your Cloudways dashboard
- Go to Servers and click on your server
- Click Settings & Packages
- Under the Packages tab, find the PHP version selector
- Choose your desired PHP version (8.1 or 8.2 recommended)
- Click Save Changes
Cloudways applies the update instantly with no server restart needed.
On cPanel Hosting
- Log in to cPanel
- Find the MultiPHP Manager or PHP Selector (varies by host)
- Select your domain
- Choose the PHP version from the dropdown
- Save
On WP Engine, Kinsta, or Other Managed Hosts
Most managed hosts have a PHP version selector in their dashboard under site settings. Check your host's documentation for the exact location.
Via wp-cli (Command Line)
If you have server access, you can also check and switch PHP versions via the command line, though the exact commands depend on your server setup.
What to Do After Updating PHP
Once you've updated PHP, do a thorough check of your site:
- Visit your homepage and several interior pages
- Log in to the WordPress admin and check for any errors
- Test any forms, ecommerce checkout flows, or custom functionality
- Check your error logs if anything looks off
If something breaks after updating, the most common culprit is a plugin or theme that hasn't been updated to support the newer PHP version. Check for plugin updates first — most developers release PHP 8.x compatibility fixes regularly.
What If a Plugin Isn't Compatible?
If a specific plugin causes issues on the newer PHP version:
- Check if there's an update available for the plugin
- Reach out to the plugin developer — many respond quickly to compatibility reports
- Look for an alternative plugin that does the same job and is actively maintained
- As a temporary measure, you can revert to your previous PHP version while you sort it out
Staying on an old PHP version indefinitely isn't a solution — it's a growing security risk.
The Easiest Way to Manage PHP Versions
If your current host doesn't make PHP updates easy — or worse, requires a support ticket just to change a version — that's a sign you're on the wrong host. A good managed hosting platform puts PHP version control directly in your dashboard.
Cloudways gives you full PHP version control, one-click staging to test updates safely, and automatic server-level security — all without needing to touch a command line.
Try Cloudways free for 3 days →
This article contains affiliate links. We may earn a commission if you sign up through our links, at no extra cost to you.