When I first started with this WordPress blog, I installed the Custom Content Type Manager (CCTM) plugin to help me manage custom content types. Although this has been perfectly adequate for my needs, I’ve been looking to migrate over to the Pods plugin for a while now, if only because it seems to offer a bunch of additional features (relationships, a REST API…) and a nicer interface. And recently, when CCTM appeared to have crashed on me for a couple of days (turned out to be a stale cache), I decided to take the plunge.

My blog uses three custom content types: Books, Articles and Presentations. Pods’ documentation is extensive, but it didn’t cover my key problem: transferring control of these existing content types, hitherto managed by CCTM, over to Pods without either corrupting my data or having to spend time exporting and re-importing my posts.

After a few false starts (and database restores), I finally hit upon a simple process to transfer control of my custom content types from CCTM to Pods. At the end of the process, I was able to remove the CCTM plugin and view and manage all my custom content through the Pods interface.

In case you ever need to do this, here are the steps I performed. The steps here reference a Book content type, and you’ll need to repeat the process for each of your custom types:

  • Backup the WordPress database.

  • Install and activate the Pods plugin.

  • Log in to your MySQL database using the CLI and run the following SQL query to rename posts of type book to a (temporary) new identifier. This step is necessary to avoid a name collision with Pods.

    UPDATE wp_posts SET post_type='unspec' WHERE post_type='book';
    

    alt

  • From the CCTM plugin administration page, make a list of the fields attached to the Book content type and then deactivate it. The process should affect 0 posts (because the database no longer has any records with the book identifier).

    alt

  • From the Pods plugin administration page, clear the Pods cache.

  • Create a new Book pod.

    alt

  • Add fields to the new Book pod, ensuring that the field names are identical to those originally attached to the Book content type in CCTM. It’s important to ensure the field names match exactly, as otherwise you might lose some of your custom metadata.

    alt

  • Save the new Book pod.

  • Log back in to your MySQL database using the CLI and run the following SQL query to change your posts back to type book.

    UPDATE wp_posts SET post_type='book' WHERE post_type='unspec';
    

    alt

  • Check the list of Books in the Pods administration interface. You should see that the Pods plugin now recognizes all your Books, and you can use the Pods administration interface to add, modify and delete Book posts.

Once you complete transferring control of your CCTM content types to Pods, you can simply deactivate and uninstall the CCTM plugin. All your previous custom content can now be managed through the Pods interface.