Flushing from WordPress Admin
To flush WordPress rewrite rules or permalinks (usually needs to be done manually for new custom post types) from the Dashboard:
- In the main menu find
Settings > Permalinks
- Scroll down if needed and click
- Rewrite rules and permalinks are flushed.
Flushing rewrite rules in PHP
To flush the permalinks or rewrite rules from your theme or plugin you need to use the flush_rewrite_rules() function.
<?php flush_rewrite_rules(); ?>