Recently I’ve started to play around with WordPress.com however the best way to get the most out of all WordPress extras is to install it on your own PC. In this tutorial we will go through the steps to install IIS 7, PHP 5, MySQL 5 and WordPress 3.
Step 1: Files to Download
- PHP 5.3 – windows installer non-thread safe.
- MySQL 5.5 – grab the MSI installer for either 32 or 64 bit machine. Also grab this GUI Workbench tool.
Step 2: Install IIS 7
Go to Start -> Control Panel -> Programs -> Turn Windows Feature On/Off.
Expand the Internet Information Services tick:
- Web Management Tools/IIS Management Console
- World Wide Web Services/Application Development Features/CGI
- World Wide Web Services/Common HTTP Features/Default Document, Directory Browsing, HTTP Errors, Static Content.
Click “Ok” and wait for it to finish!
In your browser go to http://localhost and if installed correctly the main screen of IIS7 should appear.
Step 3: Install PHP
Run the installer and go with the defaults. Select “IIS FastCGI” when prompted. The installer will automatically add pre-sets to IIS. Done!
Test the PHP install by creating a text file in C:\inetpub\wwwroot\test.php. Name it “test.php” and put the following code in
<?php phpinfo(); ?>
Now go to http://localhost/test.php and you should see the PHP screen.
Step 4: Install MySQL
Run the installer for MySQL 5.5 and the GUI Management Tool. Choose “Typical” setup when prompted and use the default settings.
Once completed an “Instance Configuration Wizard” will start. Follow the default settings. Enter the root password when prompted, keep it simple and write it down. Let the wizard run through.
Next install the GUI Workbench. Again follow through with the default settings.
Step 5: Create wordpress database
Open the GUI Workbench through Start->All Programs -> MySQL -> MySQL Workbench
In the SQL Development column double click on “Local instance MySQL”. Once logged in, on the left-hand menu you will see “Add Schema”, click it. Change the “new_schema” name to “wordpress”. Finish by clicking “Apply” and “Finish”. Now next to “test”, you should see “wordpress”.
Step 6: Install WordPress
Unzip the downloaded wordpress.zip folder. Copy the contents into C:\inetpub\wwwroot\wordpress.
To start the installer in you browser go to http://localhost/wordpress/
When prompted put in the database name, and root passwords we had in step 4 & 5
Once completed go to http://localhost/wordpress/wp-login.php to start creating your first WordPress site.
Extra Step: Turn automatic on for IIS and MySQL services
Most likely you won’t be playing around with WordPress everyday, so it makes sense to only turn on the servers when you need to. MySQL and IIS are set to turn on automatically when the PC starts.
To turn off the automatic start, go to Control Panel -> System and Security -> Administrative Tools -> Services
Scroll down to “MySQL”, right-click to “Properties” and set “Startup Type”: to Manual
Do the same for “World Wide Web Publishing Service”.
WordPress could not create wp-config.php. Go into C:\inetpub\wwwroot\wordpress copy the wp-config-sample.php and change the DB_NAME, DB_USER, DB_PASSWORD, DB_HOST values. and save it as wp-config.php
WordPress can’t upload any files, go to C:\inetpub\wwwroot\wordpress\wp-content right-click to select Properties -> Security -> Edit. Give IIS_IUSRS “Full Control”
When I go http://localhost/wordpress/ a list of files show. Open up the IIS Manager. Select Sites-> Default Web Site -> wordpress , double-click on “Default Document” in the Features View. Add “index.php”
If you liked this tutorial or spotted any errors please let me know by leaving a comment below.