Most WordPress users find Elive Net. It is difficult to replace a single word in thousands of posts, so let me make it simple for you all so that you can save your time and finish it in a short moment. The fastest way to replace text in WordPress is PHP MySQL, and it provides the fastest server. Today, I will help you by teaching you how to replace a line or sentence, or word via a simple query.
Why did a user require this type of Query?
1. Massive import of topics from other blogs
2. Migration from one domain to another with the same data files
3. By default, you have placed an automatic keyword in the post topic.
Warning:- Some precautions you need to keep backup of the database before running this query might make corruption in the Database.
Let me begin with the process:-
Step 1. If you can access Cpanel, then go to Cpanel, then MySQL Database
Step 2. Select your Database
Step 3. Select the SQL option on the upper side
Step 4. Now in the box, put the below Words to search and replace:-
UPDATE wp_posts SET post_content = REPLACE ( post_content, 'Item to replace here', 'Replacement text here');
Explanation:-
wp_posts = Post data
It would be best if you replaced:- Item to replace here with your desired word or words. It would be best if you replaced:- Replacement text here, which will override the previous word.
Similarly, if you want to replace the title, then you can run the following query:-
UPDATE wp_posts SET post_title = REPLACE ( post_title, 'Item to replace here', 'Replacement text here');
That’s it, now check your Posts as it removes the Words!







