Simple Hack to download files directly to your hosting space without SSH – PHP script

I was moving my website from one host to other and the website size was very big that I could not download and upload the files to my new hosting provider. I had shared my story of the struggle I did where It took 16 hours to migrate a wordpress site and I used this trick to get my files downloaded from previous host to new host without downloading it on my laptop.

I’m sharing this PHP script which invokes system functions on server to download files. This is the most handy script when you don’t have SSH access on the server. It’s kinda a hack as you don’t have permission to use SSH but still you are able to do your job with PHP. Many host can block specific functions of PHP but this works in most cases and this helped me too.

You need to create a folder where you want to download the file and place below script in the folder. Save the changes and visit this php page from the browser. In the url field enter the url to the file you want to download and hit submit, now wait for a few minutes and your file will be ready.

Read Also:  Automatic deployment for Tomcat Applications

Hope this will help.

Leave a Reply

Your email address will not be published. Required fields are marked *