Updating PHP in WordPress: Step-by-Step Guide
Follow the steps to change your WordPress PHP version, test your website, and fix compatibility issues after an update.
PHP runs the code within the WordPress website. The PHP version affects security, performance, and compatibility with themes and plugins. Keeping PHP up-to-date helps your website run smoothly on supported software.
Outdated PHP remains a problem across the WordPress ecosystem. WordPress shows that approximately 36% of WordPress installations were running PHP versions that had reached the end of life. These versions no longer receive official security fixes, which can lead to a website being at risk of vulnerabilities. Updating PHP versions helps address this risk, but you need to check compatibility before switching to the newest version.
In this guide, I’ll explain how to update PHP in WordPress safely, check the latest PHP version, and prepare your website before making changes. You’ll also find steps to follow if the update breaks your site.
Quick Answer
By updating PHP, you’re helping to keep your WordPress website secure, responsive, and compatible with themes and plugins. Update it through your hosting account. Check your PHP version. Back up your site and test for compatibility. Delete your cache and then try out your website. If errors occur, revert to the previous PHP version if possible and check for plugin or theme conflicts.
Why You Should Update Your WordPress PHP Version
To Keep Your Website Secure
Supported PHP versions get security fixes for known vulnerabilities. Run an unsupported version, and those holes stay open. Check the PHP support schedule before choosing a version.
Updating PHP closes one gap, but plugins, themes, and core files can still carry their vulnerabilities. WP Advanced Security by WooNinjas scans your code for security issues, checks file integrity, and monitors firewall traffic, so you can spot problems the PHP update won’t fix.
To Access the Latest PHP Features
New PHP releases include language improvements that developers can use when building and maintaining WordPress themes and plugins.
To Improve Website Performance
Newer PHP versions can process requests more efficiently, depending on your hosting setup, plugins, and website configuration.
To Maintain Plugin, Theme, and WordPress Compatibility
Themes, plugins, and WordPress need a compatible PHP environment. Check their requirements before changing your server’s PHP version.
To Reduce Long-Term Maintenance Costs
Following a regular WordPress maintenance routine helps you identify outdated software and address compatibility issues before they disrupt your website.
Recommended PHP Versions
As of October 12, 2026, PHP 8.5.11 is the latest PHP version listed by the official PHP project. WordPress recommends PHP 8.3 or newer in its server requirements.
Don’t just jump to the latest version without checking compatibility first. Make sure your hosting provider, WordPress install, themes, and plugins are compatible with the version you want. Before applying the update to your live website, test it on a staging site.
Things to Do Before Updating Your WordPress PHP Version
Prepare your website before changing PHP. A few checks can help you catch compatibility issues and restore your site if something goes wrong.
How to Check Your Current PHP Version
- Log in to your WordPress Admin dashboard.

- Go to Tools > Site Health > Info.

- Expand the Server section.

- Find the PHP version entry.

You can also check your version through your hosting dashboard. The WordPress Site Health documentation explains how to view your server information.
Back Up Your WordPress Website
Back up your website files and database before updating PHP. Check that the backup completed successfully and that you can restore it if needed. Follow a reliable WordPress maintenance guide to keep your backup process organized.
Bonus: Create a Staging Site Before Updating PHP
With a staging site you can test the new PHP version without affecting your live website. Test your theme, plugins, forms, login, and other important features before applying the update on your live site.
Note: Not every host lets you change your PHP version. If you don’t see a PHP setting in your hosting account, ask your host’s support team to switch it for you. If they can’t, consider moving to a host that lets you choose. Don’t force the change through your .htaccess file, since one wrong line can take your site offline.
How to Update PHP in WordPress: A Step-by-Step Guide
You can’t change PHP from the WordPress dashboard. PHP runs on your server, so you change it through your hosting account. While the menu names vary by host, the process remains consistent across all of them.
Step 1: Back Up Your Website
Back up your files and database before you touch anything. Make sure the backup is finished and that you know how to restore it. If the update breaks your site, this is your way back.
Step 2: Log In to Your Hosting Account
Log in to your hosting account and open the dashboard for the website you want to update.

Step 3: Find the PHP Settings
Look for a section called PHP Version, PHP Settings, or PHP Configuration. It’s usually under the website’s settings or advanced options. If you can’t find it, search your host’s help docs for “change PHP version” or contact their support team. Some hosts make the change for you.

Step 4: Check Which Sites the Change Affects
Some hosts let you set PHP per website. Others apply one version to every site on the account. Check the settings first so you don’t break a site you weren’t planning to update.
Step 5: Select a Compatible PHP Version
Pick a supported PHP version that works with your WordPress version, theme, and plugins. Don’t pick the newest one just because it’s new. If you tested on a staging site, use the version that passed.

Step 6: Apply the Change
Save or apply the new version. Most hosts switch it within a few minutes.
Looking for a Ready-Made Solution?
Explore our WordPress, WooCommerce, and LMS plugins built to extend functionality without custom development.

