Posts

Showing posts with the label Flush rewrite

Flush Rewrite Rules in Wordpress

Flush Rewrite Rules Know All rewrite tricks When you change your WordPress URL structure or add new rewrite rules then the WordPress database will need to be updated with the new URL rules this is so it will understand how to search for your posts from the given URL. Sometimes you get the problem of changing a URL structure and WordPress returning a 404 page for your posts. This can be because the rewrite rules have not refreshed correctly. There are a few ways you can refresh the permalink rules. First you can navigate to the permalinks page  Settings -> Permalinks  and change the permalink click the save button, then change it back to the way it was. This will refresh all the rewrite rules on your website and your custom post types should be displayed. Secondly you can open phpMyAdmin, navigate to the  wp_options  table and delete the rewrite rules record from this table. Next time WordPress loads it will check for the rewrite rules in this table...