Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using Wordpress 3.3.1, installed on my local machine. I've gotten everything up and running, and I'm able to add posts and pages through the admin interface, but whenever I try to click the "preview changes" button from either one of my posts or pages, I get a 404 Not Found page instead. The URL appears to be correct, I've even tried copying the permalink and pasting it into the address bar, but it still gives me a 404 page. As far as I can tell the posts and pages are being added correctly, and I can view and edit their contents from the admin interface, just not from the main site itself. What could be causing this and how do I fix it?

share|improve this question

2 Answers 2

What you have (probably) is an error with your .htaccess or your local
server wasn't set up / enabled to support permalinks... Try disabling the
Permalinks in admin settings and it should work great.

In most local host you can enable Permalinks support.. (its called a rewrite module)

Here is the option on my localhost (using WAMP)

enter image description here

.
Hope this helps.
Cheers, Sagive

share|improve this answer
1  
Or you can do in server's console: a2enmod rewrite && services apache2 reload to enable module mod_rewrite which is responsible for Permalinks support in WP. –  troyane May 20 at 12:03
    
Great tip ;), thanks for sharing mate. –  Sagive SEO May 20 at 16:21
    
You can add it to your answer. Your answer is useful and can be accepted as correct answer for this question :) All is for @comjuliox –  troyane May 20 at 19:59

Ok, I figured it out. I had a friend install this for me, and he told me that he didn't modify anything and it was a fresh install, but when I took a look at the Settings -> Permalinks screen I saw that there was a custom structure defined "/%categories%/", so I set it back to "default" and now it's working again.

share|improve this answer
    
Or you can enable rewrite moudle in your localhost as shown in my answer –  Sagive SEO Mar 31 '12 at 17:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.