MySQL Search and Replace for WordPress

If you need to make a major change in your WordPress MySQL database you can do it directly in phpMyAdmin, though I prefer using Navicat for such things, by running this query.

UPDATE wp_posts SET post_content = REPLACE (
post_content, 
'FIND THIS TEXT', 
'REPLACE WITH THIS TEXT');

That will handle all the content within all the posts and pages.

Here is the breakdown

wp_posts

is the name of the table you are searching through.

post_content

is the name of the column that you are searching through. Notice that this is written in two places and you must change it in both.

By: on Jul 17
Cateogry: Wordpress
Tags: , ,

Contact

We are ready to handle any of your web needs. Use the form below to contact us and we'll get back with you in a timely fashion.

If you would like to setup a meeting, we can come out to your place no matter where you are.

Name*

Email*

Message