Ok, this is embarrassing. I created an infinite loop on every page using the following rewrite rule:

add_rewrite_rule('.', 'home/', 'top');

I have no idea how to undo it, as every page, including settings pages, now give me a 500 error. Any idea how to fix it?

  • try to rename the file .htaccess on the root of the website – mmm Oct 19 '17 at 10:44
  • Oh wow, the .htaccess file contains the rules themselves! Thanks for pointing me in that direction! – Protector one Oct 19 '17 at 10:46

You can remove the offending rewrite rule manually from the .htaccess file, in the web site's root.

Thanks, "mmm"!

  • 1
    Most of rewrite rules are not stored in .htaccess, but you probably can use that to knock out pretty permalinks from working altogether in such case to get to the site. To force WP to regenerate rules you can also erase rewrite_rules option in options table in database. – Rarst Oct 19 '17 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.