How to Downgrade PHP Version In WordPress: 2 Quick Methods

how to downgrade php version in wordpress

Your PHP version was just updated. You expected your WordPress site to run faster and smoother. Instead, you’re greeted with error messages, broken functionality, and security issues. Plugins and themes that used to work perfectly fine are now causing problems. 

The root cause? The PHP version change.

Every moment your site malfunctions, you lose visitors and credibility. You’ve tried everything—deactivating plugins, switching themes, checking error logs—but nothing helps. Undoing the update might fix your site, but you’re not sure how to do it safely.

This is where we come in. We’ll guide you step by step through how to downgrade PHP version in WordPress, helping you get your site back to its optimal state.. 

TL;DR: Downgrading your PHP version in WordPress can fix issues from recent updates but comes with risks like security vulnerabilities and compatibility problems. Always backup your site and check plugin and theme compatibility on a staging site before making changes.

WordPress sites rely heavily on PHP. It’s the language that makes your site run. Sometimes, you might need to downgrade the PHP version your site is using. This could be because certain plugins or themes need an older version, or maybe your site has crashed. 

However, keep in mind that downgrading PHP isn’t a decision you should take lightly. It is usually not recommended to downgrade your PHP version unless absolutely necessary. Here’s why:

PHP is a server configuration, not a site configuration. This means PHP is installed on the server where your site is hosted. The server belongs to your hosting provider, so they control which PHP versions are available. 

If your hosting provider doesn’t allow you to change the PHP version on their server, there’s nothing you can do.

Understanding the risks of downgrading PHP version in WordPress

While it might seem straightforward, downgrading PHP can introduce several risks and challenges. Here are some critical points to consider:

Security vulnerabilities: Older PHP versions have security issues. This could make your site an easy target for hackers.

Compatibility issues: Some themes and plugins depend on features only available in newer PHP versions. Downgrading might break them or cause errors.

Migration issues: If you plan to move your site to a new server, the PHP version on both the new and current servers must match. Mismatched PHP versions can lead to migration problems and failure.

Performance degradation: Newer PHP versions often make your site run faster. Going back to an older version could slow things down.

Deprecated functions: Functions removed in newer PHP versions may not work or behave differently in older versions. This could introduce bugs to your site.

Reintegration costs: Fixing problems caused by downgrading can take a lot of time and effort, requiring extensive debugging and reintegration.

Data integrity: Downgrading could mess up your databases or cause loss of data because older PHP versions handle data differently.

Steps to take before downgrading PHP version in WordPress

Before you get into the steps of downgrading your PHP version, there are a few important steps you need to take to ensure everything goes smoothly. These steps will help you avoid potential problems and keep your site safe.

1. Create a full backup of your site: Use a backup plugin like BlogVault to create a full backup of your site. If something goes wrong, you can restore everything back to how it was.

2. Verify your current PHP version: You need to check which PHP version your site is currently running. There are a few ways to do this. You can look it up on BlogVault’s dashboard, or you can go to your WordPress admin area and navigate to Tools > Site Health > Info > Server. Your hosting control panel will also have this information.

3. Check plugin and theme compatibility: Ensure the compatibility of your installed plugins and themes with the new PHP version you plan to use. You can create a staging site using BlogVault to test it. Alternatively, developers usually list the compatibility information on the plugin or theme’s page, so make sure to review it.

4. Deactivate caching plugins: Temporarily deactivate any caching plugins. These plugins store a version of your website to load it faster, but they might interfere with the PHP version change.

5. Clear your site’s cache: This includes browser, site, and server caches. Doing this removes the stored versions of your site to make sure any changes you make are applied properly.

How to downgrade PHP version in WordPress

Downgrading the PHP version for your WordPress site might seem tricky, but it’s doable. To make any changes, you need to tweak the server settings. Since the server belongs to your hosting provider, you will need to change PHP using their tools.

We will be using Cloudways as an example. Note that some hosts will not allow changing your PHP version.

A) Via hosting control panel

1. Select the appropriate server: Log into your account on Cloudways and navigate to the top screen and select the Servers option. Find and select the server where your WordPress site is hosted from the list provided.

2. Open settings & packages tab: In the server management dashboard, look for the Settings & Packages tab and click on it to access further options. Within this section, locate and click on the Packages tab.

3. Change PHP version: Find the PHP version settings. A dropdown menu will list the available PHP versions. Select the PHP version you want to downgrade to from the dropdown options. After making your selection, click the Save button to apply changes.

how to downgrade php version in wordpress

4. Verify and test your website: Once the changes are applied, visit your website to ensure it is functioning correctly. Check a few pages to make sure everything looks good. Test all aspects of your site, including plugins and themes, to ensure everything works seamlessly with the downgraded PHP version.

5. Monitor for issues: Keep an eye on your site for any errors or performance issues. If any problems arise, you may need to troubleshoot or contact your hosting provider for support.

B) Via cPanel

Another way to downgrade your PHP version is through cPanel. Many hosting providers use cPanel as their hosting management tool. Even if they use other tools like Plesk or Webmin, the process is quite similar. Here’s how you can go about it:

1. Navigate to MultiPHP manager: Log into your cPanel dashboard and scroll down to the Software section. Find and click on MultiPHP Manager.

2. Select your domain: In the MultiPHP Manager section, you will see a list of your domains. Use the checkboxes to select the domain(s) for which you want to downgrade the PHP version.

3. Choose PHP version: In the PHP version dropdown menu, select the PHP version you want to downgrade to from the available options. Once the selection is made, save to confirm the change.

4. Test your website: Thoroughly test your website to ensure everything functions correctly. Also, check critical functionalities, including plugins and themes, for any issues.

When should you downgrade your PHP version

Normally, downgrading your PHP version is not recommended. However, there are certain situations where it might be necessary:

1. If your current themes or plugins are not compatible with the latest PHP version and cause your site to malfunction, downgrading may be necessary.

2. Encountering unexpected site errors, broken pages, or functionalities right after a PHP update is a clear sign that a downgrade might be required. If your site starts acting up soon after an update, going back to a previous version can help fix these problems.

3. If your site becomes noticeably slower or behaves erratically after a PHP update, reverting to a previous, stable version can often resolve these issues. Slowdowns and erratic behavior can be signs that the new PHP version isn’t working well with your site.

4. Custom scripts or code modifications you’ve made may not be compatible with the latest PHP version, leading to errors or performance issues. If your custom code is causing problems, downgrading to a version it works with can help.

5. Newer PHP versions can introduce vulnerabilities that affect your site’s security. If a previous version is more secure in your specific context, downgrading can be a temporary solution while awaiting patches. Always keep an eye on security updates and be prepared to upgrade when a fix is available.

6. Your hosting environment may not fully support the latest PHP versions, leading to server-level issues that impact your site’s performance and accessibility. If your hosting provider isn’t ready for the latest PHP version, downgrading might be necessary to keep things running smoothly.

7. A downgrade may be necessary for testing and debugging purposes. Especially if you’re developing themes or plugins for a wide range of environments. Having the ability to switch between PHP versions can be crucial for development and troubleshooting.

While downgrading PHP can help resolve immediate issues, be mindful of the risks involved, including potential security vulnerabilities. Always ensure you have a comprehensive backup and recovery plan in place before making such changes.

Troubleshooting common issues that arise after downgrading your PHP version

The whole point of downgrading your PHP version is to get something to work. But sometimes, you might run into a few issues. Don’t worry; here’s how you can troubleshoot some common problems:

Site still shows errors after downgrade

If your site is still showing errors, like the white screen of death or the 500 internal server error, don’t panic. First, try clearing your site’s cache and your browser cache like you did in the pre-steps. 

This helps get rid of any old, stored versions of your site that might be causing trouble. Next, make sure your web server has successfully applied the downgrade. If needed, restart the server to ensure everything takes effect.

Plugins or themes not functioning correctly

If some plugins or themes aren’t working right, they might have gotten a bit messed up during the downgrade. Try deactivating and reactivating the affected plugins or themes. Alternatively, contact customer service to see how they can help with your compatibility issues.

Loss of custom code functionality

If custom code or scripts you added to your site aren’t working, review and test them to make sure they’re compatible with the downgraded PHP version. Sometimes, custom code needs a bit of tweaking to work with older PHP versions. If you’re not sure how to fix it, consult the developer who provided the custom code for assistance.

Performance issues

If your site is running slowly, monitor its performance closely. Consider optimizing your database, enabling caching, and using a Content Delivery Network (CDN) to improve load times. Also, check for any resource-intensive scripts or plugins that might be causing slowdowns and address those issues.

Parting thoughts

Ensuring PHP compatibility is crucial for maintaining your WordPress site’s performance and security. Downgrading PHP can often resolve issues that arise from incompatibility after an update.You Could also consider adjusting your PHP time limit if you encounter persistent issues.

Always remember to back up your site and check theme and plugin compatibility to minimize risks. These steps are essential in preventing potential problems.

After downgrading PHP, it’s critical to test your site thoroughly. Make sure that all functionalities, themes, and plugins work as expected. This way, you can be sure that the downgrade has fixed the problems without introducing new ones.

FAQs

How do I downgrade my PHP version in WordPress?

To downgrade your PHP version in WordPress, you need to use your hosting provider’s tools. This can be within the host’s web interface, cPanel, Webmin or Plesk. For example, in cPanel, you can go to the MultiPHP Manager, select your domain, and choose the desired PHP version from the dropdown menu. Then, save your changes and test your site to ensure it works properly.

How do I remove the current PHP version?

You don’t actually remove the current PHP version; instead, you switch to a different version using your hosting provider’s tools. This can usually be done through the hosting control panel, where you can select a different PHP version that you’d like to use.

Is it safe to downgrade WordPress?

Downgrading WordPress itself is generally not recommended because it can introduce security vulnerabilities and compatibility issues. However, downgrading the PHP version can be safe if done cautiously. Always backup your site first and check the compatibility of your themes and plugins.

How do I check my current PHP version in WordPress?

You can check your current PHP version by going to your WordPress admin dashboard, navigating to Tools > Site Health > Info > Server. You can also find this information in your hosting control panel, such as cPanel.

What are the risks of downgrading PHP in WordPress?

Downgrading PHP can introduce several risks, including security vulnerabilities, compatibility issues with themes and plugins, performance degradation, and potential loss of support from your hosting provider. Always ensure you have a backup and recovery plan in place before making changes.

Tags:

You may also like


repair wordpress installation
Repair WordPress Installation In 6 Simple Ways

Is your WordPress site currently facing errors, running slower than usual, or even completely offline? If you’re struggling with the white screen of death, database connection errors, or malware warnings,…

How to Take a cPanel Backup
How to Take a cPanel Backup

Every website admin knows that backing up your website is important. The worst case scenario is not being able to restore a crashed or hacked site. Good backups are like…

How Often To Backup A Site
How Often To Backup A Site

In today’s digital age, safeguarding your data is more crucial than ever. There is also an abundance of advice on when to take website backups and how often to take…

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.