WIP: WordPress Self-Installer
August 1st, 2010
I love WordPress. I use it almost everyday and for almost every web project that I am involved in. Whether designed, developing, or extending, WordPress has become so close to a default for me its not even funny.
With all these WordPress sites being rolled out, my local development server has become trodden with folders and folders of WordPress installs. I always begin a site locally in development and then migrate to a test server later on for previewing, so sometimes it gets rather time consuming to do manual WordPress installs once, or twice, or sometimes three times a day. That’s basically what spawned this idea.
Okay, I know this might not be a super break through script, judging by the fact that most shared hosts come pre-installed with Fantastico or have their own “1-Click” WordPress installers (a la MediaTemple), but that doesn’t help us developers who enjoy the speed and control of developing locally. In addition, there aren’t any free development versions of Fantastico or anything of the like. lame.
As a disclaimer, this script is a work-in-progress. It currently runs great for me on my Mac running Snow Leopard 10.6.4. If your on a different OS, than be careful when running this, since it is writing and renaming files.
Requirements
- PHP and MySQL (duh)
- cURL PHP Extension
- Tar command-line capabilities – comes pre-installed on Unix based systems (Windows users > try installing this)
What exactly this script does
- Uses MySQL connection to create new database for WordPress
- cURL then grabs latest wordpress tar.gz archive
- PHP then asks server to extract the Tar to a directory following the same name as the database
- Setups up core wp-config.php file with already-in-place MySQL connection info
- Redirects to WordPress settings setup page for you to add your blog name, initial user account, etc
Setup and Execution
- Download ZIP and copy wordpress.php to local servers root directory
- Configure the
configclass with your MySQL information (host, user, pass) - Run the wordpress.php file through your web browser (for me thats
http://localhost/wordpress.php) - You’ll then see a list of active WordPress installations on the left, and a place to create your new WordPress Install on the right.
- Enter your new desired installation name, and click submit
Source Code
- Download ZIP (4kb)
Any comments, suggestions, or bug reports welcome :)








