A while back I wrote a post called, How To Stop WordPress From Auto-Creating A Htaccess File.
I figured out I messed up. I told you to comment out all 5 lines for this block of code:
generate_page_uri_index();
delete_option('rewrite_rules');
$this->wp_rewrite_rules();
if ( function_exists('save_mod_rewrite_rules') )
save_mod_rewrite_rules();
But i realized you only need to do this:
generate_page_uri_index();
delete_option('rewrite_rules');
$this->wp_rewrite_rules();
/*if ( function_exists('save_mod_rewrite_rules') )
save_mod_rewrite_rules();*/
I found this out earlier when I went to create a new page and couldn’t figure out why I kept getting 404 errors. Apparently the first few lines tell WordPress how it should handle rewrites, and the last two lines are the ones that actually write to .htaccess.
Whoops ![]()
Please subscribe, or else I will cry. Do you really want to make a programmer cry?

Leave a Reply