📝 One Bad Line = Whole Site Down
A single malformed rule in .htaccess — from a plugin, a manual edit, or a bad copy-paste — can take down your entire WordPress site with a 500 Internal Server Error, and because it happens BEFORE WordPress even loads, the admin dashboard is unreachable too.
🔍 Why This Locks You Out Completely
.htaccess is read by Apache before PHP or WordPress ever runs. A syntax error there causes a 500 error at the web server level - which means wp-admin is just as broken as the front end. You can't fix this from inside WordPress; you need direct file access.
✅ The 2-Minute Fix
- Connect via FTP/SFTP or your host’s File Manager (cPanel/Plesk) — the WordPress dashboard itself is unreachable, so this step is mandatory.
- Rename .htaccess to .htaccess-broken (don’t delete it yet, you may want to compare it after).
- Reload your site — if it comes back up, the .htaccess file was the cause, confirmed.
📄 Regenerate a Clean Default .htaccess
# Once the site is back up, log into wp-admin, go to: Settings -> Permalinks -> click "Save Changes" (no need to change anything) - WordPress automatically regenerates a fresh, valid .htaccess with the standard WordPress rewrite rules. # If you had custom rules in the old file (redirects, security # rules from a plugin), re-add them one at a time from the # renamed .htaccess-broken backup, testing after each one.
⚠️ Prevent the Next One
- Always download a copy of .htaccess before editing it manually or installing a plugin that modifies it.
- Test .htaccess changes on a staging copy of the site first if your host offers one.
- Keep a plain-text note of any custom rules you rely on, so restoring them later doesn’t require reverse-engineering a broken file.
The scariest part of a bad .htaccess is that WordPress looks completely broken when really it’s one renamed file away from working again — the fix lives entirely outside WordPress itself.




