Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Permalinks effected by database? Really bizarre and persistent problem.

I've got a local site with MAMP that I'm developing. It's got a lot of custom development I've done, but it's all segregated into my plug-in. I was starting to work on some interaction with WooCommerce, realized it wasn't active, so I activated WooCommerce.

And that's when it happened...

My permalinks are not working at all. I'm getting a wordpress not found 404 (not a server 404) when I'm trying to access page post types. Single-posts are OK, but pages are not working. I had it set to post name structure for permalinks. The only structure that is working is the default generic ?=p32 or whatever the slug is for the permalinks based on IDs.

I started with the usual: change the permalink in the settings, change it back, save it a few times, etc.. Then I erased the .htaccess file, reset the permalinks and still, not fixed. Further digging, I went into MAMP's settings and ensured mod_rewrite was enabled.

Here's the kicker.. I set up a new folder, a new fresh install of wordpress, and a fresh new database... the permalinks work. I imported the theme I built, as well as all my plug-in code. The permalinks work. THEN.. I migrated my old database into that fresh install and suddenly, the permalinks break.

How can a database break permalinks?