Question :
How to extract an uploaded ZIP or TAR file
Answer :
Many applications come pre-packaged in a compressed ZIP or TAR file. Instead of unpacking these files on your local computer and then uploading the many files via FTP you can upload the compressed file and extract the files directly on the server to save you time.

1) Within the file manager on the Plesk web hosting control panel, select the .zip or .TAR file you wish to extract
2) Click on the 'Archive' drop-down along the top
3) Select 'Extract Files'
4) Choose whether or not you wish to replace existing files or not and click OK.
NOTE: Files will be extracted in the same directory that the .zip is located.

Previously, Plesk didn't have a facility to do this from the control panel, you can also extract files using this simple PHP script.

Create the following PHP file either directly from the Plesk File Manager or on your local computer and then upload it to the same directory as your zipped or tar file, usually your httpdocs folder. You could call it unzip.php or untar.php. Select the appropriate method and then copy the line of code into the PHP file and then replace '' or 'example.tar.gz' with the filename you wish to extract.


<?php system("unzip") ?>


<?php system("tar -zxvf example.tar.gz") ?>

Upload the file you wish to extract and ensure your PHP file is in the same directory, usually in the httpdocs folder. Now run the command by visiting the untar.php URL in your browser. e.g. - Be aware that it may take a moment to extract the archive, so please ensure you only visit the URL once and allow it to complete.

You will then want to delete the unzip.php or untar.php file from your hosting account, to avoid any accidental future extraction of your archives. If you've also finished with the original compressed file, delete this to save on your disk space.

  Was this answer useful to you?
Yes No