MySQL replace string in column

Post Photo
Sunday, 20th September 2020

Very useful when moving for example to a new domain. Imagine having thousands of posts with links you need to update

That's what happened to me. I have moved my blog's domain from to Many posts have links to other posts. So I had to update them.

Of course MySQL Replace does much more than this. I hope you find it useful in your projects.

Here I just replace with in column posts_body.

UPDATE posts SET posts_body = REPLACE(posts_body,'','')

Share Post

If you like this post please share with your friends