Bulk "Find & Replace" Text in MySQL

Hi,

In my Wordpress blog I have a picture in all my posts. I want to change it's current height from 500 to 400 so I want to replace in my MySQL database the text (height="500" with height="400")

WP Posts table in MySQL is : wp_posts
MySQL field where the text I want to replace is : post_content

Please let me know how I can do that.


Thanks for your help.
Dido123Asked:
Who is Participating?
 
Rik-LeggerConnect With a Mentor Commented:
This will do:

update wp_posts set post_content = replace(post_content,'height="500"','height="400"');

Open in new window

0
 
Dido123Author Commented:
Thank you so much. It worked!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.