It is usually best to use the most recent versions of WordPress installation, plugins, and theme as well as the latest version of PHP. However, occasionally doing so is not beneficial or possible.
The case may be that your plugin or theme has no newer version or alternative and it is not compatible with the WordPress upgrade being used. It is also possible to have automatically upgraded to the Gutenberg version although you prefer the Classic version.
It is feasible to revert WordPress to a previous version and fix existing bugs. This article shows how it can be done.
Downgrading is returning to one of the previous versions of WordPress core files. The list of all the releases is available on the WordPress release archive.
There should be a specific reason for downgrading, and there are not many valid reasons for doing so. These could be:
It is usually not WordPress itself that is causing bugs on your website. Rather, it is most often plugins. To fix them, deactivate the plugin and wait for the update or a more compatible version to be released.
A temporary downgrade is acceptable only after it is certain it is one of these three issues: The latest WordPress core code is causing issues, the plugin that’s incompatible with the latest version is indispensable, or the theme you are using is incompatible. Only then will there be no alternative but to revert to a previous version until the issue is resolved.
Remember to back up the whole website and database before you proceed.
Start by deactivating all plugins via the WordPress backend. Check the box next to every plugin and select the “bulk deactivate” option.
It is also possible to deactivate each plugin manually. Use Secure File Transfer Protocol (SFTP) and FileZilla or a similar client. It would be beneficial to get familiar with how to use them as these tools will be needed for other steps.
Now, you can download the WordPress version needed. If uncertain of which specific release is the best, revert one version at a time. This will also prevent compromising the website’s security.
The next step is assessing the website’s files and deleting the wp-admin and wp-includes directory. FTP or FileZilla are needed to complete this.
Then, install all the files (excluding the wp-content directory) from the WordPress version you’ve chosen. Choose “Overwrite > Ok.”
When that’s done, go to the website’s backend. If a prompt asks to update your database, select Update WordPress Database, and log in. The process ends when the database update completes successfully.
It is possible to receive 404 errors on posts after downgrading. To solve this, you’ll need to rebuild your permalinks. Go to Options > Permalinks, select a different permalinks option, save changes, choose the original permalinks option again, and save changes.
The last step is to disable automatic updates. Keep it this way until everything is working well and there are no incompatibility issues. When this occurs, upgrade manually and enable automatic updates again.
Another way to disable automatic updates is to edit the wp-config.php file by adding the following line of code:
define( ‘AUTOMATIC_UPDATER_DISABLED’, true );
While a WordPress version update may be causing problems, it is more often a plugin or a theme. Reverting to a previous version of a plugin or theme is possible using another plugin.
Downgrading a specific plugin may be required if you are using a downgraded version of WordPress.
If the theme or plugins were obtained from a different source than the WordPress repository, a manual rollback must be executed. Follow these steps:
1. Back up your website.
Make sure to back up all the content and database of the WordPress website.
2. Download an older version of the plugin or theme.
Downloading the previous version of the code will also be required. Look for “all versions” or “older versions” on the developer website or the source it was downloaded from.
3. Change the name of your plugin or theme folder.
After obtaining the .zip file, log in using FTP, go to the wp-content folder, and then to the appropriate folder (themes or plugins).
Rename the folder with the theme or plugin needed to downgrade. To make the original version simple to find and restore, it is recommended to put “-temp” at the end of the filename.
4. Install the desired older version of the plugin or theme.
Go to your WordPress admin panel.
Look for the .zip file that was downloaded previously and WordPress will run the installation process.
Activate the plugin or theme and ensure all is functioning well.
Go to the FTP client and delete the plugin/theme folder that was renamed earlier.
If the database has not been crucially affected by the plugin, all should be working properly. If errors appear, a restoration to the whole WordPress database is needed. Do a full backup before implementing any updates.
This procedure is more complicated in regard to themes and premium plugins since the WordPress Theme directory doesn't have older versions ready for download and the premium plugins are not always accessible. In those cases, get in touch with the developer and ask for help.
Some cases might require you to revert to an older version of PHP. Usually, the newest version of PHP is installed together with the server. Cross-check which PHP version is compatible with the WordPress release being downgraded to.
Changing the PHP version will influence the plugins and themes, so reverting them to previous versions may be needed as well. Otherwise, nothing will function properly.
Due to security risks, reverting to a previous version of WordPress should only be temporary. It is advised to find an alternative theme or plugin if the one not functioning properly does not have an active developer.
Going back to an older version of WordPress is only justifiable if it is necessary to solve the bugs. If the latest version of WordPress is not compatible with one of your plugins (and that plugin is in the process of upgrading), rolling WordPress back while waiting for the plugin update is an option.
If you enjoyed reading this article on how to revert WordPress to previous version, you should check out this one about fixing the destination folder already exists.
We also wrote about a few related subjects like how to remove category from WordPress URL, WordPress posting to Facebook, how to reorder pages in WordPress, fix the could not save password reset key to database, failed to load resource, fixing the another update is currently in progress, how to add a button in WordPress and why WordPress is the best platform to build your business or startup website.