Cookbook › WP-CLI
Clear the cache with WP-CLI
Paste into ChatGPT or ClaudeI just changed my menu and the site still shows the old one. Use WP-CLI to clear every cache you can.
Changes your site. Standard asks you first in wp-admin; Trusted does it directly.
What happens
Section titled “What happens”- Your assistant runs
wp cache flushfor WordPress’s object cache. - It clears your cache plugin if it’s LiteSpeed Cache, SiteGround Optimizer, WP Super Cache, W3 Total Cache or Breeze, and Elementor’s CSS with
wp elementor flush-css. - It tells you what it cleared.
Try also
Section titled “Try also”- “Flush the permalinks.”
- “Which scheduled tasks are due to run today?”
Good to know
Section titled “Good to know”- A CDN or your host’s own cache may need clearing in their dashboard.