• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Nile Flores Media

Helping You Rock Out Your Website Like A Rockstar

  • Home
  • About
  • Blog
  • Portfolio
  • Hire Me
  • Resources
  • Contact
  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design
  • News
  • Podcast
You are here: Home ยป WordPress ยป How to Find and Replace Text In WordPress

How to Find and Replace Text In WordPress

By Nile Flores 21 Comments


wordpress-tricks-200x200As your website grows, sometimes you end up coming across some really bad habits, or have strange characters come up. Sometimes you also may use plugins that produce shortcodes, and then later on need to replace them. Some of those habits or shortcodes can extend across several hundred posts. That means you have to go and edit each one, right?

Not necessarily. In this tutorial, we’re going to cover how to find and replace text in WordPress. I’m going to give both an easy tool for those who don’t want to muck with SQL queries, and also a way to do so directly in the MySQL database.

Please note that before you proceed to find and replace text in WordPress site using any of the methods mentioned below, you should generate a backup of your website.

How to Find and Replace Text In WordPress – With a Plugin

Search and Replace, and Search Regex are both plugins that allow you to find and replace just about anything including from text in WordPress.

Search and Replace

The Search and Replace plugin has a lot of options to choose from in finding and replacing whatever text or strings you want. It’s a matter of simple filling out what you need to find, what you want to replace it with, and selecting where you are replacing it.

find and replace text in WordPress- Search and Replace Plugin find and replace text in WordPress- Search and Replace Plugin

Search Regex

The Search Regex form is a lot simpler than Search and Replace. Simply fill the form and select what you’re trying to find and replace.

find and replace text in WordPress - Search Regex plugin

How to Find and Replace Text In WordPress – Using MySQL database

For those not afraid to open MySQL, you can find and replace text using the following general string. Just replace the areas that are capitalized with the correct info.

update TABLE_NAME set FIELD_NAME =
replace(FIELD_NAME,'TEXT YOU WANT TO FIND','TEXT YOU WANT TO REPLACE IT WITH')

As an example- Perhaps you kept writing WP instead of WordPress throughout your website’s post content. In order to correct that, alter:

1. TABLE_NAME with wp_posts because that is the correct table for your posts
2. FIELD_NAME with post_content because the post content is where that content you need to replace is at
3. TEXT YOU WANT TO FIND with WP
4. TEXT YOU WANT TO REPLACE IT WITH with WordPress

Your query string in MySQL will look like the following:

update wp_posts set post_content =
replace(post_content,'WP','WordPress')

Here’s a screenshot of the query.

find and replace text in WordPress- MySQL

Just click on the button that says ‘Go’ and it will perform the query for you.

So, these are just some of the ways you can find and replace text in WordPress. Hope this helps!


Filed Under: WordPress Tagged With: find and replace text, mysql find and replace, mysql search and replace, search and replace text

About Nile Flores

Nile is a 43-year old female from the greater St. Louis (Southern Illinois side) area. Nile is a mother of 1 son. She is also a web designer and developer, a graphic designer, and a public speaker, who exclusively designs and develops using WordPress. She also blogs at GoDaddy's Blog, Verpex Hosting's blog and her very personal sites, Pixelled and Nail Polish Happy.




Related posts:

No related posts.

Reader Interactions

Comments

  1. Yorinda Wanner says

    January 2, 2015 at 2:39 pm

    Hi Nile,
    awesome tips.

    I appreciate how you shared three ways to do this!

    Thanks for sharing your expertise!
    Cheers,
    Yorinda

    Reply
  2. Siphosith says

    January 2, 2015 at 5:57 pm

    Thank you for sharing this information , makes things easier. You sure know your WordPress stuff.

    Reply
    • SAJID says

      January 4, 2015 at 10:29 pm

      Yes really agree

      Reply
  3. Llyane says

    January 4, 2015 at 3:18 am

    Pretty neat trick, thanks so much!

    Reply
  4. Hasir Nancy says

    January 4, 2015 at 11:36 am

    Hello Nile,
    You made my work more easy. Previously I could find words but couldn’t replace it in wordpress. Your article greatly helped me to finish my tasks fast and smoothly.

    Thanks and Happy blogging
    Nancy

    Reply
  5. Zach says

    January 4, 2015 at 5:20 pm

    I’ve totally done this. We changed our firm name, and we had to replace every instance of the old one with the new one. I had to go figure this out on my own. This tutorial would have been helpful.

    Reply
  6. Shelley Alexander says

    January 4, 2015 at 9:59 pm

    Nile, Thanks for sharing the 3 ways to find and replace text in WordPress. I wish I had read this post a few weeks ago when I had to change some links in a bunch of my posts. I appreciate all the useful information you share on your site!

    Reply
  7. Arpit Roy says

    January 5, 2015 at 7:29 am

    This certainly makes finding and replacing text easier. Thank You ๐Ÿ™‚

    Reply
  8. Akhilesh says

    January 6, 2015 at 4:34 am

    I don’t know how to find and replace the text in my word-press website earlier but your this article. I learned this.
    Thanks You … ๐Ÿ™‚

    Reply
  9. Peter Pratty says

    January 7, 2015 at 1:38 am

    It’s a really great thing to read such information as this here, this is a big help not just to every new SEO but also to just WordPress bloggers. So thanks for this and hope to see more from you.

    Reply
  10. Gaurav Heera says

    January 7, 2015 at 5:13 am

    Hello Nile,
    Such a great article, thanks for providing this article, actually i am blogger and looking for find and replacement of text, thanks again for providing, i have installed this plugin in one of my website.

    warm regards
    Gaurav Heera

    Reply
  11. Mahasin Handal says

    January 9, 2015 at 1:12 am

    Hi..Nile!
    Thanks for sharing this quick and helpful tutorial about how to find and replace text in WordPress.

    Reply
  12. jasimahmmed says

    January 12, 2015 at 12:58 pm

    This tutorial would have been helpful for us. thanks

    Reply
  13. Karen Peltier says

    January 19, 2015 at 6:38 pm

    Hello Nile. These are super useful tips for how to search and replace code within WordPress.

    One thing right now I know that I could update on my blog would be my copyright dates. I’m sure there are may be other things that need updating as well.

    Thanks again for the tips and the plugin suggestions! I’m going to check them out for sure.

    Reply
  14. Kyle Nelson says

    January 26, 2015 at 12:44 am

    Seems like these plugins can come into some good use on many scenarios. Awhile back I was really needing to use something like this. I am going to dig a bit deeper in these plugins and see which one fits my blog best. Thanks!

    Reply
  15. Mark says

    February 1, 2015 at 5:11 pm

    Thanks for the tutorial Nile!

    But this exactly the type of techie stuff that I definitely try
    and stay away from!

    I prefer for the most part to pay the experts such as yourself to
    handle this part of the deal!LOL!

    But thanks for taking the time to share it!

    Reply
  16. David Merrill 101 says

    February 1, 2015 at 7:05 pm

    This is a great tip, Nile.

    This can really save a lot of time when you need to accomplish a text replacement.

    Reply
  17. Willena Flewelling says

    February 2, 2015 at 3:35 pm

    You write good tutorials, Nile. Thanks for showing 3 ways, because I don’t like fiddling with MySQL. It’s too easy to make a big mistake I can’t fix without help.

    Reply
  18. sonika dewakar says

    February 3, 2015 at 5:29 am

    thank you for updating this informative blog this blog is really helpful and inmformative blog.

    Reply
  19. Tanmoy Das says

    February 9, 2015 at 11:40 am

    Sometime simple things can be complicated like this find text and replace. This is a really nice tutorial. Thanks for this nice guide.

    Reply
  20. Julieanne van Zyl says

    February 15, 2015 at 3:50 am

    This is a great tip Nile, such easy ways to search and replace, especially for a blog with a huge amount of posts.

    Reply

Leave a Reply Cancel reply

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

Primary Sidebar

Follow Me On:

  • Facebook
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!




Try to be More Positive on Social Media

Note: You can click on image and view the video in a larger lightbox window.

Footer

The Blog

Lots of free information, tutorials, and more to help you bring your best foot forward with your website.

  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!

Copyright © 2025 · · WordPress