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
5) Hit ‘Go’
That’s it. You can literally “Find & Replace” anything within all of your posts within seconds. Hope this helps someone.
Hmm…I haven’t bumped into this on a large scale but glad that it appears to be easy. Thanks for the post!
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! 🙂
Sure this will come in handy one someday.
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.
@Erik – Yes I agree. Always make a backup of the database first. I did but luckily did not need to use it.
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
This is a lame tip; give us something better.
@temple – lick my balls
Very useful, If only I know that three weeks ago.
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. 🙂
Great tip, you freaking rule. Now just tell me how to make my dating ads back out and I’ll be set 🙂
Hey great post .Will definitely mark this on my RSS feed .Thanks.
Cant believe I never thought of this, great for updating old affiliate products sitewide.. Thanks!
@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.
dating ads that have pretty women are very catchy –
i often see a lot of dating ads on craigslist and also on facebook `-“
?????????? ??????.?????? ??????.????????? ?????? ??????.????????? ?????????????? ?????? ? ?????? ?????? ??????.????????? ?????????????? ?????? ? ??????! ??? ???? .
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
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.