If you have been a developer long enough, at some point you would have had to move a large quantity of files from one server to another.  Now the manual method involves downloading everything via FTP, and then watching days pass while you upload it again to the new server.

This however requires copious amounts of patience and the involves several time-outs and files that need to be re-queued for transfer.  In short – it is a pain.

With necessity being the mother of invention, here is a short PHP script to use for transferring large files between two servers.
Note that you need to .zip the file / files up so that it you have one file that will be copied before starting on this script on your new server.  Create the script on the new server, add the URL to the backup in the script and you’re good to go.

set_time_limit(0); //Unlimited max execution time
$path = '';
$url = '';
$newfname = $path;
echo 'Starting Download!
$file = fopen ($url, "rb");
if($file) {
$newf = fopen ($newfname, "wb");
while(!feof($file)) {
fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
echo '1 MB File Chunk Written!
if($file) {
if($newf) {
echo 'Finished!';

Save it as ‘upload.php’ and run it in a browser. It will immediately start to copy the file from the old server to yours. Once you see ‘Finished’ it is done.