A WordPress-centric search engine for devs and theme authors



flush_rewrite_rules ›

Since3.0.0
Deprecatedn/a
flush_rewrite_rules ( $hard = true )
Parameters:
  • (bool) $hard Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard).
    Required: No
    Default: true
Defined at:
Codex:

Remove rewrite rules and then recreate rewrite rules.



Source

function flush_rewrite_rules( $hard = true ) {
	global $wp_rewrite;
	$wp_rewrite->flush_rules( $hard );
}