Recently while setting up a WordPress site on a Cherokee server (no Apache/mod_rewrite), I made a little miscalculation (ahem) which resulted in the permalink structure being changed to something inaccessible, thus preventing us from being able to access the site whatsoever.
The wp-admin backend was also inaccessible because we are using a custom static login page, so access to the
/wp-admin/ directory was routed to a static
/login/ page (which, because of the fudged permalink rules, was unavailable. Huh?
(Long story short – servers without
mod_rewrite need the start of the permalink structure to be eg.
Naturally, I jumped into PHPMyAdmin to inspect the site’s options, and changed the
permalink_structure in the
wp_options table manually.
This won’t fix the problem if you’re unable to access the backend, though, as WordPress caches its rewrite rules until something changes in the site that would effect a permalinks flush (or until the permalinks page is visited). The cached rewrite rules will ignore the updated permalink structure, so you’re still screwed.
Solution: Manually flush WordPress’s rewrite rules with PHPMyAdmin
rewrite_rules option key in the
wp_options table, hit edit, and delete everything in there. Then save it. This will force WordPress to rebuild it when you try to access anything. Fixed!
This is admittedly a pretty obscure problem, but I hope it helps somebody someday.