Flushing ReWrite Rules in WordPress

Every time, you write or rewrite a rule or a permalink structure in WordPress, it is extremely important that WordPress understands and saves the changes that you made on your site. Without this, your newly created rules won't be effective. This is exactly where Flushing rewrite rules becomes the key. If you are a plugin or theme developer or simply an expert in PHP, most probably you wouldn't have any issue with this because you may have known that we would be using the flushing rewrite rules function.
<?php flush_rewrite_rules(); ?>
But for those who are relatively new or just started getting their hands dirty with codes in WP, this post is for your. The procedure of flushing the rules manually is fairly simple and easy.

How to do it?

If you are not logged in to your site's dashboard, feel free to log in and follow these steps. Step 1: From the left hand side menu, find "Settings". Step 2: Click on "Permalinks". Step 3: From the Permalinks Settings page, simply click on blue colored "Save Changes" button once. At the this point your newly written permalink rules should be working. However, just in case if you had "Custom Structure" selected from "Common Settings" area and it doesn't work. Select the "Default" from the "Common Settings" section and click on "Save Changes" button and then roll back to your previous selection (Custom Structure) and then click on "Save Changes". It should work unless you messed up something really bad. Good Luck.


Commenting is disabled.