• Resolved digitalforge

    (@digitalforge)


    Hey guys,

    I have to import over 100k pages. I wrote a SQL query that basically just duplicates the wp_posts and wp_post_meta entry for one specific post.

    This works, the page is visible and so on, but it almost looks like it has no styling and -or something is wrong with elementor.

    Does anyone know if I am missing tables or something?

    I cannot use any existing plugins for this as they all charge money for something that I will only use once, besides that I would like to learn it myself ??

    Hope someone can help me out.

    So in total what I did was:

    1. Duplicate 1 row from wp_posts with new title, content and a unique id
    2. Duplicate 16 rows from wp_post_meta with the post_id pointing to the correct id

    This shows the page both in the backend and on the website (as a visitor) but the styling seems to be missing.

    Hope someone can explain to me how to duplicate a specific post by using SQL queries.

    What I copied from wp_post_meta

    _edit_lock
    _wp_page_template
    _edit_last
    _elementor_edit_mode
    _elementor_template_type
    _elementor_version
    _elementor_data
    _happyaddons_elements_cache
    _elementor_page_assets
    _pingme
    _encloseme
    _elementor_css
    • This topic was modified 2 years ago by digitalforge. Reason: added additional info
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter digitalforge

    (@digitalforge)

    No one knows? not even the creators of the amazing Elementor plugin?

    Hi,

    Is there any specific reason to not use a default WP Import Export? It should work as expected since you are working only with pages.

    Thread Starter digitalforge

    (@digitalforge)

    @ozyeger thank you for your reply ??

    The reason I want to use SQL query to make the duplicates is because I have to change the “textual content” for each and I don’t want to manually do over 100k pages which would take literally months to do.

    If I can do it by SQL query it would take me less then 3 minutes in total, that’s the whole reason I would like to use SQL queries ??

    So basically the pages are 100% identical to one another. The only difference is the text in one specific text block and that’s it basically.

    P.S. it is not a page but a post which I want to duplicate.

    Best regards

    Hi,

    I am sorry, It’s related to WordPress, you may start a Github thread.

    Thread Starter digitalforge

    (@digitalforge)

    No it is not related to WordPress. It is YOU’RE plugin that makes the tables that need to be copied and my question is quite simple. What tables and rows would I need to copy to make (the Elementor part) work when duplicating a post.

    I already asked on the WordPress forums and they send me to the Elementor plugin forum because they don’t know and the plugin is made by your team/ company ??

    Hi,

    Please open the thread on GitHub, so developers can help you. It is Custom Code/WP related as the DB structure is part of the WP not only Elementor.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Duplicate post by SQL query’ is closed to new replies.