0

Anyone know the SQL to copy post_title to post_content where post_content is empty for all and only posts in wordpress

Thanks for any pointers in advance Richard

1 Answer 1

0

This isn't really about WordPress, however you want:

UPDATE wp_posts SET post_content = post_title WHERE post_content= "" AND post_type = 'post';

3
  • Thanks very much, Richard May 13, 2019 at 14:43
  • I think WERE should be WHERE?
    – Garconis
    Oct 7, 2020 at 20:42
  • @Garconis good spot. I've updated the query - thank you. Oct 8, 2020 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.