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 Local WordPress Development Local WordPress Development Migrating WordPress from Local to Live Server

Giles Hales-Tooke
Giles Hales-Tooke
1,888 Points

Permalinks fail when set to "post name"


I'm in a situation where my upload works fine, until I try to set the permalinks to post name, at which point my navigation fails with a 404

any ideas?

2 Answers

Hi Giles,

I've just checked my local WP installation as I couldn't remember if I had the same issue originally but switching to post name had no effect.

Hopefully one of the following will help point you in the right direction though :)


Giles Hales-Tooke
Giles Hales-Tooke
1,888 Points

Hey Rich ... thanks ... I've fixed it in steps as follows (for anybody who might be in the same situation - e.g. setting up virtual hosting to serve multiple WP sites)

  1. The first link (404-errors-with-permalinks-set-to-postname) points to a discussion on using a feature call "mod_rewrite" (basically, this enables "post name" type permalinks to work)

  2. "mod_rewrite" is a bunch of commands saved in a special file called .htaccess - this file sits in the root of each domain that you want to host. It has the dot in front of it to tell your server to hide it (e.g. you will not see it in things like filezilla, but you can open it in a commandline browser with an editor such as nano)

  3. here's the bit that if forgot YOU NEED TO ENABLE MOD_REWRITE by calling sudo a2enmod rewrite

Hope this helps Thanks for the pointer Rich!

No problem :)