• Skip to primary navigation
  • Skip to content
  • Skip to footer

Drew Poland

Freelance WordPress Developer

  • About
  • Portfolio
  • Services
    • WordPress Design
    • WordPress Development
    • Project Consulting
  • Blog
  • Lets Talk

Update post_type After Changing Custom Post Type Slug Name

You are here: Home / WordPress Development / Update post_type After Changing Custom Post Type Slug Name

This is hopefully a real rare issue to run into, but you never know. You just might be a klutz too.

I was working on a site for a client when I realized I mislabeled the custom post type I created. I already had a bunch of content for that custom post type, so when I renamed the CPT all those pages disappeared of course. They were still attached to the old post_type.

They are still in the database though and here’s how you can quickly update them without having to manually change the post_type field for each entry.

You’ll just need to login to phpMyAdmin and run the following SQL query after changing “old” and “new” in the query.

About Drew Poland

Drew Poland is a WordPress Developer from Baltimore Maryland, often seen wearing Argyle, combing his beard and drinking absurd amounts of coffee.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer

learn more

  • About
  • Speaking
  • Blog

work with me

  • Contact
  • Submit RFP
  • Project Worksheet