: Best way of updating website files quickly I was wondering if there is a better way of updating my website's content. Right now, I make it in a text editor, and then test it on the localhost.
I was wondering if there is a better way of updating my website's content. Right now, I make it in a text editor, and then test it on the localhost. When I am happy with the code, I save the files and then copy them onto the file manager on my web host.
An example is when I add an option in the 'settings' section for the user to upload a profile picture. The settings.php needs to be updated, and an add_picture.php needs to be added. Uploading these takes a long time.
Is there a quick way of transferring added content and scripts from my computer onto the webhost?
Maybe a CMS is right for my needs, but i'm not too sure what this is?
(i run a LAMP server)
More posts by @Sarah324
3 Comments
Sorted by latest first Latest Oldest Best
I've written a tutorial describing how to use FTP a little like rsync, which is great when your only method of access is FTP. The script only uploads changed files, and you can set up exclude patterns too.
If you have SSH or another means, I'd recommend the Git or other VCS answers.
You can consider binding your server to version control system, like Subversion. Then use command-line commands, or install some visual client, then you can easily see which files changed since last upload, and upload them all (within different folders etc.) with one click. It requires some effort though to configure it.
The advantage is that it does not upload whole files, but only changed parts. So if you changed one line in a big file, only small portion of data will be sent.
The best effects would be if there would be fast connection between SVN server and HTTP server (or even them to be the same machine). There are many possibilities here, but generally I think it's good to separate SVN repository and production HTTP server, and create some hooks that copy the contents from SVN repo to HTTP server after commit.
To sum up, the flow is:
developer machine -> SVN server (slow connection, small uploads) -> HTTP server (fast connection, whole files are replaced). SVN server and HTTP server are same machine, or "close" to each other.
Use an IDE which supports FTP transfer. Then you can edit the code, and can probably hook the IDE's save function into its FTP function as well.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.