Downloads: Search and Replace Wordpress Plugin (1.1)
This is a plugin for Wordpress to allow you to search and replace text across all your posts.
This plugin is for Wordpress 1.5 or better (including 2.0).
It is uses SQL replace so it’s fast but not very flexible.
Just download the zip, extract the searchandreplace.php file and place it in your wp-content/plugins and then in the wp-admin plugin interface active it.
You will then have a new panel in your “Manage” section called “Search and Replace”.
German langauge version available. Supplied by Frank
Persian language version avaliable. Supplied by Gonahkar
History
Version 1.1: 4th January 2006
Search and replace for comments and comment authors from Gonahkar added. Tested on Wordpress 2.0.
Version 1: 23rd March 2005
First version
Guest
April 23rd, 2005 at 6:09 pm
Does this plugin work? The readme does not express confidence or assurance of success. Rather than back-up and have to reload the SQL database, I’d be interested to know what the likelihood of failure will be.
Goal: replace “/www/images/” in a reference globally with “/www/images/postimage” so that I can rearrange my server…
Administrator
May 3rd, 2005 at 8:16 am
Hi Señor Epiphyte, I haven’t tested it extensivly but it worked fine for me in all my tests.
The warning in the readme is a ‘just in case’.
Guest
May 4th, 2005 at 9:03 pm
Worked for me. Thanks!
Guest
June 8th, 2005 at 5:23 am
Installed the plugin but its not appearing in the ‘Manage’ section, is there is a filename I can just manually type in? I dont necessarily need a visual thing I can click on.
I’m using the most recent version of WP, 1.5.1.2
Administrator
June 8th, 2005 at 8:16 am
Hi mESH,
And you have activated the plugin from the “Plugin | Plugins” screen? I don’t know what could be the problem. I’m using WP, 1.5.1 on this site and my testsite and it seems to appear.
You could try the link directly but I doubt it would work if it’s not appearing in the menu:
http://your.wordpress.address/wp-admin/edit.php?page=searchandreplace.php
Administrator
June 16th, 2005 at 4:21 pm
mESH, try logging in as an admin user. I setup the permissions so only admin users can use the plugin.
Guest
June 26th, 2005 at 1:14 am
Hmm, doesn’t show up on the manage page in admin and I’m running WP 1.5.1.2. I have a user rating of 9.
Guest
June 26th, 2005 at 1:17 am
Oh wait, nevermind. I edited the user rating down to 9. Now it works. Thanks.
Guest
July 24th, 2005 at 8:47 pm
Thanks… work nice for me
I wisk in futur version, there are the search & replace with special sql string: ‘*’ ‘?’
example:
- search “En*” will give result: “Enter”, “Entry”, “End”…
- search “thedead???” will give: “thedeadone”, “thedeadtwo”…
Administrator
July 28th, 2005 at 1:11 pm
If ‘*’ and ‘???’ are supported by SQL then they should work now, I guess, as the plugin just uses whatever text the user puts in the fields to search against. I’ll have to try it and get back to you on it.
Guest
August 5th, 2005 at 8:25 pm
Worked great…thanks for this. I had an old b2 blog that I exported. Somehow (during export, or as a function of b2) every apostrophe had a slash in front of it ( \’ instead of ‘ ). Running an update command with to fix apostrophes made me a little nervous because I thought the apostrophe would break the SQL string(s), but it worked flawlessly.
Guest
August 7th, 2005 at 8:58 pm
How does the your test result? Does the ‘*’ and ‘?’ work now?
Guest
August 31st, 2005 at 3:44 am
Thank you. Your plugin has saved me hours of work!
Guest
November 9th, 2005 at 4:08 pm
hello,
i tried to DL the zip, but the file’s extension is “.pl” and i’m not sure what program that is for? thank you!
Administrator
November 9th, 2005 at 10:30 pm
Hi Jon, are you sure about the “.pl”? Did you download the searchandreplace.zip and extract the contents (because they should all be .php as they are wordpress plugins)? I just tried to download it there and it worked fine for me…
though are you refering to “ax.pl”? This is just a redirect perl script (see http://thedeadone.net/software/wordpress-and-axs-integration-plugin/ for more) and shouldn’t be downloaded. BTW, .pl is for perl scripts.
??
Guest
December 3rd, 2005 at 1:22 am
hi i’d like to thank for this plugin its great! but i have a few questions. how can i replace all the posts in my database in batch i mean i have a table of words to search and table to replace the search i want to just click replace it replaces all the posts in the database. can it be done?
ahh and sorry for my english thanks
Guest
December 5th, 2005 at 3:43 pm
I’d like to tryout the plugin, but the download gives me a 404… Could you give me a location where I could get the goods? =]
Guest
December 5th, 2005 at 3:44 pm
never mind that last comment, the download works… (I followed some direct link to the file, which 404′d, using the link from your post worked)
Guest
December 10th, 2005 at 7:03 pm
hi, i edit your plugin to search n replace in the comment text and comment author, it can be new version, how i can send it for you?
Guest
December 19th, 2005 at 11:26 am
Thanks for your plugin! Great! Just found out that the link leading to this plugin on http://wp-plugins.net/ is dead. You might want to correct this.. Cheers!
Guest
December 23rd, 2005 at 1:57 am
Thank you!!! Thank you!!! Thank you!!! Thank you!!! Thank you!!! Thank you!!! Thank you!!! Thank you!!! Thank you!!! Thank you!!! Thank you!!!
Your plugin works perfectly and just saved me from manually editing thousands of posts.
Administrator
January 4th, 2006 at 5:09 pm
I’ve integrated Gonahkar’s changes and tested the plugin on Wordpress 2.0.
I’ve also investigated adding wildcard support. Currently MySQL does not support wildcard or regex for REPLACE so I wont’ be supporting it in the near-future.
Enjoy.
January 5th, 2006 at 8:13 am
WP - Suchen und Ersetzen (de) (Plugin)
Mark Cunningham stellte vor geraumer Zeit sein Plugin „Search and Replace“ in einer erweiterten Version bereit. Jetzt können alle erdenklichen Einträge in der DB gesucht und ersetzt werden. Besonders bei vielen Beiträgen empfinde ich da…
Guest
January 5th, 2006 at 8:19 am
Hy Mark,
i have translate your Plugin for all german WP-users. I hope you enjoy.
With best regards, Frank
Link:
http://www.bueltge.de/wp-suchen-und-ersetzen-de-plugin/114/
Administrator
January 5th, 2006 at 8:42 am
Wow, cool. Thanks Frank.
Guest
January 12th, 2006 at 11:51 am
Just letting you know the download URL on the website:
http://wp-plugins.net
is broken.
Administrator
January 12th, 2006 at 9:38 pm
Thanks Tom. I thought I had corrected the link but obviousily I hadn’t. Now it is fixed.
Guest
January 14th, 2006 at 8:37 pm
Good job! I can never remember the exact command for search & replace using phpmyadmin. This plugin saves me time. Of course I’d backup the database first before using it. I’d do that even if I were to use phpmyadmin anyway… just in case.
Keep up the good work!
Guest
January 25th, 2006 at 4:28 pm
How can I replace line breaks with non-line breaks. I’m having a small problem from when I imported my Blogger posts. Check out my blog and you will know what I mean.
Guest
January 28th, 2006 at 8:11 am
hello
i try using this plugin to replace a text, to bold text .. like baby , replace baby
but then all my image eror, because their link contain that text … hmm .. how to trick this?
Guest
February 11th, 2006 at 4:42 am
Does the new version work with 1.5.2 or should I stick with the old one?
Administrator
February 11th, 2006 at 1:19 pm
Hi Ajay D’Souza, it should still work in 1.5.2 AFAIK. It was working in 1.5 and it still works in 2.0.
Guest
February 14th, 2006 at 10:28 am
Great, am going to give this a shot
Guest
February 15th, 2006 at 10:31 pm
This plugin seems great, but I would like to replace the ‘carriage return’ & ‘new line’ characters that Wordpress converts into the ‘p’ tag.
After importing from blogger a bunch of posts, I got a lot of those ‘p’ in the wrong places. I might be able to replace at least one of them which comes always before a certain tag and really shouldn’t be there, but search and replace doesn’t seem to work with the ‘\n’ and ‘\r’ special characters. The ‘p’ tag doesn’t seem to be there at all, since it is added by wordpress only later, in the rendering of the page.
So how can I get search and replace to work on those ‘new paragraph’ chars?
Any workaround?
Thanks!
Guest
February 16th, 2006 at 5:33 pm
Wait, I solved the thing about the ‘p’ tag I addressed in my previous comment.
I read others had just the same problem. Too many ‘p’ tags in the posts instead of simple line-breaks. This has also the downside that p tags are autmatically closed by wordpress, creating weird formatting in certain situations.
Trying to solve it with ’search and replace’ plugin it’s the wrong approach!!
you can solve the problem this way:
just install the ‘text-control’ plugin for wordpress, then go into options and set your text formatting engine to ‘nl2br’, and ’smart pants’.
All the ‘p’ tags will be gone.
The problem is in the rendering wordpress does, not in some characters contained in the posts!
Hope this helps. It worked for me, big time.
Guest
February 25th, 2006 at 5:11 pm
Frank - you are the wp god of my admiration. What a wonderful thing you have done. I’d moved batches of stuff over manually from a previous blogging app and had hideous amounts of stray stuff show up after. Manually replacing it was an odious chore, but you saved me so many hours, and it was all of it done in 15 minutes, download to complete.
Thank you so very much.
Administrator
February 25th, 2006 at 11:18 pm
Frank? Hey I wrote the plugin, Frank translated it to German, Lex!
Guest
March 5th, 2006 at 7:41 pm
Plugin saved my life… well, saved me from editing over 1,000 posts manually.
Cheers,
-Aaron
Guest
March 8th, 2006 at 10:04 pm
sorry i need this plugin
tested it but not working in arabic
why?
any suggestion plz ?
thanks
Guest
March 11th, 2006 at 10:22 pm
this is very useful plugin
thanks
May 1st, 2006 at 9:49 pm
Search and Replace Plugin
This plugin will search and replace text across all your posts - from thedeadone.net.
The plugin installs a Search and Replace panel in the “Manage” section of your Wordpress administration menu. You can search and replace in posts, titles…
Guest
May 16th, 2006 at 6:14 am
One other enhancement might be to add the field “Category”…so that one could replace category names in all posts.
Guest
June 10th, 2006 at 12:38 am
Worked like a charm — Thanks!
http://www.striderweb.com/blog/229
Guest
August 13th, 2006 at 4:06 am
Hi, this plugin works great!!!!!!
kisses!
September 6th, 2006 at 2:32 pm
[...] The internal links in my posts pointed to my old blog, I had not changed it. However, I realised that this will push my readers to the old blog, which I don’t want to encourage. So I used the Search and Replace plugin to replace the old URLs with the new ones. It was not difficult since I have kept the same permalink structure. There was some risk involved, so I made sure that my database was backed up. Unlike the common perception, it is extremely easy to backup your Wordpress database using the Wordpress Database backup plugin. From now on I will start using relative paths rather than absolute ones to avoid this problem in future. [...]
September 8th, 2006 at 9:22 pm
[...] Search and Replace (for moving every single occurence of “waxjelly.wordpress.com” to “waxjelly.com” in a single action) [...]
Guest
September 9th, 2006 at 12:56 am
I’m so sad I can’t get this plugin to work for me! Recently I changed hosts, and when I did all my ellipses (…) were replaced with “?��Ǩ��” and all my em-dashes (—) were replaced with “?��Ǩ��?”–I had high hopes that this plugin would correct them for me, but though it says “searching…replaced!” all the weird characters are left in there…anyone know what all this is about? I sure don’t want to download my db, do the s&r in there, only to upload it again and discover that it’s happened all over again…ideas?
September 10th, 2006 at 9:51 am
[...] Actualización 10/09/06: He encontrado un plugin, llamado Search and Replace que nos puede evitar los pasos del 3 al 5. Lo instalas y desde la opción Manage-Search and Replace de tu dashboard de WP vas a poder sustituir directamente las cadenas de texto que indico en el paso cuatro. Aunque ya sabes, Copia de Seguridad siempre antes… ¡por si acaso! [...]
Administrator
September 12th, 2006 at 9:19 am
Hi unnarrator, I’m not sure I can. I would have loved to be able to update the plugin to report what it changed, but it’s a rather dumb plugin and all it does is an SQL replace which doesn’t support that kind of functionality.
As for the weird characters, where do they come up? Is it on a webpage or when you edit the entry? Is there a difference between the two copies?
September 20th, 2006 at 7:54 pm
[...] Search and Replace: Erstezt bestimmte Zeichenkombinationen in der SQL Datenbank. Kann sehr praktisch sein! [...]
Guest
September 22nd, 2006 at 6:50 pm
Thanks for responding, Mark—when I downloaded my SQL db from one host, search-and-replaced all the URLs and so forth, and uploaded to the new host, all the diacriticals were inexplicably changed (and I use a lot of French in my posts…).
I could go into every entry and edit them, which works, and I’ve done about 50 of them; I just don’t want to do this for all the pages on the site, cos I’m lazy. :o)
Hope this makes sense. Example page at:
http://theunreliablenarrator.net/2006/07/15/tiny-times-goofed/
Guest
September 22nd, 2006 at 6:52 pm
Maybe a better answer to your question is: the weird marks are there both inside the WP editor *and* on the pages themselves.
Guest
September 27th, 2006 at 1:01 pm
Worked perfectly for my purposes…. Thanks a lot!
Administrator
September 27th, 2006 at 1:11 pm
Hi unnarrator,
That sounds very strange. Could you do an export of your database (using the database plugin) and have a look at a post there? If possible, could you send me (or post a sample of) a snippet of a post from the database?
Sounds like you may have to do it manually. The plugin just does an SQL update command.
September 28th, 2006 at 12:02 pm
[...] Спасибо тому чуваку, который создал плагин Search And Replace. Дело в том, что когда я учился делать плаги к Словопечатнику, то написал один простенький, который добавлял к тексту группу xml-тегов, свои настройки. А при выводе текста он их очищал. Так вот, написал я его, включил, убедился, что он работает, и… забыл про него. [...]
October 28th, 2006 at 6:11 pm
[...] Apologies that the transition hasn’t retained any comments. I asked around and there doesn’t appear to be any easy way to bring those over. Also, some of the formatting is wonky: I’ve noticed center-aligned pictures are aligned to the left, bold passages have lost their styling, and if you’re using Internet Explorer, converted apostrophes inexplicably show up as “apos”. Ugh. Fortunately, I did find a search and replace plugin I may put to good use. [...]
October 29th, 2006 at 1:31 am
[...] In the last few minutes, using the ever-handy Search and Replace plugin, I think I managed to scrap all those rogue “apos” mentions and change some out-of-wack “?’’s caused by Unicode rogueness into the proper em dashes I love so much — booyeah! [...]
Guest
October 29th, 2006 at 5:06 am
This plugin is simply great! Saved me many hours doing the search and replace. Thanks.
Guest
November 9th, 2006 at 8:05 pm
Hi Mark and thanks for your help–here’s a sample of the wackiness–it sounds like Anatomy of a Blog Move used the S&R plugin to fix a similar problem, so I’m terribly envious!–
“Merci ?ɬ� Lucinda, I hum while I pick dried rosemary needles from the keyboard?��Ǩ���Eloise’s afternoon effort at reducing the one to the many. And then type vigorously, seething, energized with angry?��Ǩ���and why? Because…” et cetera.
(Where the ???s were em-dashes.) I guess this can also be chalked up to “Unicode rogueness” but alas I’m having to go into each entry and change by hand. Such is life! Thanks for trying to troubleshoot anyway….
November 12th, 2006 at 6:26 am
[...] Search and Replace [...]
Guest
November 17th, 2006 at 4:49 pm
Does anyone know the name of the wordpress plugin that creates a list of your posts in a category instead of just displaying them one after the other? I want it so that when someone clicks on a category they just get a list of posts from that category.
I'm sure Ive seen one…and sifting through the WP site is a nightmare
Guest
November 19th, 2006 at 12:50 am
Thanks Mark, saved me hours of work transferring images from our old blogspot site to our new wordpress server. Great work. Exactly what I was looking for.
Administrator
November 22nd, 2006 at 4:37 pm
Hi Pierce, this isn’t really the place to ask for that kind of stuff. I’d recommend wordpress.org/support.
However, what your really looking for is a theme. You do not need a plugin to show the list of posts in a category, just a theme that lists the posts for the category template rather than display an extract. In fact, it’s just a matter of removing some code from most existing themes.
Guest
November 22nd, 2006 at 8:48 pm
Worked on the first try. Thank you very much.
December 3rd, 2006 at 4:38 am
WordPress 無痛改連結法
我在「 WP-plugin:向 blog.yam 說 bye bye」裡面,用一個簡單的 Plugin把文章中 http://blog.yam.com 出現的地方通通改成 http://blog.roodo.com,但是那只是暫時的,只是在前台秀出文章內容時作即時的替換,…
December 13th, 2006 at 8:40 am
[...] edit:21.08.05 Ich mag zu einem Thema viele Texte schreiben und mit dem Plugin Next in Series von Skippy kann ich alle Texte, die zusammengehören ganz leicht anzeigen. edit:28.08.05 "Neues" in meiner Sidebar zeigt mir Customizable Post Listings von Scott Reilly an, damit kann ich auch irgendwann die letzten Kommentare anzeigen oder die meistgelesensten Artikel oder sogenannte "Random" Artikel - also irgendwelche zufällig ausgewählten Artikel - diese Möglichkeiten gefallen mir ausgezeichnet. edit:31.08.05 Die aktiven Kategorien gestaltet mir: catHighlight von Venushka Pereraund. edit:06.01.06 Ähnliche Artikel zeigt mi