Fast way for unzipping large libraries and frameworks on your ftp server

Moving large unzipped library or frameworks like Ext JS or WordPress to a remote ftp server can be a real time consumer. This is because of the many small files in those distributions. With the small utility described below it can be done much faster.

Why not unzip on the server

It is much faster to upload the zipped library to your ftp server and unpack it there.

How to do this?

Create on your ftp server a directory called zipper. Make sure you can access it from your browser as www.yoururl.com/zipper.

In this directory create a file called unzip.php in that directory (or some other name) and paste the following code in this file and save it. You can also download it from the link at the bottom of this article.

How to use it?

Upload the zipped file that you want to unpack on your ftp server with your favorite ftp program (like Firefox fireftp) and put it in the root of the zipper folder.

When that is done, go to your browser and type www.yoururl.com/zipper/unzip.php.

SH_01109

It will show a dropdown with zip files in this directory. Select the file you want to unpack and click the Unzip button. Wait until the unzip process is done, it will show a message on top of the display that the file was successfully unzipped.

SH_01110

Return to your ftp program and refresh the zipper folder. In this folder you will also see a folder with the same name as your zip file. This folder can now easily be moved to the right place on the ftp server. Uploading and unpacking the Ext JS library (70 mB) was done under 3 minutes with a wireless connection and no more than 600 kB upload speed.

Small remarks

The reason that you still have to use an ftp program to upload the file to your server is to avoid upload limitations on the size. Some hosting providers don’t allow large uploads through your browser.

Just zip

Only files in zip (.zip) format are supported. If you would like to extend it with RAR files, you have to check if the Rar class is loaded on the PHP configuration of your server (by default it isn’t).

Remove the zip file after you have unpacked it. Don’t use your zipper folder for other purposes than a working folder for the function described above.

Link

Unzip.php (download as rar file)

Johan van de Merwe
Dedicated to professional software development since 1985. Has worked since 1992 as IT manager in several international operating companies. Since 2007 CEO and Sencha Ext JS web application developer at Enovision GmbH.

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.