The script’s main purpose is to provide an easier way to put WordPress on your server (it doesn’t configure WordPress for you). It does do a few things: it will automatically download the latest WordPress release (Zip file), then it will extract the Zip file contents (keeping the wordpress
folder if wanted) and then it cleans up, removing the Zip file and itself.
I am currently working on a couple of enhancements to this script, they include:
Upload Field: In addition to being able to enter a Zip file URL, you will now be able to select a Zip file for upload. This feature should be really useful for developers working locally; you will be able to package up your local WordPress installs and quickly deploy them on a server. Create local packages with your most useful plugin sets and quickly deploy.
Inline config.php
File Editor: The default WordPress config file setup process does not allow you to configure the Authentication keys of the config file AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, NONCE_KEY
… with a simple inline editor you can configure everything in a single interface.
I created the WordPress Downloader script to help me with the process of installing WordPress through FTP. Often the process takes several minutes to upload WordPress and sometimes errors can occur during the upload. If you install WordPress often enough the process can be a little frustrating.
What Does It Do?
The script’s main purpose is to provide an easier way to put WordPress on your server (it doesn’t configure WordPress for you). It does do a few things: it will automatically download the latest WordPress release (Zip file), then it will extract the Zip file contents (keeping the wordpress
folder if wanted) and then it cleans up, removing the Zip file and itself.
The below is a comparison of the general WordPress installation process and the wp-downloader.php
process:
The Normal WordPress Installation Procedure:
- Download WordPress (2.2 MB) from wordpress.org
- Extract the Zip File
- Upload Zip file contents via FTP (a few minutes upload time)
WordPress Downloader Installation Procedure:
- Download WordPress Downloader (8 KB)
- Upload WordPress Downloader script (a few seconds upload time)
- Browse to http://example.com/wp-downloader.php and click “Download Now!”
One of the main goals was to keep the script simple and self-contained. It is basically one file, wp-downloader.php
, that you upload to your server via FTP (or some other file management tool). After upload, browse to the file (like so: http://example.com/wp-downloader.php) and you will see a simple interface:
By default the script will use the latest WordPress release Zip file URL. If you need a different WordPress version, browse for the release you want and copy the Zip file URL by right-clicking (or control-clicking) the zip link and choosing “Copy Link Location”, you would then paste the link into the text field.
Additionally, by default, the script will automatically remove itself after WordPress has been downloaded and extracted successfully. Also, some prefer to keep the wordpress
folder, there is an option for that as well.
After the script finishes and is successful, you can continue on and begin to configure WordPress (using WordPress’ own configuration script).
For Those Who Download…
If you decide to give the script a try, please let me know if it works for you and especially if it doesn’t. I’d really like to make the script robust so that it can be very much “plug-n-play”.
Download
WordPress Downloader, this project is on github
Downloaded it, tried it. Sounds great, but I got an error when it tried to unzip the file. I didn’t have time to try and solve it right now, but it’s not all that surprising that I’d run into a permissions problem I guess 🙂
Teddy, let me know what you find out… additionally if you are trying it on a certain web host, let me know which one. Ideally I would like to make the script robust enough to work well across the board.
Great idea Teddy :), it is so useful for me, because my hosting not using cpanel, by using this It saves my time. Thanks …. 🙂
Dimas, you are the cleverest, devilist programmer. Used it three times today. no problems. Perhaps you could add an option to download a few “essential” plugins or popular frameworks.
Hey Dimas – I know your all about keeping things super simple and light but given the objective of this code might I suggest a few quick elements which I feel nearly everyone who would use it also have to preform. I believe all my suggestions allow for the greatest degree of flexibility for the developer. They are as follows:
1) Allow for the ability to automatically remove (or more preferably to block) the default wordpress database entries which are created. I am speaking of the default about page, the links, the default post, and the renaming of the default link category.
2) Simply allow for your own default entries to be inserted (if you want) based off an export file or other file so the import is auto-initiated upon install. (I believe there are existing plugins which might do this for MU sites and others based off files this could be based on).
3) Allow you to define what you want the wp-content & plugin folder to be called.
4) Allow you to define the location of some default code which should be added to the wp-config file. Same for the .htaccess file if possible.
5) Possibly allow you to define the location of theme zip file which should automatically be extracted to the theme directory and activated possibly replacing or deleting the default one that comes with WP.
6) Ability to add a media folder into a certain location & define the path location into the database.
7) Ability to add/update any default settings you would normally have to modify manually such as permalinks, public availability, reading/writing settings… ect.
8) Hopefully the ability to set the permission levels for specific files/folders.
9) This last one is probably more difficult but if a plugin.zip file could automatically be extracted and plugins activated it would be very cool but given the interaction/errors some plugins require it probably would lead to more issues.
In the situations I deal with I believe these elements would essentially turn your code into a real timesaver while ensuring consistency.
Just my 2cents
Chris, thank you for your suggestions … I like several of them and will definitely consider making these additions, hopefully sooner than later. Again, the code is on github and I welcome contributors.
It currently is not a complex piece of code, so it’s definitely a good time to get in on the development front.
Just wanted to say great script. I built on it to make a similar script, wp-prep (https://github.com/jaredatch/wp-prep).
Thanks again 🙂
looks great work but stuck with permission err !
can u please look after the code as I couldn’t upload theme file from my local PC also in dashboard
Many years later, this script is still a part of my WP arsenal.