Step 7: Test Your Website
Open your site and your WordPress dashboard. Test forms, logins, navigation, and anything else visitors rely on. If you run an online store, check product pages, the cart, and checkout.
Then go to Tools > Site Health > Info > Server and confirm the new PHP version shows up.
Once everything works, run a security scan with WP Advanced Security to confirm nothing changed that shouldn’t have.
Pro Tip
After updating the PHP version, make sure to flush the website cache through the hosting panel (like cPanel, hPanel, or others), WordPress plugins, or from the CDN as well. Once the cache is cleared, reload your website and test its key features to make sure everything works correctly.
What to Do If a PHP Update Breaks Your Website
If your website, theme, or plugin is broken after a PHP update, follow these steps first to identify the cause of the problem and restore your site. Follow these steps first to identify the cause of the problem and restore your site.
Step 1: Roll Back to the Previous PHP Version
Go back to the PHP settings in your hosting account. If the new version causes errors, roll back to the previous version if it’s still available. Then check whether your website works again.
Step 2: Identify Incompatible Plugins or Themes
If the problem continues, check for plugin or theme compatibility issues. Look for error messages and review recent changes. If you’re facing problems with plugins, this guide to plugins not working in WordPress will help you identify the cause.
Step 3: Fix the Issue and Test Again
Update or replace the incompatible plugin or theme, or ask a developer to fix the code. Test the changes on a staging site before applying them to your live website. Once the issue is resolved, clear your cache and check your site’s key features again.
Warning: Always back up your WordPress files and database completely before changing your PHP version. You might want to keep that backup handy to restore your site if the update breaks it. Wait until the backup is complete and available before proceeding.
Key Takeaways
- Update PHP to a supported version that works with your WordPress site, theme, and plugins.
- Check your current PHP version and create a full backup before making changes.
- Clear your hosting, WordPress plugin, and CDN caches after updating PHP.
- Test your website’s key features. If something breaks, roll back to the previous PHP version if available and troubleshoot compatibility issues.
Need Professional Help With Your WordPress Website?
WooNinjas keeps your WordPress site safe, updated, and running smoothly. Our experts provide WordPress maintenance and security services, technical support, and website migration to help you reduce risks, fix technical issues, and keep your website running reliably.
Conclusion
Updating PHP keeps your WordPress website secure, compatible, and running smoothly. Before switching versions, check your version of the site requirements, take a full backup, and test the update on a staging site, if possible.
You can manage the PHP version through your hosting account. After updating, remember to clear your cache and test the key features of your website. If you’re unsure about compatibility or run into errors, WooNinjas WordPress Maintenance Services can help you manage updates and resolve technical issues.
Not sure which PHP version is right for your website? The WooNinjas team can help you review your setup, identify compatibility issues, and plan a safe update. Contact us to discuss your WordPress website’s requirements and get expert guidance.
FAQs
How to Update PHP in WordPress?
To update PHP in WordPress, follow these steps:
- Log in to your hosting account and open your website’s dashboard.
- Find the PHP settings.
- Select a PHP version compatible with your WordPress site, theme, and plugins.
- Save or apply the change.
- Clear your hosting cache, WordPress caching plugin cache, and CDN cache.
- Test your website’s pages, forms, login, and other important features.
Before updating, create a full website backup and test the new PHP version on a staging site if possible. If the update causes errors, switch back to the previous PHP version if it’s still available, then look into the compatibility issue.
What Is the Best PHP Version for WordPress?
PHP 8.5 is a suitable choice if your hosting provider, WordPress version, theme, and plugins support it. Otherwise, use a supported version that works with your website.
How Do You Check Your Current PHP Version in WordPress?
Go to Tools > Site Health > Info > Server in your WordPress dashboard. Find the PHP version listed under server information.
Should You Create a Staging Site Before Updating PHP?
Yes. Test the new PHP version on a staging site first. This lets you find compatibility issues without affecting your live website.
What Happens If You Don’t Update PHP in WordPress?
An outdated PHP version may stop receiving security fixes, leaving your website exposed to known vulnerabilities. It can also limit compatibility with newer software.
Can a PHP Update Cause WordPress Plugins to Stop Working?
Yes. A plugin may use code that is incompatible with the new PHP version. Check its requirements before updating and test it afterward.
Can You Update PHP from the WordPress Dashboard?
No. You need to change PHP through your hosting account, or ask your hosting provider to do it for you.
Can You Update PHP in WordPress Without a Developer?
Yes. You can update PHP yourself if you have access to your hosting panel. Back up your website first and check compatibility. Get help from a developer if errors appear or you cannot resolve them.
How Often Should You Update PHP in WordPress?
Check for PHP updates regularly and upgrade before your current version reaches the end of its security support. Always check compatibility before switching versions.
Can WooNinjas Help You Update PHP Safely?
Yes. WooNinjas offers WordPress maintenance and technical support to help with PHP updates, compatibility issues, and website errors.
Need Ongoing WordPress Maintenance & Support?
We handle updates, performance monitoring, security hardening, and technical fixes so your WordPress and WooCommerce site stays stable and secure.