How to Update PHP in WordPress Safely (2026 Step-by-Step Guide)

Knowing how to update PHP in WordPress protects your site from security risks and plugin errors. PHP is the programming language that runs your site’s code on the server. If your host runs an old version, you miss important security fixes. You also risk compatibility problems with new plugins.
The safe method follows four steps. Back up your site, check compatibility, change the version in your hosting panel, then test everything. This USABusinessDaily guide walks you through each step in that order.
What Is PHP, and Why Does It Matter for WordPress?
PHP is a server-side language. Your server runs it every time someone opens a page on your site. WordPress core, your theme, and nearly every plugin are written in PHP.
The PHP project gives each version a fixed lifespan. According to PHP.net’s supported versions page, each branch gets two years of active support. It then gets two more years of security-only fixes. After that, the branch reaches end of life and receives no fixes at all.
This lifecycle matters for three reasons:
- Security: An unsupported version no longer receives patches for newly found flaws.
- Compatibility: Plugin and theme developers eventually drop support for old versions.
- Performance: Newer versions can run faster. However, the gain depends on your caching, plugins, and hosting, so treat any speed boost as a bonus. If speed is your main goal, read our guide on WordPress speed optimization.
What PHP Version Should WordPress Use in 2026?
The recommended PHP version for WordPress depends on three layers. Your answer must work for all of them.
- WordPress core: WordPress.org currently recommends PHP 8.3 or greater. It also recommends MariaDB 10.11+ or MySQL 8.0+, and HTTPS support.
- Your plugins and theme: Core compatibility does not prove that every plugin works on the same version.
- Your host: Your host must offer the version you want.
WordPress.org notes that older setups may still run on PHP 7.4 or later. However, it warns that those versions have reached end of life and may expose your site to security vulnerabilities.
Here is where the current PHP branches stand. I checked these dates against PHP.net on October 24, 2026. Recheck them before you rely on them, because support schedules can change.
| PHP version | Active support ended or ends | Security support ends | Status in October 2026 |
| 8.5 | 31 Dec 2027 | 31 Dec 2029 | Active support |
| 8.4 | 31 Dec 2026 | 31 Dec 2028 | Active support |
| 8.3 | 31 Dec 2025 | 31 Dec 2027 | Security fixes only |
| 8.2 | 31 Dec 2024 | 31 Dec 2026 | Security fixes only, ending soon |
| 8.1 and older | Ended | Ended | End of life |
Practical rule: Pick the newest version that your host, WordPress, and every active plugin and theme support. For many sites, that means PHP 8.3 or 8.4. Move to 8.5 once each plugin and theme developer confirms support.
How to Check Your Current PHP Version
Before you change anything, check PHP version WordPress reports. Use this path in your dashboard:
- Log in to your WordPress admin area.
- Go to Tools → Site Health.
- Open the Info tab.
- Expand the Server section and find the PHP version.
You can also see the version in your hosting panel. The command php -v over SSH shows the command-line version. That version can differ from the one serving your website, so trust Site Health or your host’s panel first.
Write the current version down. You will need it if you must roll back.
What to Do Before Updating PHP
Most failed updates come from skipping preparation. Complete this checklist first:
- Create a full backup. Save your files and your database. Our WordPress website backup guide explains how. Store a copy outside your server.
- Update WordPress first. Learn how to update WordPress safely, then update your plugins and themes. Developers often fix PHP compatibility issues in newer releases.
- Remove unused plugins and themes. Old, abandoned code is the most common source of PHP errors.
- Check each active plugin and theme. Read the plugin page and changelog for notes on PHP support. For custom code, ask your developer.
- Test on a staging site. Many hosts offer one-click staging. Switch the staging copy to the new PHP version and test it there first.
- Pick a quiet time. Choose a low-traffic window, especially for online stores.
The 60-Second Safety Check
Run through this table before you click anything:
| Check | Your answer |
| Current PHP version | Written down |
| Target PHP version | Supported by host and plugins |
| Fresh backup | Files and database saved |
| Staging test | Passed, or not available |
| Rollback plan | Old version noted |
If any row is empty, stop and finish it first.
How to Update PHP in WordPress Step by Step
The exact screens depend on your host. The process below covers the most common setups.
Option 1: Update PHP in cPanel
Many US shared hosts use cPanel. Its official documentation describes the MultiPHP Manager tool.
- Log in to your cPanel account.
- Open MultiPHP Manager in the Software section.
- Tick the box next to your domain.
- Choose the new version from the PHP version dropdown.
- Click Apply.
Some hosts show a Select PHP Version tool instead. The steps are similar. Choose the version, then save.
Option 2: Update PHP on managed WordPress hosting
Managed hosts usually put the setting in their own dashboard. Look for a section named PHP, Tools, or Site settings. Pick the new version and confirm. Hosting guides from Kinsta and Hostinger show how this looks on their platforms. If you want a host that handles this for you, compare managed WordPress hosting options.
Option 3: Your host has no PHP selector
Some hosts do not show a version control. Contact support and send three details:
- Your domain name
- Your current PHP version
- The version you want
Ask them to switch it for you. Then confirm the change in Site Health.
After any option, reload your site right away. Then confirm the new version under Tools → Site Health → Info.
How to Test Your Website After Updating PHP
A changed version number does not prove your site works. Test the parts that matter to your visitors and your income.
- Front end: Open the homepage, a blog post, and your top landing pages.
- Admin area: Log in, edit a post, and upload an image.
- Forms: Submit your contact form and check that the email arrives.
- Search and menus: Make sure both behave normally.
- Plugins: Open each important plugin’s settings page.
- Caching: Clear your cache and view the site again.
WooCommerce stores need extra checks. Add a product to the cart and complete a test checkout. Confirm that payment gateways work and that order emails arrive. Also check customer login and account pages. A broken checkout costs real revenue, so never skip this step.
Common PHP Update Errors and How to Fix Them
Most problems come from one plugin or theme that does not support the new version. Use this table to find the cause quickly.
| Symptom | Likely cause | First fix |
| “There has been a critical error” message | A plugin or theme fatal error | Check your email for a recovery link, then deactivate the plugin |
| Blank white page | Fatal PHP error with errors hidden | Turn on the debug log (see below) |
| HTTP 500 error | Incompatible code or server setting | Review the server error log, then roll back |
| Locked out of the dashboard | Plugin conflict | Rename the plugin folder through FTP or File Manager |
| Warnings about deprecated code | Older code on a newer PHP version | Update or replace the plugin |
How to find the exact error
WordPress can write errors to a log file. Open your wp-config.php file and add these lines above the line that says “That’s all, stop editing”:
php
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
Reload the broken page. Then open wp-content/debug.log. The log names the file that caused the error, and the file path shows which plugin or theme is at fault. Turn debugging off again when you finish.
How to isolate a bad plugin
If you cannot log in, connect with FTP or your host’s File Manager. Open wp-content/plugins. Rename the suspect plugin’s folder, for example by adding -off to the end. WordPress then deactivates it. If the site returns, you found the cause. Update the plugin, replace it, or ask its developer about PHP support.
For more troubleshooting steps, see our guide to fix common WordPress errors.
How to Roll Back a PHP Update Safely
You can undo the change if the site breaks and you cannot fix it fast.
- Return to the same PHP setting in your hosting panel.
- Select the version you wrote down earlier.
- Save the change and reload your site.
This restores the old PHP version only. If you also updated plugins or edited files during the same session, restore your backup instead. Rolling back is a temporary fix. Once the site is stable, find the incompatible plugin and plan the upgrade again. Staying on an unsupported version leaves you open to attacks, so also review WordPress security best practices.
When to Contact Your Host or a WordPress Expert
You can finish most updates on your own. However, ask for help in these cases:
- Your host offers no PHP selector.
- Your site uses custom-built plugins or theme code.
- You run a live store that cannot afford downtime.
- You see repeated fatal errors you cannot trace.
- You cannot reach the dashboard or your files.
Your host’s support team can confirm server-side settings. A developer can fix incompatible code.
Need Help Updating PHP in WordPress?
Avoid downtime and broken features. If you want expert support with compatibility checks, backups, hosting changes, and post-update testing, explore professional WordPress maintenance services. A careful, tested upgrade keeps your site’s critical features working.
Get WordPress PHP Update Help
Frequently Asked Questions
How do I update PHP in WordPress?
Back up your site, check compatibility, and change the version in your hosting panel. If your host has no selector, ask support to do it. Then test the site.
What PHP version should I use for WordPress in 2026?
Choose a supported version that works with your WordPress release, plugins, theme, and host. WordPress.org currently recommends PHP 8.3 or greater. Check PHP.net before you decide.
Can updating PHP break my WordPress website?
Yes, it can. The usual cause is an old plugin or theme that does not support the new version. A backup, a staging test, and a rollback plan reduce the risk.
How do I check my PHP version in WordPress?
Go to Tools → Site Health → Info → Server. The PHP version appears there.
Can I update PHP without cPanel?
Yes. Managed hosts have their own dashboards. If yours has no selector, contact support.
Should I update WordPress before updating PHP?
Yes. Update WordPress, plugins, and themes first. Newer releases often include compatibility fixes.
What should I do if WordPress breaks after a PHP update?
Read the debug log, then deactivate the plugin it names. If you cannot fix the problem quickly, roll back to the previous PHP version or restore your backup.
Does updating PHP make WordPress faster?
Often it helps, but results vary. Caching, plugins, and hosting also affect speed.
How often should I update PHP?
Review your version at least once a year. Move before your current version reaches end of life.
Final Thoughts
Learning how to update PHP in WordPress takes less than an hour when you prepare well. Back up first, pick a version your whole site supports, change it through your host, and test the pages that matter. Keep this checklist handy, and revisit it each year when PHP support dates change. For more practical technical guides, keep reading USABusinessDaily.
Sources:


