How to revert WordPress to a previous version

Sometimes you might want to revert WordPRess to a previous version. You can do this in two ways. By using a plugin or from the command line if you have SSH access.

Downgrade WordPress version via plugin

1. Connect to your WordPress installation.

2. Install a plugin that will help you in downgrading your WordPress verrsion. One plugin that can assist you on this is Core Rollback. Install it.

3. Navigate to Tools >> Rollback Core. You are being redirected to /wp-admin/update-core.php?force-check=1

4. Choose your desired version and click the Rollback button.

5. On the next screen choose Re-install version x.x (version that you choose in setp 3.)

6. The selected WordPress version is now installed.

revert wordpress version
Downgrade WordPress version

Downgrade WordPress version via wp-cli

If you have SSH access to your account, and the WordPress CLI is installed on your server, you can use this command to install a specific version:

wp core update --force --version=x.x

Example:

[root@web wp]# wp core version
5.9.1
[root@web16 wp]# wp core update --force --version=5.9
Updating to version 5.9 (en_US)...
Downloading update from https://wordpress.org/wordpress-5.9.zip...
Unpacking the update...
Success: WordPress updated successfully.
[root@web wp]# wp core version
5.9
[root@web wp]#

Related articles:
How to install older versions of WordPress plugins

Leave a Reply