How do I install WordPress on Windows 7?

How do I install WordPress on Windows 7? cover image
  1. Home
  2. Apache
  3. How do I install WordPress on Windows 7?

WordPress consists of a suite of scripts written in PHP utilising the MySQL database to store information. It was initially developed as a blogging platform and has gradually taken the form of a full-fledged CMS (Content Management System) for web sites.

Based on our experience, it just makes more sense for us to develop client web sites using WordPress as we are no longer troubled by requests for small textual changes; the clients just do these on their own. Additionally, there are thousands of easy-to-install, mostly free plugins that extend the capabilities of the wonderful blogging tool.

Sponsored Links

You may have your own reasons to set up WordPress on the local computer. For us, the primary aim was to speed up theme creation. We also use the offline installation to teach clients the how to use WordPress.

Things you need to set up WordPress on your computer

As mentioned, WordPress uses PHP and MySQL which means you should have a web server running on your computer. Your local system, thus, has to act as both a client and server.

So you just can’t download WordPress and install it without doing the preliminary work. Here are the things you need and just like WordPress itself, all the following software are free!

  • Download the WordPress .zip archive from their web site.
  • Open the zip archive and select all the files and folders - Ctrl-A.
  • Right-click and select copy. Put all files in the clipboard.
  • Paste all the WordPress files into the empty folder under the document root.
  • Locate and launch the MySQL Command Line Client from Programs menu.
  • Type in your MySQL password in the CLC.
  • Create a MySQL database for WordPress using the command line client.
  • Database created and ready to use.
  • Open the WordPress config file in Notepad and get ready to make some minor changes.
  • Put in the database name, username and password in the configuration file.
  • Open the WordPress installation page in a browser window.
  • Fill the installation form - set up a site title, username and password.
  • Click on the Install WordPress button.
  • Hit the log in button to check the installation.
  • Type in your WordPress username and password.
  • If you get a list of files, don't fret. We shall soon correct this. Click on index.php meanwhile.
  • The WordPress dashboard - the page you see when you login (index.php).
  • The WordPress offline blog on your local Windows 7 computer.

Downloading and unpacking WordPress

  1. WordPress is available in two formats .zip and .tar.gz; the former being more suited to Windows users. Click this WordPress download page link to launch the web browser and get the .zip file from the site [Slide 1].
  2. Move to the folder in which you downloaded WordPress and double-click on the zip archive to open the file which should reveal another folder inside. Double-click on that too.
  3. You will now see all the WordPress PHP scripts and their supporting directories and files. Select everything (use the Ctrl-A keyboard shortcut) [Slide 2] and copy it on the clipboard (Ctrl-C) [Slide 3].
  4. Launch Windows Explorer and go to the document root of the web server, which would be C:\websites if you’ve followed my instructions on installing Apache and PHP. Create a new folder for WordPress in this directory. You can name this folder anything you want – something simple like blog or wordpress will suffice.
  5. Paste (Ctrl-V) the contents of the clipboard into this folder. This may take a minute as there are tons of files and folders [Slide 4].

Installing WordPress on your Windows 7 computer

  1. Open the MySQL Command Line Client (CLC) from All Programs -> MySQL -> MySQL Server 5.5 [Slide 5].
  2. Type in the password you had set for the MySQL server [Slide 6].
  3. Create a database for your WordPress installation by issuing the command below. Please note, you can name your database anything. I set it up as wp_blog [Slide 7].
    create database wp_blog;
    

    Hit the Enter key to get the confirmation from CLC (Query OK…) [Slide 8].

  4. Move to the folder in which you had pasted all the WordPress files and locate wp-config-sample.php file. Rename to wp-config.php.
  5. Open this configuration file in Notepad. We need to put in our MySQL database login and other details [Slide 9].
  6. We need to change three lines in this file and all of them are at the beginning. Remember the database you created in an earlier step? Type in the name where it says database_name_here.
  7. Similarly, replace username_here and password_here with the actual MySQL username and password [Slide 10]. Please look at slideshow in case of doubt as this has to be done correctly! Save the file and close the Notepad window.
  8. Open browser window and type localhost/blog/wp-admin/install.php in the URL bar [Slide 11]. Replace “blog” in the URL if you have a different name for the WordPress install directory.
  9. Complete the small form. Type in a site title, username, password and an email address. This will be your WordPress login information [Slide 12]; and don’t worry too much on making the password ‘strong’ as this is an offline installation.
  10. Hit the Install WordPress button at the bottom! [Slide 13]
  11. WordPress will now be installed on your computer! It was that simple! [Slide 14].

Testing the WordPress installation

  1. Click on the Log In button or point your browser to localhost/blog/wp-login.php [Slide 15].
  2. Enter your WordPress username and password [Slide 16]. Uncheck “Allow my site to appear in search engines like Google and Technorati.”; it’s an offline blog after all.
  3. Whoops! Do you see the folder contents (list of files and folders) instead of the WordPress dashboard page [Slide 17]? Don’t worry about it as we’ll fix that in the next step. For the time being, simply click on index.php to get the dashboard.
  4. You see the list of files instead of the dashboard because the Apache web server doesn’t recognise index.php as the ‘directory index’ file. We can correct this by editing httpd.conf. Open this file in Notepad and locate the following segment:
    <IfModule dir_module>
        DirectoryIndex index.html
    </IfModule>
    

    We just need to make a small change. Go to the end of the middle line, put in a space character and type in index.php. The lines should now look like ones below:

    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>
    
  5. FYI, your offline blog will be available at localhost/blog/ (where ‘blog’ is the WordPress install directory [Slide 18]. You’ll find a test blog post on the default theme.

This completes the installation of WordPress on a Windows 7 machine. You can now use it to create new themes or whatever you intended to use it for. Enjoy!

Apache How Do I MySQL PHP Windows 7 WordPress