Skip to main content
Code Tutorial

How to Flush WordPress Permalinks Using WP-CLI ​

If you're facing issues with WordPress permalinks, you can easily flush and refresh permalinks using the WordPress admin. However, if you are a developer you can use the WP-CLI:

wp rewrite flush

If you are new to the WP-CLI, follow these steps to get flush your permalinks:

  1. Step 1: Install the WP-CLI.
  2. Step 2: Change to the root directory of your WordPress site cd /path/to/your/wordpress.
  3. Step 3: Run this command wp rewrite flush.

Your WordPress permalinks are now refreshed, and the rewrite rules are updated.

Access More TypeRocket

Join our community mailing list and get notified before anyone else. Get videos and more.

By using our website you agree to our Cookie policy.