Search and Replace Plugin is a pretty handy plugin when you need to replace a string in your WordPress database.
I’ve used it a couple of times. As far as I can remember the first time was to replace a specific string in the contents of more than 100 posts, and the 2nd time was to replace the old URL with a new URL during domain name migration.
This plugin searches the string in all the tables of your WordPress database and modified them according to the value specified.
Instead of going through all the tables and fields, you have the options to be more specific on the tables or fields you would like the plugin to search on.
The available entries (fields) that you can specify are: Post content, “Globally Unique Identifier” (GUID), Post Title, Post Excerpt, Meta Data, Comment content, Comment author, Comments author e-mail, Comments author URL, Comments-Counter, Category description, Tags & Categories, User-ID, User-login, ID
Let’s go through an example to understand how this plugin works.
Let’s say if I would like to replace the string “Submitted by:” with “Shared by:” on more than 50 posts, I can make use of Search and Replace Plugin to help me.
Step-by-Step Guide to use the Search and Replace plugin
1) Install Search and Replace plugin on your WordPress.
2) On WordPress Dashboard, go to Tools > Search & Replace.
3) “Information Search & Replace” section.
The top section, Information Search & Replace, will search the given string and replace it in all tables of your WordPress database. so for our example we don’t need to do anything here.
4) “Search in” section.
Since we only need to replace the “Submitted by:” that are found on the post contents, I can be more specific in this case by checking the Content option in the Search in section.
a) Tick the Content checkbox
b) At the bottom, Enter “Submitted by:” (without quotes) in the Search for field.
c) Enter “Shared by:” (without quotes) in the Replaced with field.
d) Click the Go button.
5) The numbers of entries found and replaced are shown once it’s done.
Try it. This plugin is a real time-saver when you need to replace a word, a number or a phrase site-wide.