How to install a local WordPress installation to your Windows PC – part 1

When you first start off creating WordPress based websites you will realise that because WordPress runs on PHP ( a server side language ) you will have to work on the live site whilst creating new content, styling and functionality.

This can be extremely problematic especially if you are generating traffic as the website will be changing as your visitors interact with it and if you make a mistake with the code it can make you look unprofessional.

To get around this the best thing you can do is install a version of WordPress locally to your computer. In this post I am going to explain the first step in creating a local WordPress installation.

Step 1 : – Install XAMPP


As PHP is a server side language it cannot be read on a standard desktop computer ‘usually’, but alas the humble computer is quite gullible and you can trick it into thinking that it is running a server on a Windows PC by installing a program called XAMPP.

Step 1 a) Visit the XAMPP website and download the installation files

XAMPP will install Apache, MySQL & PHP to your computer allowing you to interact with the server code.

Download XAMPP

Double click the installer once it has finished downloading.

Step 1 b) Follow the XAMPP installation instructions

Once you click the install button a WARNING WILL POP UP! Do not be alarmed, this is just letting you know that XAMPP needs to be placed outside the programs folder to ensure it works correctly.

Click through and ensure the directory for XAMPP is installed OUTSIDE the programs folder.

Step 1 c) Reboot your PC

Do as the title says as XAMPP may not like it if you don’t and not play fair which will just lead to frustration so…restart your PC now.

Open XAMPP Control Panel


Once XAMPP is installed go to your Start Menu > All Programs > XAMPP > XAMPP Control Panel and you should see an image similar to that here.

Click on Apache & then click admin to ensure that Apache is running. You should land on a XAMPP for Windows page if not please leave a comment below or contact me and I will try to help you.

Step 2 : – Setting up the folder directory

When you have XAMPP installed on your computer if you want to access your folder directory type ‘localhost’ into any of your internet browsers and you should be given a list of folders that are currently in your XAMPP folder.

This directory can be found in the place you installed XAMPP to and this is where you will create local versions of your WordPress installations.

Step 2 a) Navigate to XAMPP Directory

To find the ‘localhost’ or root directory navigate to where you installed XAMPP. Inside you will find several folders, click ‘htdocs'(also right click it and create a shortcut for it so it is easy to find either on the desktop or tag it to your start bar).

Once inside htdocs delete everything EXCEPT FROM THE 3 FOLDERS.

Step 2 b) Create a new folder for your local site

Now you have set up XAMPP, have a shortcut for it on your desktop and deleted all unnecessary files right click and create a new folder. Rename it something like ‘localyourwebsite’ and this is where we will install the local WordPress.

Step 3 c) Navigate to localhost in your internet browser


To ensure your folder is created and accessible from your localhost open your preferred browser and type localhost into the address bar and now you should see the list of directories that reside in the htdocs folder.

First step of creating the local WordPress installation is now complete, you have successfully turned your PC into a ‘remote server’ enabling you to write and interact with PHP code without being online, a very useful way to develop your website without effecting your vistors.

In stage two we will install WordPress and create a local database for WordPress to work correctly.

Part 2 of how to install WordPress locally found here