Skip to content
Home » Blog » How to do Search and Replace in WordPress with a Plugin

How to do Search and Replace in WordPress with a Plugin

Are you looking to do search and replace in WordPress? Recently, one of my friends asked us how to run search and replace on WordPress database without writing any SQL code or using phpMyAdmin. Many beginners are not comfortable with code, so that’s why we found a search and replace plugin for WordPress. In this article, I will try to show you how to do search and replace in WordPress.

images

 

Getting Started

It is extremely important that you create a complete WordPress backup before making any changes to your WordPress database.

Make this best practice a habit, things can go wrong anytime when you are making direct changes to the WordPress database. If you have a backup, then you can easily restore your WordPress site without losing anything.

Installing and Using Better Search and Replace for WordPress

First thing you need to do is install and activate the Better Search Replace plugin. Upon activation, you need to visit Tools » Better Search Replace page to use the plugin.

better-search-replace-screenshot

Simply add the text string you want to search for and then add the replace text.

After that, you need to select the tables you want to look into. For example, if you want to search and replace some text in your posts then you may want to select the posts table. You can also select multiple tables if you want.

Learn more about WordPress database management and what each table does in WordPress.

The plugin can run a case-sensitive search and replace. It can also perform a dry run which allows you to see how many cells are affected by your search without actually replacing the text.

When you are satisfied, click on run search/replace button. If you did not check the dry run option, then the plugin will now run a search and replace on your WordPress database.

Troubleshooting

You may see the white screen or run into timeouts while performing a search and replace. Simply click on the settings tab on the plugin page.

 

You will notice the max page size option. Try decreasing the page size to avoid timeouts and white screen.

That’s all, we hope this article helped you find a better search and replace plugin for WordPress database. You may also want to see our tutorial on how to clean up your WordPress database for improved performance.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.