Skip to content
Advertisement

Bulk move 20000 post_meta value to wp_content with mysql command

I have more than 1 million WordPress article, I want to achieve the following effect through mysql:

copy the post_meta key value named views to wp_content field.

I know how to insert value from table wp_posts to table wp_postmeta, but how to move value from wp_postmeta to wp_posts? I used code like this:

JavaScript

but get error messge:

ERROR 1054 (42S22): Unknown column ‘m.views’ in ‘where clause’

how to fixed it ? thanks !

Advertisement

Answer

JavaScript

this works well , but take a long time

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement