WordPress.org

Forums

Posts 2 Posts
Importing custom post type posts to new blog loses P2P connections (4 posts)

  1. conradh
    Member
    Posted 4 years ago #

    I'm using the Posts 2 Posts plugin and have related two custom post types to each other. I exported all posts of both types from an existing blog, and imported them into a fresh WP install. No Posts 2 Posts relationships are displaying in the new blog for posts of either custom post type.

    Is this expected behavior? Is there any way to rectify this or should I just recreate the relationships? If I recreate, is it necessary and/or is there a way to clean out the old relationships that were imported?

    Any guidance is appreciated. Thanks!

  2. scribu
    Member
    Plugin Author

    Posted 4 years ago #

    No relationships are exported, so you have to recreate them manually.

    If you have a lot of relationships, you could try doing a direct database export / import using phpMyAdmin.

  3. conradh
    Member
    Posted 4 years ago #

    Thanks for the info. I've now upgraded to version 0.4 of the plugin so I have the wp_p2p and wp_p2pmeta tables. If I do an export and import to a fresh blog install, it looks like the post IDs are retained in the new db. Would it be possible to copy over the wp_p2p tables and get the relationships into the new blog install? If not, can you give me any guidance on what the best way to code a relationship import/export tool might be? I haven't looked at import/export much so I appreciate any advice you've got. I'd be happy to share my code for inclusion in the plugin if I get something working. Thanks!

  4. scribu
    Member
    Plugin Author

    Posted 4 years ago #

    I've now upgraded to version 0.4 of the plugin so I have the wp_p2p and wp_p2pmeta tables. If I do an export and import to a fresh blog install, it looks like the post IDs are retained in the new db. Would it be possible to copy over the wp_p2p tables and get the relationships into the new blog install?

    Yes, that should work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic