How to Flush Rewrite Rules in .htaccess file in WordPress

June 9, 2013

I’m going to show you guys, an easy way to flush out the rewrite rules in .htaccess file in WordPress. This is pretty simple way to flush rewrite rules in .htaccess file. Even you don’t need to login to cPanel, because you can flush rewrite rules directly from WordPress dashboard.

It’s consider that flushing the rewrite rules is an expensive operation. Out there are many tutorials that suggest executing it on the ‘init’ hook. However, this is bad idea. Rather than implement hard coding, you should flush rewrite rules on the activation hook of a plugin, or when you know that the rewrite rules need to be changed.

More details about Flush Rewrite Rules.

Rewrite Flush Button

Rewrite Flush Button is a WordPress plugin that adds a button in your WordPress Admin area. This plugin allows WordPress blog admins to manually perform flush rewrite rules action once, whenever there is a problem.

What we gonna do now, is simply download and install Rewrite Flush Button plugin in your WordPress blog. Then go to Settings > Permalinks:

Now, clicking the flush rewrite rules button will automatically flush out rewrite rules in htaccess file. That’s it.

Muhammad Dilawar
Muhammad Dilawar
Muhammad Dilawar is a WordPress developer and technical SEO specialist with over 12 years of experience building, optimizing, and maintaining websites. He specializes in WordPress, WooCommerce, server optimization, DNS, Cloudflare, website security, and performance improvements. Through Softstribe, he shares practical guides, tutorials, and industry insights based on real-world experience helping businesses grow their online presence.
More from Muhammad Dilawar