How To Easily Find And Replace WordPress Strings

How to easily find and replace WordPress Strings

It can be daunting to edit core plugin files (language files etc.) and themes especially if you do not have any coding knowledge.
Nobody said everything has to be difficult. In this tutorial, we will show you, in a few steps, how to quickly find and replace WordPress Strings using a plugin.
We will use “Real-Time Find and Replace” WordPress plugin, freely available in the WordPress Plugin Repository. It will help us search and replace WordPress strings in WordPress database without using phpMyAdmin or writing any SQL code.

1. Search and install “Real-Time Find and Replace” plugin

Simply go to the plugins page in your WordPress admin area, click “add new” and search for “Real-Time Find and Replace” and install it.

2. Inspect the exact text / string to be replaced

In this case, we will attempt to change the text on the home page button “View Other Industries.”
Find and replace WordPress Strings
On inspecting the code using Mozilla Firefox, we find that the button is rendered by the HTML code below.

<span class="theme-button-inner">View Other Industries</span>

3. Use “Real-Time Find and Replace” plugin to dynamically replace the string / text

Now, the crucial part, how to find and replace WordPress Strings.
First, go your WordPress admin area, under “tools,” click on “Real-Time Find and Replace,” then click “add.”
Paste the string/code you are looking to replace in the “Find” form, and the replacement in the “Replace With” form.
In our case, the code to replace is:

<span class="theme-button-inner">View Other Industries</span>

Also learn how to redirect WordPress registrations to WooCommerce

If we wanted to change the button text to “About Us,” we will paste the code:

<span class="theme-button-inner">About Us</span>

And finally click “Update Settings,” as illustrated below.
Real-Time Find and Replace - Find and replace WordPress Strings

Notes: Real-Time Find and Replace WordPress plugin is a safe method to search/find and replace WordPress Strings because it makes no changes to the core files or database. Meaning that theme and plugin updates do not lead to loss of the text/string replacements.
The text/string replacements are in real-time on website page load in the user’s browser.

Also read: Proven ways to increase WordPress speed and performance

For any information, do not hesitate to contact us. Should you need to hire us for web development services, feel free to fill in our quote form.

Freelance Desk

Lance Desk, a world-class professional web development, and marketing firm. We pride ourselves in providing professional web design and web development, SEO, domain and web hosting, graphic design (Business cards
Print Design, Logo/Branding Design, & Brochure Design etc) to individuals and institutions across the globe.

Leave a Reply

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