How to install WordPress Locally (Windows PC)

The following guide will take you through the full process of setting up the server, creating a database and installing WordPress on your local computer.

I create WordPress themes, and I do all of my development work on a local server, rather than on a live site/domain. When I say ‘local server’ I mean that I have installed a local server environment on my PC – this allows me to have a WordPress installation directly on my computer that I can use to develop and test on. It is very straightforward to set up, and brings several benefits.

For example, because everything is happening locally, it removes the need for FTP transfers – changes to code are instantly viewable. It also provides the opportunity to test freely without worrying about causing a bottleneck on remote hosting provider’s servers. Themes and plugins can be developed in a closed environment and released to the outside world when everything is ready.

The following steps will take you through the process of setting up the server, creating a database and installing WordPress. This guide is for Windows, but the software used here can be downloaded for Mac also.

Step 1: Download required software

Download MAMP and Word.Press (both are free).

MAMP and WordPress

Step 2: Install MAMP Web Server

Install MAMP and reboot. Run MAMP.

Windows will prompt for firewall access for private networks for APACHE and MYSQL – accept both.

Step 3: Set MAMP Web Server Document root

First we need to set the Web Server Document Root. This is where your Worpdress installation will reside. The path to this folder is set by MAMP as ‘C:\MAMP\htdocs’, but it can be changed as follows:

Open MAMP, and go to ‘Preferences’.

MAMP UI

Then, go to the ‘Web Server’ tab, and set the Document Root to the desired path (the default is ‘C:\MAMP\htdocs’ – you can leave it as is, or choose your own location). Click OK.

MAMP Preferences

Step 4: Test that MAMP is working

Create a file called index.php and add some code to it, e.g:

<?php echo ‘<p>Hello World</p>’; ?>

Navigate to the MAMP Web Server Document Root folder (see step 3 above) in windows explorer: this is where you should place your newly created index.php file

Open your browser and go to: http://localhost/

You should see the following:

Localhost

Now that the local server environment has been set up we can move onto creating a database.

Step 5: Set up a Database

Go to MAMP main menu

MAMP - Open start page

Click on ‘Open Start Page’.

Then, in your browser, click on ‘tools’ / ‘PHPMyAdmin’ as follows:

MAMP Tools

Create a new database. I called mine ‘designer’ but you can name it anything you like. Set the second dropdown to ‘utf8_unicode_ci’.

phpMyAdmin

Step 6: Extract WordPress

Extract WordPress installation zip to MAMP Web Server Document Root directory as follows (for download link, see step 1):

Extract WordPress

Step 7: Add database details to WordPress ‘wp-config-sample.php’

Open the WordPress folder you just extracted, then locate and open ‘wp-config-sample.php’ with your preferred HTML editor.

Wordpress PHP

In ‘wp-config-sample.php’, find the following lines of code:

Wordpress PHP

Firstly, change the database name (DB_NAME) to the same name as the database you created earlier (I called it, ‘designer’). Then change the DB_USER and DB_PASSWORD both to root, and save the file:

Wordpress PHP

Step 8: Install WordPress

In your browser, open: http://localhost/wordpress

…and the installation process will now start.

Wordpress installation

Select your language, then after clicking ‘continue’, you will be presented with the following screen:

Wordpress installation

After clicking ‘Let’s go’, we are presented with a form.

Wordpress installation

We have to enter only 3 things:

1. Database name – (in my case: designer – see step 5 of this guide)
2. Database username – root
3. Database password – root

The remaining fields can be left as default:

4.Database Host – should already be set as ‘localhost’
5.Table Prefix – should already be set as ‘wp_’

Upon clicking ‘submit’ you should see the following screen, and WordPress is now ready to be installed:

Wordpress installation

Click on ‘Run the install’.

After installation is complete, go to the following URL to login and see your WP dashboard:

http://localhost/wordpress

Congratulations, you have just installed WordPress on your local system.

Wordpress dashboard

 

Other posts
  • Blue Hotel Illustration
    I haven’t posted in a long time. I set up this blog with the intention of updating it regularly, however it has not worked out that way, mainly due to other
  • An article on thin line display issues when PDFs are viewed in AcrobatAn article on thin line display issues when PDFs are viewed in Acrobat
    Do your PDF Line weights look wrong in Acrobat? A simple solution to Acrobat’s ‘enhance thin lines’ feature. Adobe Acrobat will sometimes add
  • Illustration (Urban Theme)
    Spirit of the Staircase (2D illustration) This is a section of a larger illustration I am working on. It is part of a series of 2D vector illustrations which I hope
  • Install Sass on macOS
    This is a simple short guide on how to install Sass on your Mac. If you receive an error whilst installing Sass, this article should provide a quick and simple solution. At the time of writing I am using macOS Sierra 10.12.5.
  • kmcdigital_retro_vcrGame prop – 80s VCR
    Bob’s video recorder This is another prop I created for iOS game ‘The System‘ starring Bob Logan, out now on the Apple App Store. Bob is a
home