How to add post titles with new titles via sql? example post title now "beddu". i want to adding/ change "Add beddu" thank before
1 Answer
The first thing you want to do will be find the post you want to modify. To find the post named "beddu" which post_type
is post
, you can excute this query:
SELECT *
FROM wp_posts
WHERE post_type = 'post'
AND post_title = 'beddu';
After you test and find the condition is correct. Move to update part.
UPDATE wp_posts
SET post_title = 'Add beddu'
WHERE post_type = 'post'
AND post_title = 'beddu';
Remember to change wp_posts
to your corresponding table name.
-
Thanks for U attention... How do I change that for all post titles. Add titles at the beginning. Because my post title name is not just "beddu" Commented Sep 24, 2018 at 9:13
-
For all posts, you just need to remove
AND post_title = 'beddu'
from the SQL command– Tung DuCommented Sep 26, 2018 at 2:56 -