How to Unzip Folders on the Server Using a Simple PHP Script

I have been installing WordPress MU and BuddyPress a lot recently as I test and test and test it for a client’s website.  The uploading of files via ftp has been the biggest consumer of time during this process.

Yesterday, I discovered a simple PHP script that makes installing WPMU, BuddyPress, WordPress, or really anything else a quick and painless process.  All you need is a zipped folder!  Here is the script:

1
<?php system('unzip wpmu.zip'); ?>

or Download the PHP file here (but make sure to change the file extension from .txt to .php).

Simply:

  1. Upload your zipped file to the server (in my case, “wpmu.zip”).
  2. Edit unzip.php to point to your file (download unzip.php above).
  3. Upload unzip.php to the same folder as your zipped file.
  4. Open a browser and point it to http://mydomain.com/unzip.php (make sure to change “mydomain.com” to your domain).

That’s it!

2 comments ↓

#1 Paul Alvares on 03.22.10 at 8:31 pm

Champ! it works great =]

#2 RB on 05.25.10 at 1:26 pm

You are fantastic!!! Saved me so much time after spending a couple of hours trying to figure out(I’m new to this)…thank you! (O:

Leave a Comment