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 - 404 error when changed from 'Default' to 'Post name'

Hi, I'm just starting with the WP theme development - following the 'How to Build a Wordpress Theme". When I change permalinks settings from 'Default' to 'Post name', my Home page is fine, but Blog gives 404 error - page not found. When switching back to 'Default' - everything is working fine. Could anyone advise on that? TIA

I think I found a solution. As I'm working on my local server (WAMP) I just need to enable 'rewrire_module' in Apache server. Detailed instructions can be found here: http://www.wpbeginner.com/wp-tutorials/how-to-enable-custom-permalinks-in-wordpress-wamp-installation/

2 Answers

The links that you are seeing in your browser most likely have changed when you change the permalink settings. when you refresh the browser with the older link, it should return a 404, as the name of the post has changed along with it.

I think that this is what is happening here. Let me know otherwise.

Hi Diego, Thanks for your prompt response :) I go to the page from: 'Pages' section in admin area, then click on 'View' link below my 'Blog' - I have new page address in my browser, i.e.: 'http://localhost:8070/hom/blog/' (this is not working) instead of 'http://localhost:8070/hom/?page_id=8' (which is working fine) (port 8070 is correct in my setup)

I know that you can actually find the specific permalink for that specific post on the edit post screen, below the Title Edit text area.

What does your permalink say for that page/post?

When you copy and paste those 2 permalinks into your browser, does it still return the 404?

Yes, for both links. But not for Home page (static): http://localhost:8070/hom/

Hi Diego, Thanks for your prompt response :) I go to the page from: 'Pages' section in admin area, then click on 'View' link below my 'Blog' - I have new page address in my browser, i.e.: 'http://localhost:8070/hom/blog/' (this is not working) instead of 'http://localhost:8070/hom/?page_id=8' (which is working fine) (port 8070 is correct in my setup)