{"repo":"wp-cli/rewrite-command","free":true,"listed":false,"github":"https://github.com/wp-cli/rewrite-command","clone":"git clone https://github.com/wp-cli/rewrite-command.git","description":"Lists or flushes the site's rewrite rules, updates the permalink structure.","language":"PHP","stars":21,"topics":["wp-cli","wp-cli-package","wordpress","cli","rewrite","router","hacktoberfest"],"license":"MIT","category":"cli-tools","readme_excerpt":"wp-cli/rewrite-command ====================== Lists or flushes the site's rewrite rules, updates the permalink structure. Quick links: Using Installing Contributing Support Using This package implements the following commands: wp rewrite Lists or flushes the site's rewrite rules, updates the permalink structure. wp rewrite See the WordPress Rewrite API and WP Rewrite class reference. EXAMPLES # Flush rewrite rules $ wp rewrite flush Success: Rewrite rules flushed. # Update permalink structure $ wp rewrite structure '/%year%/%monthnum%/%postname%' Success: Rewrite structure set. # List rewrite rules $ wp rewrite list --format=csv match,query,source ^wp-json/?$,index.php?rest route=/,other ^wp-json/(. )?,index.php?rest route=/$matches[1],other category/(.+?)/feed/(feed rdf rss rss2 atom)/?$,index.php?category name=$matches[1]&feed=$matches[2],category category/(.+?)/(feed rdf rss rss2 atom)/?$,index.php?category name=$matches[1]&feed=$matches[2],category category/(.+?)/embed/?$,index.php?category name=$matches[1]&embed=true,category wp rewrite flush Flushes rewrite rules. wp rewrite flush [--hard] Resets WordPress' rewrite rules based on registered post types, etc. To regenerate a .htaccess file with WP-CLI, you'll need to add the mod rewrite module to your wp-cli.yml or config.yml. For example: OPTIONS [--hard] Perform a hard flush - update .htaccess rules as well as rewrite rules in database. Works only on single site installs. EXAMPLES $ wp rewrite flush Success: Rewrite rul","default_branch":null,"files":null,"tree":[],"storefront":"/r/wp-cli","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/wp-cli/rewrite-command/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}