Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Newbie Questions (http://www.greenguysboard.com/board/forumdisplay.php?f=5)
-   -   How do you search and replace a whole website? (http://www.greenguysboard.com/board/showthread.php?t=15071)

T Pat 2005-01-07 05:43 PM

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

MadMax 2005-01-07 05:49 PM

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.

DangerDave 2005-01-07 05:51 PM

Pat,

Cleo is probably your answer again... :)

I am pretty sure she has a decent "on server" search and replace script.

DD

Cleo 2005-01-07 06:15 PM

This is what I use.

Veinotte's Web File Editor
http://www.cgi.veinotte.com/scripts.htm

The site seems to be down. :(

Chop Smith 2005-01-07 06:17 PM

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.

cd34 2005-01-07 06:39 PM

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.

T Pat 2005-01-07 06:48 PM

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|

T Pat 2005-01-07 06:55 PM

Quote:

Originally posted by cd34


its a python script and is pretty easy to use.


Easy for you
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

Porn Meister 2005-01-07 08:06 PM

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!)

Dylan 2005-01-08 06:40 AM

|smooch| goes to EditPlus 2

tiny 2005-01-08 12:26 PM

Quote:

Originally posted by TijuanaPat
Easy for you
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

thats a setup button on the remote TP hehe.


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