Flushing WP CLI caches

WP CLI saves WordPress archives every time you setup a new WordPress website. Mostly, actions performed within the WP admin will automatically clear the cache, but you might run into a situation where you need to manually clear it. In that case, you will need to manually clear the cache in 2 ways: WP-CLI command or direct OS bash command.

It basically could be clear with simple command:

$ wp cli cache clear

With showing an output:

Success: Cache cleared.

But sometimes object cache can’t be flushed. In this case you can remove those caches by the following command:

$ rm -rf /root/.wp-cli/cache/*
$ rm -rf /home/*/.wp-cli/cache/*

Looking for a custom solution?

Our technicians can provide you with the best custom made solutions on the market, no matter whether you're a small business or large enterprise.

Get in touch