![]() |
How do you search and replace a whole website?
I finale have phpadsnew setup in a way that is easy to maintain and works for me (It just took two attempts on different sites, several temper tantrums, reading the manual once a month for a year and everything Cleo has ever written about phpaddsnew three times)
what program can I use to do asearch and replace on alll of my files at once |
If you use Dreamweaver 4.0 or newer....
you can do it from the "site" window. Edit>Find & Replace. The find/replace window is pretty friendly so you should be able to figure it out...any problems just post again and I'll give you a hand. |
Pat,
Cleo is probably your answer again... :) I am pretty sure she has a decent "on server" search and replace script. DD |
This is what I use.
Veinotte's Web File Editor http://www.cgi.veinotte.com/scripts.htm The site seems to be down. :( |
Pat,
Be careful doing this server side and make sure you have a good backup. If I understand you correctly, I would mirror the site to my harddrive, make the changes locally (while maintaining a copy of the original files) and then ftp the changed files back to your server. You can use a text editor like EditPro , open all the documents, and do a replace all. As DD says, Cleo probably has a better solution, but from experience server side editing, as in all editing, is not very forgiving. |
if you have ssh, you can use rpl
I would suggest that you do something like cp -Rp currentdir backupdir then rpl -R -x .html -x .php 'texttoreplace' 'replacewith' * that will look at only .html and .php files an d replace the text. Of course, if it is multiline, you need to use -e and map the \n for newlines. rpl is on most distributions. In debian, apt-get install rpl its a python script and is pretty easy to use. you can also add -s, which will run a dry run and tell you the number of occurrences and number of files that will be changed. |
Thanx everyone |shake|
MadMax Dreamweaver is over my head Chop Smith glade you posted I was just trying to decide if I had balls big enough to do this on the server. If your worried about me fucking my whole site up odds are I would have I'll do it your way|rasta| Got that link book marked Cleo, btw the last post you wrote about how you have phpadds setup cut through the fog for me thanx |roses| |
Quote:
Your talking to a man that has been watching movies with subtitles for months becouse I can't find the button to turn them off on my remote|zzzzzzzzz |
dare has a couple of notes and links on his marks-links submit page that could be helpful (after you've backed up of course!)
|
|smooch| goes to EditPlus 2
|
Quote:
|
All times are GMT -4. The time now is 07:55 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc