I'm setting up a new site on 3.4.1 and the Permalinks will not work.

I have deactivated all plugins and switched to TwentyEleven and they still fail.

I can see through outputting $wp_rewrite that the rules are being flushed when I chnage the structure, and .htaccess is being updated, but no matter what I do, I just get a 404 error.

I also notice that it doesn't matter what structure I use (excluding default), all links are in the format of the /%postname%/ structure.

Any suggestions of what else I can try? Thanks.

  • 1
    Is there a valid .htaccess file in your site root? – TheDeadMedic Jul 6 '12 at 11:13
  • Yes, the .thaccess file is available and being updated when I change the Permalink structure. Have deleted and ensured that a new one can be created also, and that worked fine. – David Gard Jul 6 '12 at 11:21

Do you have any custom post types? Is there any chance that a page or post is using the same slug as a custom post type?

Also, does your home page work or is it a 404 for all pages?

  • Thank you King Li, but this is sorted now. – David Gard Jul 6 '12 at 12:13
  • Ok that's good to hear anyway! – KingLiNoodles Jul 6 '12 at 12:21

As I was always getting a server generated error, a friend of mine pointed out that this meant the .htaccess file was not even being read.

He advised checking the .conf file for the site, and sure enough, there was a typo in the <Directory /var/www/...> entry, meaning that the directory was not being read correctly when a user visited the site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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