- export the
wp_posts
, wp_postmeta
tables from the old DB.
- import the exported data into 2 new tables
wp_old_posts
, wp_old_postmeta
into the new DB.
- change collation on the table from
utf8mb4_unicode_ci
to utf8mb4_unicode_520_ci
- add to the current/new table a column old_id (to store the id of the row in the old table. In our case
wp_posts
)
- make a similar query to this:
INSERT INTO wp_posts (old_id, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_content_filtered, post_parent, guid, menu_order, post_type, post_mime_type, comment_count)
SELECT * FROM wp_old_posts;