WordPress Change PHP Version: How to Do It in Under 5 Minutes

Bulletproof Backups for Your WordPress Website

Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.

WordPress change php version

Are you seeing strange plugin errors or issues after a site migration? We see this all the time, and the culprit is often an outdated PHP version.

The fix is simple, but it’s natural to worry you might end up with a crashed site in the process.

That’s exactly why we created this WordPress change PHP version guide. We’ll show you how to do it safely for a smoother, more compatible website.

TL;DR: You can change your PHP version via your hosting panel or cPanel, but be aware of potential risks like compatibility issues. Always take a complete backup of your site using a reliable plugin to ensure you can restore everything if needed.

Understanding PHP versions

PHP is the language that runs your WordPress site, and it gets updated all the time. These updates are grouped into versions, like PHP 7.4, 8.1, and 8.2. Each new version is designed to make your site run faster and be more secure.

🛠️ Note: WordPress maintenance includes keeping both your software and server environment healthy.

Every PHP version is only fully supported for a couple of years. After that, it stops getting security updates and becomes “end-of-life.”

php update recommendation notice

Running an end-of-life version is a major risk, and it’s exactly why WordPress shows that PHP update recommended warning in your Site Health dashboard. If you ignore it, you may soon find yourself troubleshooting errors like the infamous white screen.

Example of WordPress white screen of death

Now, here’s what trips most people up. You cannot change the PHP version from your WordPress dashboard. It is a server setting, not a WordPress one.

You have to do it through your hosting account. This means using a tool like cPanel or whatever custom control panel your web host provides.

Prerequisites

Changing your PHP version is a big step for your site’s health, but doing it unprepared can cause problems. To make sure everything goes smoothly, we follow a strict preparation routine:

Create a complete backup. This is the most important step. We can’t stress this enough. Before you touch any server settings, you need a full, working backup of your site files and database. A tool like BlogVault handles this reliably. If something unexpected happens, this backup is your safety net to restore your site quickly.

BlogVault backups new UI

Find out which PHP version you are using. You need to know your starting point. You can find this inside your WordPress dashboard. Go to Tools > Site Health > Info and look for the Server section. Your hosting control panel and the BlogVault dashboard will also show your current PHP version.

WordPress php version via Blogvault dashboard

Check compatibility of your themes and plugins. This is where things often break. An older plugin or theme might not work with a new PHP version. The only way to be 100% sure is to test on a staging site. A staging site is a safe copy of your website where you can make changes without affecting your live visitors.

Select staging site requirements

🔔 A pro tip: While developers often list compatibility info on their plugin pages, this information is not always up to date.

Clear all of your website’s cache. Before you flip the switch, you need to clear your cache. This ensures you see the updated site instead of an old, stored version. Remember to clear your caching plugin, any server-level cache, and your own browser’s cache. This prevents a lot of confusion after the change.

Purge all Cache Airlift

A) Via hosting control panel

Now that the prep work is done, you are ready to make the change. We are using Cloudways as an example here. While your host’s interface might look different, the basic steps are almost always the same.

Log into your host and find your server settings. First, sign into your Cloudways account. Go to the Servers section in the top menu. Then, select the specific server where your WordPress site is located.

Settings & Packages cloudways

Find the software or packages area. Inside the server management dashboard, look for a tab called Settings & Packages. Within this area, find the Packages tab. This is a common place for hosts to put PHP version settings.

Choose and apply the new PHP version. Click the button to modify your PHP package. You will see a dropdown menu. Choose the PHP version you want to upgrade or downgrade to.

🔔 Note: Make sure this is the same version you successfully tested on your staging site. Then, save the changes.

Go back and thoroughly test your live site. Once the server updates, it’s time to check your work. Visit your website and make sure it is functioning correctly. Don’t just look at the homepage. Test your key plugins, contact forms, and other features to ensure everything works seamlessly.

🔔 Note: If you experience timeout issues while making these changes, you may need to increase the PHP time limit. This separate setting helps avoid interruptions for scripts that take a bit longer to run.

B) Via cPanel

If your host does not use a custom panel, they likely use cPanel. It is one of the most common hosting management tools. Even if your host uses Plesk or Webmin, they will have a similar tool, and the process is largely the same.

MultiPHP Manager

Find the MultiPHP Manager in your cPanel. Log into your cPanel dashboard. Scroll down to the Software section. Find and click on the MultiPHP Manager tool.

Set PHP Version per Domain

Select the correct domain for the change. Inside the MultiPHP Manager, you will see a list of your domains. Use the checkboxes to select the domain you want to update. Be careful here. Double-check that you have selected the correct website before proceeding.

Set php version via Cpanel

Choose your new PHP version from the dropdown. Find the PHP version dropdown menu on the right. Select the version you want. You can use this to upgrade or even downgrade. Sometimes, you might need to downgrade the PHP version if a critical plugin has a compatibility issue with the newest release.

Finally, test your website thoroughly. Check that all critical functions are working correctly. Pay close attention to your plugins and theme to make sure there are no new issues.

Importance of keeping PHP updated

So, why go through all this trouble? Keeping your PHP version updated is a huge part of any good WordPress maintenance plan. It is not just about clearing a warning message. It all comes down to two very important things: making your site faster and keeping it safe.

Newer PHP versions just work better. They help your website process information quicker, which means your pages load faster for visitors. On the safety side, updates are crucial. Each new release fixes known security holes that hackers look for, which is a key part of hardening WordPress. An old version makes your site an easy target, putting your data and your visitors’ information at risk.

Here is the most important thing to remember. You have to make sure your themes and plugins will work correctly with the new PHP version before you update. This is where you might need to start troubleshooting errors. A plugin that is not ready for the update can cause errors or even make your site stop working. That is why we always insist on testing everything first. It is the only way to avoid problems.

Common issues with outdated PHP versions

If you don’t keep PHP updated, you might run into issues, like:

  • Slow site performance: An outdated PHP version can make your site slow, which frustrates visitors and can drive them away.
  • Increased security vulnerabilities: Older versions of PHP are more susceptible to attacks, putting your site at risk for data breaches.
  • Incompatible plugins and themes: Outdated PHP can cause plugins and themes to malfunction or not work at all, leading to various functionality issues.

Troubleshooting issues

Switching to a new PHP version can sometimes cause problems. Don’t worry, this is common and usually fixable. Here are some of the most frequent issues and how to troubleshoot them.

Plugin incompatibility: This is a very common problem. If you suspect a certain plugin is the cause, try deactivating it. If that does not work, you may need to deactivate all your plugins and reactivate them one by one to find the source. You can also contact the plugin developer for support.

Default themes

Theme errors: This works just like a plugin issue. The fastest way to check if your theme is the problem is to temporarily switch to a default WordPress theme like Twenty Twenty-Six. If the error goes away, you have found the cause. You may need to find an older version of your theme or contact the developer.

Fatal errors: A fatal error completely stops your site from loading. To find the cause, you need to look at your server’s error logs. Log into your hosting control panel, go to the File Manager, and look for an error_log file in your public_html directory. The log will point to the exact file and line number causing the problem.

🔔 A quick tip: if you cannot fix it quickly, your safest move is to revert to the previous PHP version for now.

White screen of death: The white screen is just a fatal error that WordPress is hiding. To see the real error, you need to enable WordPress’s debug mode. Edit your wp-config.php file and add these lines:

define('WP_DEBUG', true); 
define('WP_DEBUG_LOG', true); 
define('WP_DEBUG_DISPLAY', false);

This will create a debug.log file in your wp-content folder with the details you need. Another fast way to isolate the problem is to rename your plugins folder, which deactivates everything at once.

500 internal server error: This is a general server error, but it is often easy to fix. First, check your .htaccess file for any mistakes. If that is not the issue, you might need to give WordPress more memory. Add this line to your wp-config.php file before the “That’s all, stop editing!” line:

define('WP_MEMORY_LIMIT', '256M');

Make sure you replace 256M with a value higher than what you currently have.

Missing files or permissions errors: This error means your server cannot access a file it needs. This is almost always a server configuration issue. The fastest and safest fix is to contact your hosting provider. They can check and correct the file permissions for you.

change-permissions-file-manager

Deprecated functions or features: This just means your code is using old PHP functions that are no longer supported. Your error_log file will tell you exactly which function is “deprecated” and where to find it. You will need to update the code to use a modern replacement.

Slow performance after change: If your site feels sluggish after the update, the first thing to do is clear your caches. This means your browser cache, your website’s caching plugin, and any cache your server uses. This simple step solves the problem more often than you would think.

Custom code not working: This is usually related to deprecated functions. If you have custom code snippets, the new PHP version might not support them anymore. Check your error logs for warnings, which will point you to the exact code that needs to be updated to work with newer PHP standards.

Parting thoughts

Keeping your WordPress site running smoothly and securely includes using the right PHP version. This helps your site perform at its best and stay protected from security threats. 

Before making any changes, ensure you backup your website. Next, check for compatibility with your themes and plugins, and have a rollback plan in place. With BlogVault, you can rollback a specific plugin or a theme. These steps will help ensure a smooth transition.

If you run into any problems, don’t hesitate to reach out to your hosting provider’s support team. 

FAQs

How do I change my PHP version in WordPress? 

Changing your PHP version usually involves accessing your hosting panel or cPanel and selecting the desired PHP version from the available options. You will have to look for PHP settings or a PHP manager, and then choose the version you want to switch to. 

Is it safe to change the PHP version in WordPress? 

Yes, it is safe as long as you follow preparatory steps such as backing up your site and checking compatibility with your themes and plugins. This way, you can ensure that everything will continue to work correctly with the new PHP version without any disruptions or issues.

How can I verify my website’s PHP version? 

You can check your PHP version from your WordPress dashboard by navigating to Tools > Site Health > Info > Server. You can also verify it through your hosting control panel. Both methods will give you the current PHP version your site is running.

Can you revert a PHP version? 

Yes. If you encounter issues with a new PHP version, you can revert to the previous version using your hosting panel or cPanel. Simply go back to the PHP settings and select the earlier version that was working fine, then save and apply the changes to revert to the earlier version.

Can I change my PHP version? 

Yes, you can change your PHP version through your hosting provider’s control panel or cPanel. Always follow necessary precautions like backing up your site and checking for compatibility to ensure a smooth transition.

Tags:

You may also like


How do you update and backup your website?

Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.

Updating Everything Manually?

But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.

Backup Your WordPress Site

Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.