Support » Fixing WordPress » WP Importer > "Post Already Exists!" How to Disable Duplicate-Check

  • 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve got an idea, that I got from this thread from 2 years ago ( 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.

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


    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.

    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.

    Thank you very much kgrantoz,

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP Importer > "Post Already Exists!" How to Disable Duplicate-Check’ is closed to new replies.