Support » Plugin: Duplicate Post » Duplication takes a very long time

  • Hi Lopo,
    first of all, thank you for your fantastic plugin, I am using it on dozens of websites without any issues.

    We have recently started having issues on one of my clients’ websites though.

    I have a custom post type called Product, which has some custom ACF fields and few plugins linked to it, which allow it to add attachments and other information. On top of it, we use WPML and our database (both posts and media) has grown to be really, really massive.

    It has been reported to me that sometimes when the staff clones a product, it no longer carries over all attachments – added by one of the plugins. When I went to test it out, I really couldnt, as the clone process can take minutes (!) and sometimes even dies on 300s timeout. It usually dies on processing images through WP internal GD tool.

    Now, I can imagine your thoughts – several plugins, giant database, no way this could be the Duplicate Post fault and naturally I dont blame you.

    Could there however be a way to optimize the plugin as it maybe could be wasting resources or doing something in a slow way? Even though each post has tons of postmeta and media attached to it, I can not imagine what it is that can take up to 300s to process.

    I am more than happy to provide any information you might ask for or even give you access and cooperate directly on the website.

    Thanks a lot for your reply in advance.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lopo


    Hi @klaro,
    from what you say it seems you’ve checked the Attachments checkbox under my plugin’s settings, haven’t you?
    I suppose that’s probably the culprit since it involves copying the physical file and “reloading” it in the media catalog, with all the thumbnail building: and these are by far the most heavy operations performed.

    The thing is: are you sure you need to have that checkbox enabled? As stated in the warning just next to it, it’s meant to be used only for very special cases. Usually You don’t need it because if the attachment is referred by ID or URL inside the post content or in the custom fields, they are copied as they are and they still point to the attachment: just as if you create a post with an image attached, and then you create another post “by hand” linking the same attachment, without having to upload it again.
    Do you think you can try disablind that option and try if the results are ok for you, and if the timeout issue is solved?

    Let me know!

    Hi Lopo,
    you were absolutely correct, I had the Attachments selected as I thought it would be necessary in my case. The clone operation is now basically instantaneous.

    I have probably created a giant mess of (tens of) thousands of media files duplicated when I didnt really need to duplicate them, but thats a problem for me to solve.

    Thank you very much for your advice!

    Plugin Author Lopo


    Hi @klaro,
    glad to hear that!

    Feel free to write anytime if you have any doubt or issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplication takes a very long time’ is closed to new replies.