Install WordPress on Windows Computer with XAMPP

WordPress or PHP developers seems to prefer to install WordPress site locally on their Windows or Mac machines, test locally before publishing a website alive. There are many free tools that can help WordPress user to build a test environment on local computer. We have reviewed some of these local PHP and MySQL server tools in earlier articles, such as: install WordPress on Windows PC in 60 seconds, how to set up WordPress sites on Mac with MAMP, etc. In this guide, we will introduce another popular great free tool which can help you build WordPress sites locally on Windows PC, XAMPP for Windows, the most popular PHP development environment for WordPress and more CMS. If you are on Mac, the steps to install XAMPP for Mac and install WordPress on Mac is almost the say, but differ in appearance.
install wordpress on windows pc

Install WordPress on Windows PC with XAMPP

To install WordPress locally on Windows computer with XAMPP, you need to:

  • Download and install XAMPP on your Windows computer;
  • Create MySQL database for WordPress in XAMPP;
  • Install WordPress on your local PC.

We will break down into details of each step with screenshots and references. If you want to create a local WordPress site for testing, or just want to learn WordPress, play with WordPress without a web hosting account, check out the easy steps below.

Install XAMPP for Windows

XAMPP is the most popular PHP development environment. This local Apache and MySQL server tool contains MySQL, PHP, and Perl. It is completely free to download and use. You can download it below.
download xampp for windows

XAMPP comes with different version for Windows, Mac and Linux. Go to download the Windows version XAMPP 1.8.2 (with PHP 5.4) if you are on Windows 2003, 2008, 2012, XP, Vista, 7, 8; another version XAMPP 1.8.3 (with PHP 5.5) is compatible with 2008, 2012, Vista, 7, 8, Windows XP or 2003 not supported. The latest WordPress 3.9.1 requires PHP version 5.2.4 or greater. So both XAMPP for Windows 1.8.2 and XAMPP for Windows V 1.8.3 will work with the latest WordPress.

Run the XAMPP setup wizard, it will guide you through the easy steps to set up XAMPP on your Windows computer.

install xampp for windows
The installation of XAMPP for Windows is very straightforward, just like you install any other Windows applications. Just need to make sure select MySQL server and phpMyAdmin in the XAMPP components selecting screen, see below screenshot.
select components for WordPress in xampp

Apache and PHP are greyed out, they are the essential to run XAMPP local Apache server on your PC, so you can’t disable them. Other options are optional. Since we are going to install WordPress on Windows PC, a WordPress site requires MySQL database so we have to enable MySQL. The phpMyAdmin is the tool to manage MySQL databases, so it has to be activated as well.

XAMPP will be installed to a folder on your hard disk with the WordPress site and other sites and site files included. And you will have the option to select an existing folder or create a new folder to save all XAMPP files.

xampp installation directory

Create Database for WordPress

Start up XAMPP, you will get open the XAMPP control panel as below. Click to start both Apache and MySQL. We are now going to create the MySQL database for the local WordPress installation on Windows.xampp for Windows control panelFrom above admin panel, click Admin button for MySQL, the phpMyAdmin open in a tab of your default web browser. Click Databases, choose and input the database name and click Create button, the MySQL database will be created. See below screenshot.

create wordpress database in xampp

Instead of using the default database user, you can also manually create a new user and add to database in phpMyAdmin. See this guide to create database and add user to database in phpMyAdmin. When you run into the database connection not established trouble, this could be the fix.

Install WordPress on Windows with XAMPP

From now on, the installation of local WordPress on Windows computers is quite similar to the installing of WordPress on Mac or hosting servers with any web hosts.
1. You need to download WordPress installer from to the ‘htdocs’ sub-folder under your XAMPP folder.
2. Unzip the WordPress installer, a Zip or .tar.gz file, using WinRAR, WinZIP or other tools available.
3. Create WordPress database connection.
Create WordPress database connection by editing the configuration file. Find the wp-config-sample.php file and rename it to wp-config.php.
create wordpress database connection
Open this file with a text editor such as Notepad, then replace “database_name_here” with the database name which we have just created using phyMyAdmin, replace “username_here” with “root” and leave “password_here” blank.
4. Install WordPress from Browser.
Open this URL http://localhost/ in your browser, you will be able to finish the local WordPress installation on Windows in just a few seconds. Basically you need to choose a site title, administrator username and password, your email address. Click Install WordPress button, your local WordPress site will be created.
install wordpress from web browser

What is XAMPP?

XAMPP is an easy to install Apache distribution containing MySQL, PHP, and Perl. You can set up a local Apache server and MySQL database server with this free tool on Windows, Mac and Linux computers. It is a great tool for web designers and developers to test websites on computers locally before uploading to production WordPress hosting server.

If you want to upload local WordPress site to a good WordPress hosting, check out this URL: Best WordPress Hosting 2014.


  1. Its very good step by step tutorial to setup XAMPP on Windows PC and then Installing wordpress, i really like it but i see the whole concept that why to risk ur PC for this, simply get some cheap VPS plan and install wordpress there.


    Marketing Manager

Leave a Reply