I have hundreds of posts whose titles are of the form XmY
, where X
and Y
are natural numbers, for example 18m324
.
I'd like to replace m
with p
in all post titles and slugs, while keeping X
and Y
unchanged. How to do it in phpmyadmin?
This is what I got so far
UPDATE wp_posts
SET post_title =
REPLACE(post_title, 'm' , 'p')
WHERE post_type = 'post' AND post_status = 'publish';
This code should replace in the titles, but what about the slugs?