One-Click WordPress Installer

old-wordpress-150x150So, I install a lot of WordPress.  It gets painful going to wordpress.org, downloading the latest stable version, unzipping it then uploading the zillion files up to the server through FTP.  Especially if you’re not on some crazy fast internet connection.  Personally, my home internet sucks, so it got to the point where it was taking 15 minutes, or so, to install WordPress.  That’s not fun.

space monkeyAnyway, I started looking around and I found a couple scripts that did a simple install from the server.  In other words, you upload a tiny file, run it and the install happens from the server.  Great!  Exactly what I was looking for!  Except they all still required you to edit the wp-config.php file, or they looked like they were designed by a monkey that just came back from outer space.

Luckily I finally found one that was old, but workable.  I spent a little time with it and made it pretty good.  Now, installing WordPress exactly the way I want it takes about a minute and a half.  All but the last 10 seconds is spent setting up the space on the server.  Not bad.  

Check it out on Github.  That’s where the latest version will always be.

Find it useful?  Help make it better, or buy me a beer to say thanks.  I love beer.  It makes me so much more productive.

If you’re too impatient to go to Github, here’s the guts of of what the script does.

  • Downloads the latest, stable version of WordPress
  • Displays a form:
    • DB Host, DB User, DB Password
    • Creates a random DB prefix for security purposes (you can also set your own)
    • FTP Domain, FTP User, FTP Password, FTP SSL?
    • Memory Limit (For PHP.  When we got to something like v3.7 my server started puking once in a while because it would run out of memory.)
    • List of plugins to download along with WordPress
  • Renames wp-config-sample.php to wp-config.php and updates:
    • Randomly creates the SALT fields
    • Adds code and the FTP information so you can actually use the Update links in Dashboard.
    • Fills in the DB information
    • Adds the memory limit line
  • Deletes the tar ball of the install package
  • Deletes license.txt, because it’s silly to have
  • Deletes readme.html, because it’s silly to have
  • Creates .htaccess file and makes it writable to the user (664)
  • Forwards to install.php (This is where the db is set up by WP)

Leave a Reply

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