ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How To Install WordPress Locally On Your Computer Using XAMPP

Updated on June 4, 2013

Why Do You Want A Local WordPress Installation?

First things first: Note well, this is not how you install a WordPress site on the internet. This is how you make a local installation of WordPress on your own computer.

Why would you want to install a WordPress site on your own computer?

So you can have a test bed WordPress site, where you can try out different themes and plug ins and layouts before taking the changes live online.

Why do you need XAMPP to do this?

Because unlike simple HTML pages, a WordPress site requires a database and a web server to work. XAMPP is a simple way to turn your own computer into a webserver you can access in your internet browser through http://localhost.

All clear? Good. Let's get started.


XAMPP control panel icon
XAMPP control panel icon

Fixing Vista To Allow Localhost Access

These are specific instructions for Windows machines, because that's what I use. If you're running Linux or a Mac - you're going to have to Google it. Sorry. This will work on Vista, and probably on XP too. If the downloads offer choices between Windows versions, choose the one your machine wants. NB: If you're running Vista, you need to fix Vista to allow localhost access, and this is how you do it:

  • 1. Go to C:\Windows\System32\drivers\etc
  • 2. Open the hosts file with Notepad, and change this line:
  • ::1 localhost
  • 3. -to this:
  • #::1 localhost
  • 4. Save the hosts file

NB: This is when you might get a message telling you the file can't be saved. This is how to get around it...

  • 1. Right-click hosts and select Properties.
  • 2. Click on the Security tab.
  • 3. Click Advanced in the lower right.
  • 4. In the Advanced Security Settings window, click on Owner.
  • 5. Click Edit.
  • 6. Click Other users or groups.
  • 7. Click Advanced in the lower left corner.
  • 8. Click Find Now.
  • 9. Scroll through the results and double-click on your current user account.
  • 10. Click OK to all of the remaining windows except the first Properties window.
  • 11. Select your user account from the list and click Edit.
  • 12. Select your user account from the list again and in the pane beneath, under Allow, check Full control.
  • 13. You'll see a security warning. Click Yes.

Job done. Thanks go to Paul Stamatiou for solving that problem with this post

Download XAMPP

Go here to download XAMPP and get the gist of how to install it.

NB: Go with Method A: Installation with the Installer. Download the installer version: it's the easiest way to install XAMPP.

Save the installer version to your desktop. Close all other running programs and start it up.

NB: Install XAMPP to C:\xampp rather than to Program Files - this saves trouble with file permissions.

XAMPP Control Panel

Press the top two buttons.
Press the top two buttons.

Press The Buttons.

When you've got it going, press both the buttons marked with arrows in the photograph - Apache and MySQL - to start xampp working.

They'll change to say Running | Stop

Enter the address http://localhost/xampp/splash.php in a tab in your browser.

XAMPP screen

Choose your language
Choose your language

Navigate to phpMyAdmin

Once you have Apache and MySQL running, type http://localhost in your browser and navigate to phpMyAdmin.

Go Here For phpMyAdmin

Go here
Go here


Enter WordPress and select utf8_unicode_ci
Enter WordPress and select utf8_unicode_ci

Create New Database. Then set the controls for the heart of the sun.

Where it says Create New Database, type wordpress and select utf8_unicode_ci, then press Create. You're done.

Download WordPress

Download the latest edition of WordPress to your desktop.

Unzip it, then find this file: wp-config-sample.php.

Open it up with Notepad. You need to fill in these details in the file:

define('DB_NAME', 'wordpress'); // The database name

define('DB_USER', 'root'); // Your MySQL username

define('DB_PASSWORD', ''); // - and password

define('DB_HOST', 'localhost'); // Leave this alone.

Note well: Keep a written note of these details. You'll need them in a couple of minutes.

NB: Rather than signing in as root, with no password, go to http://localhost > phpMyAdmin > Privileges > Add New User to add a user name and password with access to your wordpress database. Put the same user name and password into the wp-config-sample.php file and save it as wp-config.php

That done, copy the whole wordpress folder to:

My Computer > Main drive > Xampp > htdocs

And in your browser go to: http://localhost/wordpress/wp-admin/install.php -

Where you should find a WordPress install page. Fill in the user name and password you put in your wp-config.php file and sign in. (You did do what I suggested and made a written note of these, didn't you?) If all goes well, you should have a working WordPress install on your computer.

WordPress Login

Pick a good strong password. It's as well to get into the habit.
Pick a good strong password. It's as well to get into the habit.

And Now You've Installed WordPress Locally On Your Computer

Sounds like a pain? It can be, but I managed it in an hour or so one afternoon, after losing a previous local WordPress install in my Windows spring clean. (And if I can do it, I suspect it's pretty easy.)

Remember, if anything goes wrong, someone, sometime, somewhere on the internet has faced the same problem and dealt with it. Just Google 'install XAMPP' or 'install WordPress locally' and start from there - AFTER you make sure you haven't made a simple error.

What can you do with your local WordPress install?

- Try out different themes and plugins on a local copy of your website without breaking your real site online.

- Build your own themes and test them. Try different site layouts and stylings - change fonts and colours and images and use the best of what you learn on your online website.

A local WordPress install with XAMPP is well worth doing if it saves you some unwelcome surprises and design disasters.

Install WordPress Locally With XAMPP


Submit a Comment

No comments yet.


This website uses cookies

As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

Show Details
HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
LoginThis is necessary to sign in to the HubPages Service.
Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
AkismetThis is used to detect comment spam. (Privacy Policy)
HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
MavenThis supports the Maven widget and search functionality. (Privacy Policy)
Google AdSenseThis is an ad network. (Privacy Policy)
Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
Index ExchangeThis is an ad network. (Privacy Policy)
SovrnThis is an ad network. (Privacy Policy)
Facebook AdsThis is an ad network. (Privacy Policy)
Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
AppNexusThis is an ad network. (Privacy Policy)
OpenxThis is an ad network. (Privacy Policy)
Rubicon ProjectThis is an ad network. (Privacy Policy)
TripleLiftThis is an ad network. (Privacy Policy)
Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)