Can this Plugin automatically clear cli cach?
-
Suddenly, cli cache is exceeding quota on some of my sites and bringing them down. Wondering what “kick one off manually via WP-CLI.” means on your intro page, and if this Plugin can automatically clear cli cach?
Thanks!
-
“kick one off manually via WP-CLI.”
Means there’s functionality built into the plugin to be able to run it’s purge functionality with WP CLI.
From the FAQ:
How do I run a purge from the command line?
wp the_cache purgeAdd
--allow-rootif running as root. On a multisite, add--url=https://yoursite.comto target a specific subsite.No. This plugin cannot clear WP CLI caches. What you can do is run this on your server if you have shell access to it:
wp cli cache clearAlso, you can run this to find your servers WP CLI cache locations:
wp cli infoNote, if you are logged in as
rootorsudoyou will need to append--allow-rootto the command you run.Hi,
Appreciate the quick reply. I have to admit that the command line info is lost on me, hence my looking for a Plugin solution. I am seeing various low quota sites on my account go down due to .wp-cli directory creating dozens & dozens & dozens of stupid backups of WordPress Plugins. This seems to be a recent and unfortunate development. Searching online for a solution offers command line (over my head) and WP-cache options. I’m not sure if wp-cli and WP-cache are the same thing. Anyway, I don’t want or need dozens of Plugin backups on these accounts and I just want it to STOP.
Thanks!
I feel your pain mate…
Do you have control panel access? You may be able to manually clear it out from there… usually … (if its a cpanel server) the cli cache is located in the accounts
.wp-cli/cache/directory, this “should be” accessible from thepanel->Files.If it’s not cpanel, let me know what it is and I can at least point you in the right direction…
Also I’ll search around a bit more to see if it’s possible, but, I do doubt it is. Generally it would require enabling PHP functions on the server that far too dangerous.
Either way I’ll pop back in, in a bit and let you know what I find.
Thanks! Yes, I do have whm & cpanel access. I manually deleted the contents of the core & plugin folders under the .wp-cli > cache folder. I’m ‘talking’ to hosting support about this, and I should probably learn how to disable wp-cli via command line. If all wp-cli function does is make backups of old WordPress versions & Plugins, I can’t see why anybody needs it. Thanks again!
@loosefast 🙂
Good luck with the “talk” mate 🙂wp-cli is pretty handy with everything else that it can do… I’ve run into times with “maintenance clients” where their site’s are mission critical, but they need 20 plugins updated because they came to me hacked and a mess… utilizing wp-cli for the updates runs quite a bit faster than doing them in wp-admin, and downtime is very minimal if any.
CPanel on the other hand… well… best I can say is I left them a long long time ago, and never looked back 😉 Hosting providers dont really have too many more options for providing their clients a control panel tho, so I do know its still in heavy use all around the world 🙂
It’s entirely possible that cpanel utilizes it to run its backups.
Thanks! I do see how wp-cli can be useful for a hacked website. Although, my last critical site down turned out to be AI bots sucking the life out of a site. A story for another thread…
You must be logged in to reply to this topic.