I tried some of the content management systems. These had the advantage of letting me edit my pages from any machine, but I wasn't happy with the style and worried about the security in the systems as well as recovering old versions. I'm sure there are some good tools there, but I was looking for something simpler.
I already use subversion for several other projects so I know it pretty well. My hosting company (nearlyfreespeech.net) allows svn+ssh so I gave it a try and liked it. Since it isn't obvious how to do this I wrote up these instructions for anyone that wants to do the same.
These directions are written assuming you are using nearlyfreespeech.net, but should work on any host that allows ssh access and has svn installed.
/home/
htdocs/ <-- This is the top directory of your website
private/ <-- This is a directory where you can store private files
svn/ <-- this will get created when you init the svn repository (name is arbitrary)
ssh myusername_mysite@ssh.phx.nearlyfreespeech.net export EDITOR=nano svnadmin create /home/private/svn svn mkdir file:///home/private/svn/htdocs -m "create directory for new project" svn mkdir file:///home/private/svn/htdocs/trunk -m "create new driectory for trunk"
(next steps will set up the htdcs directory on the server as a svn sandbox) svn co file:///home/private/svn/htdocs ./tmp mv ./tmp/trunk/.svn /home/htdocs/
svn co svn+ssh://myusername_mysite@ssh.phx.nearlyfreespeech.net/home/private/svn/htdocs/trunk ./mysite.com
create the new file (copy it in, create in a editor, whatever...) svn add newfile (You must "commit" to get the repository updated) (You must uodate the web site after the commit so it gets the new file)
(from the top of your project directory on your local system) svn status (This will tell you what you have changed) svn commit -m "Reason for commit" (you should explain the reason for the changes here) (Remember, the web site must be upodated before it gets this new revision)
ssh myusername@ssh.nearlyfreespeech.net "cd /home/htdocs ; svn up"(You will be prompted for your ssh password.)
cd localtop
svn up
|
|
email any comments
to:
![]() |