Skip to content

How To Edit Thousands Of WordPress Posts

Every so often you get into the situation where you are running a wordpress blog that has thousands of posts that need a small portion edited.  Unfortunately, wordpress does not come readily available with a “find & replace” type function.  There are some “find & replace” plugins but they didn’t seem to edit the HTML within the posts the way I wanted.  Since it took me a little time to figure out how this is done, I figured I’d share it with you.

1) Open PHPmyAdmin

2) Click on the name of your wordpress database

3) Click on the “SQL” tab

4) Type the following code

find-replace-mysql

5) Hit ‘Go’

That’s it.  You can literally “Find & Replace” anything within all of your posts within seconds.  Hope this helps someone.

Ad Hustler | Subscribe To Ad Hustler

Published inWeb Design

19 Comments

  1. Hmm…I haven’t bumped into this on a large scale but glad that it appears to be easy. Thanks for the post!

  2. Erik Erik

    Watch out for this though…any mass editing of your database via SQL, if you’re not careful, could be disastrous. It’s smart to always keep a backup before making mass undoable changes! 🙂

  3. spyderman4g63 spyderman4g63

    Sure this will come in handy one someday.

  4. J J

    Yeah, that’s a good way to replace something in any database.
    Specifically for WordPress you could also use the “Search and Replace” plugin, which does exactly the same (+ a few other things), but from the WP admin panel.

  5. Ad Hustler Ad Hustler

    @Erik – Yes I agree. Always make a backup of the database first. I did but luckily did not need to use it.

  6. I used this type of thing before when I had a barrowload of posts that were set for draft instead of published, saved a lot of time I can tell you

  7. temple temple

    This is a lame tip; give us something better.

  8. Yeah, sql… 🙂 Make sure it’s not international spam comments you are trying to delete, I accidentally removed over 50,000 user records including emails, names, etc trying to delete all the russian “A”s as sql converted these russian “A”s to american. Complete database was gone in a few seconds. I almost cried. 🙂

  9. Great tip, you freaking rule. Now just tell me how to make my dating ads back out and I’ll be set 🙂

  10. Cant believe I never thought of this, great for updating old affiliate products sitewide.. Thanks!

  11. temple temple

    @hustle- its fucking lame dude.

    Anyone who cant figure out “find and replace” on their own, doesn’t deserve to know.

    You seem to have at least some awareness on useful topics.

    Show me how to populate a wp installation from sql database content.

    That would be all kinds of useful.

  12. ?????????? ??????.?????? ??????.????????? ?????? ??????.????????? ?????????????? ?????? ? ?????? ?????? ??????.????????? ?????????????? ?????? ? ??????! ??? ???? .

  13. How To Edit Thousands Of WordPress Posts | Ad Hustler I was recommended this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You are wonderful! Thanks! your article about How To Edit Thousands Of WordPress Posts | Ad HustlerBest Regards Justin

  14. South African Airways & British Airways (op?r? via Comair) Economie Projet d’offre, ces soci?t?s et ces vols de 1?re monster beats classe entre ces grandes villes & ? certains vraiment petits, y compris Mthatha, Polokwane, Richards Bay, & Maseru. Ton tonus ainsi une couleur doivent se pr?senter comme choisies selon ton tonus du bouille et le dynamisme du peau.

Leave a Reply