WordPress.org

Ready to get started?Download WordPress

Forums

WP Importer > "Post Already Exists!" How to Disable Duplicate-Check (5 posts)

  1. sparkfactor
    Member
    Posted 2 years ago #

    Hello, I have gotten myself in quite a pickle...

    I have a large directory of posts (about 4,000) that I recently exported, and did some tedious Find & Replace to the body content, and have now attempted to re-import into my site.

    However, only about half of my posts have successfully re-imported and I received MANY messages regarding "post already exists!" - is there a way to disable this feature?

    I WANT to import duplicate posts, as this particular site has many posts that share the same Post Title, but have their own unique post-id, categories, and unique body content. I have found a thread with a fix for pre-3.0 WordPress, but this does not seem to apply to the latest version. I have tried to disable the $post_exists syntax in PHP, but did could not do so without breaking the plug-in entirely.

    Please help!

    Thank you.
    -David

  2. sparkfactor
    Member
    Posted 2 years ago #

    I've got an idea, that I got from this thread from 2 years ago (http://wordpress.org/support/topic/importing-problem-post-xxx-already-exists?replies=4) but, unfortunately, it's regarding pre-3.0 WordPress and does not apply to the current build of WP Importer.

    I'm attempting to comment out or disable the $post_exists function from the latest WordPress Importer plug-in. http://wordpress.org/extend/plugins/wordpress-importer/

    Can anyone help me out? I think this will do the trick if I can mod it.

    Thanks!

  3. karenalenore
    Member
    Posted 2 years ago #

    Any luck? I'm in exactly the same boat with 11,000 that need to be modified and re-imported as modified duplicates. Other importers such as csv importer are GREAT but so resource intensive i'm timing out all the time - even breaking the import down to chucks of 300 or so.

    I'd love to know how you made do.

  4. kgrantoz
    Member
    Posted 1 year ago #

    I was able to get this to work by editing the WpordPress Importer plug-in by commenting out line 546:

    $post_exists = post_exists( $post['post_title'], '', $post['post_date'] );

    and temporarily replacing it with:

    $post_exists = false;

    That let me import duplicate posts, hopefully it will solve your issue as well.

  5. virgodesign
    Member
    Posted 1 year ago #

    Thank you very much kgrantoz,

    it works very good, both with posts and attachment images!

Topic Closed

This topic has been closed to new replies.

About this Topic