Forum Topic: Data in WP database causing 404 redirect errors?
Hey Jeff-
I bought your book this weekend to try and troubleshoot one of the more perplexing .htaccess errors I’ve noticed. I built http://bluemesagrill.com/
recently and after moving it to production and launching, I turned on Permalinks and immediately every page went to 404.
Here’s a list of stuff I tried and my current conclusion. Perhaps you have some idea of what to try next?
1. Verified mod_rewrite was active (from web host)
2. Verified this was added to the httpd.conf:
AllowOverride All
Options FollowSymLinks
3. Verified WP rules were added to .htaccess
After that, I tried
4. Turning off all plugins. No change
5. Switching to twentythirteen theme. No change
6. Installed clean version of WP and copied theme over – WORKED
7. Imported data into database – STOP WORKING
8. Deleted all plugins – still not working
This leads me to believe it’s something in the database that’s causing the errors as my theme worked fine with no data.
What does .htaccess look for in the database to redirect the pages? If I knew what it was looking up, I could look at the records in the db.
1 Reply to “Data in WP database causing 404 redirect errors?”
Yes it sounds like an issue with existing DB settings, perhaps involving some plugin or theme settings and not WP itself..
Technically .htaccess isn’t “looking” for anything in the database, rather it responds to requests based on parameters, headers, and so forth. But there is some good documentation available for going further into how/what WP is doing with permalinks:
https://developer.wordpress.org/reference/classes/wp_rewrite/
..which also links to this gem:
https://lists.automattic.com/pipermail/wp-testers/2009-January/011110.html
Hopefully that is useful for you.