How to upload into cPanel from a 3rd party URL

Migrating servers is a huge pain in the behind, especially if the file size is huge. The standard method of migrating involves downloading all the old files from one server, then reuploading it into the new server. Not only is this a duplicate work and a waste of time, but your internet connection can often be a bottleneck that can extend this task time to many hours – assuming nothing goes wrong with your internet connection.

Here’s a much better way to do it, so that your cPanel pulls the files directly from the old server, bypassing your PC altogether.

1. Zip the folder in your old server into a single file

2. Create a new file in your new server called upload.php, and place it in the public_html folder or any other accessible folder.

3. Click on the picture below to go to the source page, copy the code and paste it into upload.php, and save:


Credit: Eyal Azulay on StackOverflow

4.  Access your file from the browser, e.g. yourdomain.com/upload.php

5. Paste the link to your zipped file in Step one, e.g. olddomain.com/backup.zip

6. Wait for it. You will get a timeout eventually, don’t worry about it. Check your cPanel File Manager periodically to see if it’s done.

7. Extract your Zip file. If it fully extracts fine, then congratulations, the job is done! Delete your upload.php file or move it outside of public_html so it isn’t abused by bots.

8. If the file is a large file and is truncated due to a timeout (resulting in a broken Zip extraction), increase the max_execution_time option in your PHP Selector.

Credit: Eyal Azulay on StackOverflow

Share via
Copy link
Powered by Social Snap