WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting 404 errors on all pages however I have multiple custom post types et up and these are working correctly. I have tried all the usual fixes like htaccess file, flushing the rewrite links but to no avail. I seem to be able to get pages working but have broken custom types or custom types working but no pages. Any ideas gratefully accepted!

share|improve this question
What's your permalink structure? What are the rewrite rules for your custom post types? Most likely, the issue is with one or the other. You can probably solve this by using this plugin or this one to inspect your rewrite rules. – Matthew Boynes Dec 5 '12 at 14:17

It sounds like you're using "pretty permalinks" with %postname%. If so, you need to make sure that you don't have page names that match your post type names. WordPress can only allow a particular slug to resolve to one page (that's why you can only get one or the other to work at a time). Or if you do have matching names, make sure when you register your post types that has_archive is set to false (disallows post type archives) or is set to a different slug (to avoid conflicts). Also, check your rewrite rules when registering your post types. For example, you might have something like:

'rewrite'   => array( 'slug' => 'news', 'with_front' => false ),

which means that your "news" post type will be first up in the permalink structure, whereas with_front set to true would prepend your existing permalink structure to the "news" slug. Read more about all this here.

The other possibility (without knowing more about your situation) is that you've recently moved your site. In which case you might need to "relocate" your site. See here.

Hope something there is helpful. I know how frustrating those 404's can be...

share|improve this answer

Your Answer


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