Mobile app version of vmapp.org
Login or Join
Sarah324

: 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.

@Sarah324

Posted in: #Php

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)

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Sarah324

3 Comments

Sorted by latest first Latest Oldest Best

 

@Shelton105

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.

10% popularity Vote Up Vote Down


 

@Lee4591628

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.

10% popularity Vote Up Vote Down


 

@Gloria169

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme