I don’t have command line access to my web server but I have been able to enable Subversion via cPanel and I can access the repository.
My goal would be to have an off-line copy of my website on my hard drive so that I can quickly add or edit files, commit and have the results go live. Could Subversion really do this?
Because right now I have uploaded some files to my repository but I can’t see them anywhere on my FTP, is this normal? Are there maybe simpler ways to do this?
I have already tried mounting my FTP as a volume but navigating between the files in it is too slow and I can’t revert if I do a mistake.
In the essence, Subversion works like this:
Server keeps tabs on the changed files and keeps a history of these changes in a highly compressed form. You cannot use the files directly in this form.
Clients ‘check out’ a ‘working copy’, which is essentially an offline-copy of all the current files. Whatever you do in these files has no effect whatsoever on any other working copy or the server.
Clients ‘commit’ changes they made to the working copy to the server. All other clients can now ‘update’ their working copy, to get the most current state.
What you want is the following:
Check out a working copy to both your local computer, as well as the web folder on your server. The working copy on the server is ‘live’.
You work at the WC on your local computer, until you’re sure it’s good to go. Make as many commits as you think are necessary, collaborate with others, etc.
Once everything is done and you want the stuff to go live, you run ‘update’ on the web folder, transmitting all the changes to the web folder. The changes are now ‘live’.
You have a bit of a problem though, since you don’t have command line access on the remote machine. Running svn update is thereby a problem. However PHP comes to the rescue here.
There is an SVN addon for PHP, described at: http://php.net/manual/en/book.svn.php
Make sure, that it’s installed with your PHP, make a script that does the checkout for you (upload it via FTP), and then alter the script to call ‘update’ instead.
I hope this helps a little.