Learn: how to upload file directly from URL in filemanager of cPanel

Gentle Man

Member
Jan 20, 2021
44
30
18
Being on a slow connection downloading and then uploading again wasn't an option for us.

There isn't any way to do this through the cPanel filemanager at present. If you don't have access to SSH you can get around it like this:

  1. Create a new file in the filemanager, call it get1.php or whatever and place it in a location you will be able to access on your domain.
  2. In get.php edit the file in the filemanager, and put this code:
    PHP:
    <?php  exec("wget http://domain.com/path-to-file.zip"); ?>
  3. Now navigate to your file you created in step 1 in your browser, so it might be
    Code:
    http://domain.com/get1.php
  4. Wait. The page might return a 500 error, thats OK, the wget command should still go through.
  5. In cPanel in your file manager reload the directory where you put get1.php, you will see the file there waiting for you. Done.
Now of course this is highly insecure as any bot or person could just request your get1.php file, so make sure you delete it after your done. This is just a simple hack, any better ideas appreciated.
 

Forum statistics

Threads
69,229
Messages
908,458
Members
237,126
Latest member
skzh6210

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu