Hosting Tutorial & Guide

How to Install WordPress Locally on a PC for Development & Testing

updated on Nov 29, 2016
How to Install WordPress Locally on a PC for Development & Testing Most webmasters get to know how to install WordPress on website and that can be completed with Softaculous, Simplescript, Fantastico, FTP, or some other methods. However, having WordPress installed online with a web host may be a waste of time and money for website testing. So you might as well create a localhost environment by install WordPres locally and use it as a test environment.

The lack of understanding on how to install WordPress locally on a PC may be a big problem for some developers who wish to take far better use of this great open-source software. In the following guide, we would like to brief you on three methods to reach the target.

The selected solutions mentioned here include XAMPP, WAMP and MAMP which are used for WordPress installation in your computer and Mac. Since some readers are not familiar with those methods, we are going to include a brief introduction about XAMPP, WAMP and MAMP in the following guide.

Install WordPress by Using XAMPP

XAMPP is a free cross-platform web server software package consisting of Apache server, MySQL database, PHP and Perl. That is perfectly integrated with Windows, Linux, Solaris, and many other operating systems. It is selected here to help you install WordPress on computer thanks to its high level of usability.

Access to and this is where to download XAMPP. Three versions are available for Windows OS, Linux OS and OS X, among which we select XAMPP for Windows in the following guide. Click to start your download automatically and that should last for tens of minutes in accordance with your network conditions.

Download XAMPP

Launch the installer file that has been downloaded on your computer just now. Since a Question box pops up and asks you whether to continue with installation, click "Yes" and come to XAMPP setup wizard. Go the "Next" step when prompted.

XAMPP Setup Wizard

A number of components are available for you to choose from, in terms of server and program languages. Check the components you want to install and that is up to you. Apache and PHP have been checked by default so that you cannot make any change to this setting. In addition to Apache and PHP, we check MySQL and phpMyAdmin as needed.

Select Component

And then, you are required to select a folder to install XAMPP. Leave the default c:\xampp or create a new one as you want.

Select Install Folder

Bitnami enables a series of installers for web applications and helps you install a large number of popular software, like WordPress, Drupal and Joomla, with ease. Check "Learn more about Bitnami for XAMPP" to make this function into effect. If you wish to install WordPress manually, then uncheck this option and go to the next step.

Bitnami for XAMPP

Since everything gets ready, click to begin installing XAMPP on your computer. That should take a few minutes.

Install XAMPP

Once completing XAMPP setup wizard, check the option "Do you want to start the Control Panel now?" and then click "Finish" button.

Complete XAMPP Setup

Here you come to the XAMPP control panel. Click "Start" buttons following Apache and MySQL, and then get started to set up your MySQL database by clicking "Admin" included in MySQL section.

XAMPP Control Panel

It is automatically turned to phpMyAdmin interface, which shows a series of tabs on the top. Click "Databse" and create a new database. Name it properly before clicking "Create" button.

Create New Database

Go to and download the latest version of WordPress to get a zip file. Target this zip file on your computer and transfer it to the XAMPP > htdocs folder. And then, unzip it and rename it properly for ready reference. Here, we name the WordPress folder as WP.

Search for the wp-config-sample.php file from this newly unzipped folder and replace its name to wp-config.php. Open the wp-config.php file in any editor as needed, which shows you a list of information for your database, in terms of name, user, password and host. Replace the default arguments to your database information and then save this file.

The last step is to visit http://localhost/WP/ and check if there is a WordPress welcome page. If so, you have successfully installed WordPress on your computer. Note that, you should replace "WP" to the WordPress folder name you have confirmed just now.

Install WordPress on Windows Computer with WAMP

WAMP is an acronym for Windows, Apache, MySQL and PHP, that is selected in the following guide for WordPress local installation, which is also called WampServer. Be differ from LAMP (Linux, Apache, MySQL and PHP) running on Linux servers, WAMP is created for Windows servers. And now, this software stack has been trusted by a large number of webmasters to create their site with WordPress for testing purpose.

Download the latest version of WAMP via WampServer site. Click "Start Using WampServer" and access to WAMP download page. There are 2 free versions available for users, including 32 bits and 64 bits. Make a decision according to personal needs and the 32 bits version is selected in this guide.


Run the installer and get started to set up WAMP on your computer by following WampServer setup wizard. Just like the way to set up XAMPP, you are required to complete all settings step by step.

WAMP Setup Wizard

Accept the License Agreement and then select a destination location for WAMP. The default folder to hold WAMP is c:\wamp and that enables you to select a different folder if needed. And then, select an additional icon from two options including "Create a Quick Launch icon" and "Create a Desktop icon". Click "Install" since all settings have been done.

Install WAMP

Here, you are asked to choose a default browser. We select Chrome as the default browser in the following guide. The next step requires you to enter SMTP and Email. Leave it intact or modify it according to personal needs. The final step called "Completing the WampServer 2 Setup Wizard" enables you to confirm all changes you have made before. Check "Launch WampServer 2 now" and click "Finish" button.

Launch WAMP Server

The WAMP is running on your computer now and an icon referring to WAMP is shown on the taskbar. Expand the taskbar and right click WAMP icon to change the current language if needed. And then, left click it and a list of options is available for you, such as the management for Apache, PHP and MySQL and quick admin for all services. You can explore those powerful functions one by one or continue to the next step – create a database for WordPress installation.

For the convenience of phpMyAdmin connection, WAMP enables a link to phpMyAdmin on its information page. Click it and access to phpMyAdmin interface. The Database tab is where to create a database for WordPress installation. The database name can be anything as you want. Since a notice said "Database WordPress-Test has been created", you have completed your new database creation.

Go to and download WordPress with the latest version. And then, unzip the downloaded file and save it under c:\wamp\www. The name of this WordPress folder can be replaced to anything as you need. Here, we name the WordPress folder as WP. Access to http://localhost/your-wordpress-folder-name/ and find out wp-config.php file.

If you receive a notice said "There doesn't seem to be a wp-config.php file" as the following screenshot, then you should click "Create a Configuration File" and create a wp-config.php file.

Create a Configuration File

And then, you are required to fill out your database name, username, database host and table prefix. Leave the Password field blank and click "Submit" button to confirm all information. Since a notice as below comes out, you have had the configuration done. Click "Run the Install" to install WordPress.

Run WordPress Install

The last step is to provide some basic information about your site, such as site title, username, password, and so on. Finally, click "Install WordPress".

Install WordPress on Mac by Using MAMP

The same as XAMPP and WAMP, MAMP is also a solution stack consisting of a bunch of open source software for multiple purposes. Since "M" refers to Mac OS, it is enables you to install WordPress on Mac OS X computer with ease. The web server included in this solution stack is Apache while the database management system is MySQL. Besides, it supports PHP, Perl or Python and all options are available for web development.

Access to MAMP download page and click "Download" under MAMP free version. That will take tens of minutes to have MAMP downloaded.

Install MAMP

And then, a popup asks you whether to try MAMP pro version. You just can leave it and continue to the following steps. Go to "Preferences" and here comes 4 tabs including Start/Stop, Ports, PHP and Apache. Focus on the Ports tab and click the second button "Set Apache & MySQL ports to 80 & 3306". Click "OK" to confirm this setting. And then, move to Apache tab and determine where to install WordPress. That should depend on your own needs.

Set MAMP Ports

Create a database by using phpMyAdmin. Open MAMP again and click to Start Servers. And then, access to http://localhost/phpmyadmin/ and come to phpMyAdmin interface. Click Database tab and name your database upon creating it.

Download WordPress from and then unzip this file to the document root you have specified in the previous step. Rename the wp-config-sample.php file to wp-coonfig.php and modify the information of your database, including name, username and password. Save it and enter http://localhost on your browser.

Since a WordPress welcome page comes to you, you have successfully installed WordPress on your Mac OS X computer.