How To Install WordPress Locally With XAMPP


Install WordPress Locally

After our last reader requested post all about Google Webmaster Tools, I got an email asking me if I could put together a tutorial post looking at how to install WordPress locally on a computer.  I thought this would be a great topic to write about as I am actually working on a site myself that is set up in this way.

Why Install WordPress Locally?

So, before we start, why on earth would you want to install WordPress on your computer?  Well, I think many people don’t even realize that you can do this in the first place.  By installing it locally (on your computer), it allows you to create websites in a safe environment where you can test out; different plugins, website layouts, CSS coding, etc.

The fact that you can create test websites without them needing to be online means that you don’t have to worry about messing up.  This is especially great when you are looking to set up your first website and don’t quite know how things work.

I also create websites for some local clients in this way, where I can take my laptop to a meeting with them and show them what their new site would look like, without ever having to touch their existing site.

The great thing is that it’s pretty easy to setup, so let’s get started…

Download XAMPP

If you were creating a website in the tradition sense (i.e. online), you would need to buy hosting space to store all your files online.  The other important aspect of a hosting provider is that it includes Apache, MySQL, PHP, phpMyAdmin and Perl, which are needed for your WordPress site to work properly.

Now because we want to setup a site locally, we are going to need our own version of a host on our computer that also contains Apache and MySQL servers, as well as PHP, phpMyAdmin and Perl program languages.  For this, I use XAMPP, which is completely free!

Download XAMPP here.

There are versions for Linux, Windows, Mac OS and Solaris, so make sure you install the right one.  For this tutorial I will be using the Windows version, though the same steps should apply to the different versions.

Install WordPress Locally

Click onto your version, navigate to the “Download” section and click on “XAMPP

Install WordPress Locally

Then click on the “Installer

Install WordPress Locally

Install XAMPP Onto Your Computer

Once it has downloaded, you are ready to install it to your computer.  Simply click on the installer and follow the on-screen instructions.

Install WordPress Locally

When it asks you to “select components”, simply leave it as it is so that all are installed.

Install WordPress Locally

When it asks where you want to install XAMPP, keep it in the C:\ drive.  Saving it in your program folders could cause issues at a later date, so it’s best to leave it as it is.

Install WordPress Locally

XAMPP will then tell you about BitNami, which is a free installer that can install Drupal, Joomla, WordPress and more on your XAMPP installation.  We will be making use of this shortly, so for now just click ‘next‘.

Install WordPress Locally

One your happy, finish the set-up process and install XAMPP to your computer.  It should take a couple of minutes to install properly.

Install WordPress Locally


Once XAMPP has finished installing, you can start it up by clicking on the ‘XAMPP Control Panel’ in your Start menu.

Install WordPress Locally

For now, we only need to start Apache and MySQL, so click on each of these

Install WordPress Locally

You will probably get a ‘Windows Firewall’ notification popup for each of these.  Make sure that you “Allow Access” for each, otherwise XAMPP won’t work!

Install WordPress Locally Install WordPress Locally

That should be it!  Now simply open up your browser and navigate to http://localhost to check if it’s working properly.  You should see the following.

Install WordPress Locally

Install WordPress

Now that you have finished setting up XAMPP, we can install WordPress locally.  We are going to use BitNami that was mention earlier when we were installing XAMPP.  You can navigate to their site and download a WordPress installer there (as well as other useful website plugins), which makes things a lot easier.  Again, remember to install the correct version for your computer.

When it has finished downloading, open the installer.

Install WordPress Locally

Make sure that you save it in the same place that we installed XAMPP, which in our case was C:\xampp

Install WordPress Locally

On the ‘Create Admin Account’ page, enter in your WordPress details.

Install WordPress Locally

Name your blog.

Install WordPress Locally

It will ask you if you want to link an email account, which is totally up to you.  You don’t really need to do this for a local site though.

Finish the set-up process and let BitNami install WordPress for you.

Install WordPress Locally

Once it has finished, you will be taken to your new WordPress website installed on your computer.

Install WordPress Locally

That’s it!  You now have a basic version of WordPress set-up locally on your site.  You can now navigate to http://localhost/wordpress/wp-login.php and login to your WordPress dashboard with the username and password that you previously set up.

Have fun creating your site and playing around with different plugins and site design.

Do you create sites like this? Have you made sites locally before before transferring them online?  Do you have a request for a future post?  Please let us know in the comments below!

About Matt Smith

Matt Smith is the founder and editor of OnlineIncomeTeacher. He is a Professional Blogger, SEO Consultant & Web Developer, running a number of sites from the UK. Connect with him on Twitter, Facebook, Google+ and LinkedIn.

  • Andi the Minion

    This is a seriously good post Matt. I should have known that there was a way to install WordPress on your computer so you can work on it and carry out plugin tests etc but I didn’t. You normally work off line when developing HTML style websites so why I never thought about it I don’t know.

    I have learned something new and this post will be very useful for many more people and I have to say that your site is definitely becoming a resource of great useful WordPress tips and advice. I have several posts now to come back to re read as I know they have all of the information I need.

    I am loving all of these new educational posts Matt, it shows that you know your stuff!

    • Hi Andi,

      Glad you are liking the new content. Been a bit disappointed of late with the guest posts people were sending in, so I thought it was about time that I knuckled down myself. Got plenty more to follow (hopefully) 🙂

      I don’t work on ALL sites offline, but it does help when I can. For example, I redesigned this site online as I was concentrating on site speed and load times, which aren’t always accurate offline. But anything where I am just playing about with ideas and testing out plugins, offline mode is great for that.

      • Andi the Minion

        I need to get myself in to gear and write some posts for you, it has been way to long. Will go and write up a fresh list of potential ideas for your site this week.

        • Your always welcome to write for OIT Andi. Be happy to write up something for your site as well if you like.

          Will be in touch 🙂

  • Clair Trebes

    Wow Matt, i didn’t realise you could do this!

    This is such a great post 🙂 100% going to add to my bookmarks.

    Another great post from OIT that is informative and we are always learning from you Matt so thanks for this too!

    • Hi Clair,

      Doing it this way can be a good way to test out a site before forking out for a domain/hosting, especially when first starting out. I like to use it to test out new plugins to see if it breaks anything on site.

  • Deina Kotane

    Really great post Matt! I’ve always wanted to do this but didn’t think it was so easy! 🙂

    • Hi Deina,

      Yes, it’s super easy to set up on a computer and get started. Such a great way to test out sites before you make them live. In fact I’m doing one in this way right now for a project that I’m working on.