WordPress custom post type 404 with “pretty” permalinks

Posted on

Here’s the scenario, you’re working locally (or maybe you’re not), all your work is ready to be pushed to a live server (or maybe it’s already there). Regardless, you’re done coding and all there is left to do is configure your permalinks and tell google you’re ready for the big stage.

You enter you permalink structure of choice (min happens to be /%postname/) and click save. After checking you site to assure nothing has broken, you realize that all you custom post types through a 404 error. Hmmmmmm. When this happened to me, I double checked that my upload went alright and then changed my permalinks back to defaults and then everything worked again.

Turns out there is a bit of a bug here, so I wasn’t actually going crazy. If you’ve found this page becuase you’ve had a similiar problem do the following:

1) Assure that you do not have any wierd rewrite rules going on in your .htaccess file

2) Change permalink structure

3) Create post

At this point, if you are still getting a 404…

1) Clear browser cache

2) Flush rewrite rules simply by visiting your permalink page. Can’t hurt to save again I suppose.

3) Create new custom post

Need WordPress Support? Get 10% of your subscription by using coupon "subscription10"
WordPress Maintenance Plans
Your turn. Join the conversation.
Questions? Post 'em bellow or find me on Twitter.
To post code: <pre> <code> Your code here </code></pre>
  • Brooke

    Negative. Did not work for me. Thanks for posting though. I guess it was worth a shot.

  • Hmmmmm, there is probably something more wrong with your permalinks.

    What the above process does, is clear a cached permalink setting. Nothing more. Nothing less.If you’ve altered your theme by altering the native loop or added a custom post type, you could have a straight up pagination issue.