Duplicate post by SQL query
-
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 idThis 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
- The topic ‘Duplicate post by SQL query’ is closed to new replies.