How to Downgrade WordPress Version with WP-CLI

Updated in WordPress After that, you may need to downgrade your WordPress version if you encounter an error, and one way to do that is to use the WP-CLIThe

In fact, the use of WP-CLI Downgrading WordPress is not just for downgrading versions, you can also use it to update WordPress to a specific version. For example, updating from version 6.0 to 6.3.

However, it is always recommended to keep WordPress updated to the latest version, and downgrading without the need to do so is strongly discouraged. This is because core updates to WordPress usually bring new features, as well as security and performance improvements.

If you decide to downgrade and understand the risks involved, you can follow the steps below next.

How to Downgrade WordPress Version with WP-CLI
How to Downgrade WordPress Version with WP-CLI

Steps to downgrade WordPress version using WP-CLI

Step 1: Open the WordPress installation directory

First, go to the WordPress installation directory. Please note that you are not going through the FTP, file manager, or host panel to access it, but instead operates through the command line instrumentation (CLI).

Image [2] - How to downgrade WordPress version using WP-CLI

You can use the cd command to access the installation directory. For example, suppose your installation directory is web/wpgan.tld/public_html, you can use the following command:

cd web/wpgan.tld/public_html

Step 2: Check the currently installed version of WordPress

After entering the WordPress installation directory, use the following command to check the currently installed version of WordPress:

wp core version
Image [3] - How to downgrade WordPress version using WP-CLI

This helps you to confirm the current version number and to compare the new version with the downgraded version after performing the downgrade operation.

Step 3: Find the version of WordPress you want to use

To find the version of WordPress you wish to use, you can visit the official WordPress Publishing History Page::WordPress ReleasesThe

Find the version number you wish to use, for example 6.4.2Then note down the version number for subsequent operations.

Image [4]-How to downgrade WordPress version using WP-CLI

Step 4: Use WP-CLI Downgrade WordPress

When you are ready, you can use the following command to downgrade:

wp core update --version=6.4.2 --force

Here. --force parameter is required because you will be downgrading to a different version than the current one, so you need to force the downgrade operation.

After successful execution, the command line displays something similar to the following:

Image [5]-How to downgrade WordPress version using WP-CLI

Step 5: Check the downgraded version

Once the downgrade is complete, you can check using the following command WordPress version to ensure a successful downgrade:

wp core version

If the downgrade is successful, the version number displayed should be different from the version in step 2.

Image [6]-How to downgrade WordPress version using WP-CLI

summarize

By using the WP-CLIYou can easily put the WordPress Downgrade to any specified version without manually downloading core files or using plugins. While downgrading can solve problems that occur with some updates, please try to avoid frequent downgrades unless there is a specific reason.


Contact Us
Can't read the tutorial? Contact us for a free answer! Free help for personal, small business sites!
Customer Service
Customer Service
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: info@361sale.com
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
This article was written by: thieves will be rats and mice courage
THE END
If you like it, support it.
kudos8213 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments