I’m using wordpress and want to go through the entire wp_posts database using MYSQL to remove the word “on” from the slugs.
I’ve tried these two lines;
update wp_posts set post_name = replace(post_name, '%on-%', '') where post_type = "post";
select *, replace(post_name, '%on-%', '') from wp_posts where post_type = "post";
They dont remove the word ‘on’ from things such as “12th-annual-helmets-on-kids-campaign”
Thanks guys
try
and omit the
%
.