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!
— Mark (Original author of plugin)
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! [...]