Skip to main content

WordPress is the go-to platform for creating and maintaining a professional website. Its user-friendly interface and comprehensive suite of tools make it easy to create a website that looks great.

WordPress Local Development

In this tutorial, we’re going to set up a WordPress local development installation on your computer (laptop or desktop) to help you develop better WordPress themes and plugins, as well as test WordPress outside a live web environment.

What you’ll need to install WordPress on your local computer

In order to accomplish this tutorial, you’ll need to download a couple of pieces of free software from their source websites:

  1. WordPress
  2. XAMPP –

The first piece of software, of course, is WordPress, which is the software we’re trying to get running on your local computer. The second, XAMPP is a self-contained LAMP (Linux, Apache, MySQL, PHP) server with all the setup already completed and optimized.

Setting up XAMPP on your local computer

WordPress Local Development Setup with XAMPP
Setting up a WordPress Local Development environment with XAMPP is pretty straightforward.

The installer for XAMPP is a simple process, just follow the steps as you would with any regular installer and wait for the installation process to complete.

Once done, your computer will have a fully functional web server installed and running. From this point, you’ll be able to run any LAMP web application on your local laptop.

Why XAMPP? Before I continue, there are alternatives to XAMPP including a Macintosh-specific and Windows-specific version of the software. I’m not sure if the others are any better or worse, but I prefer XAMPP and since it comes in Mac, Windows, and Linux versions it’s the one I’ll recommend.

Configuring your WordPress Local Development Database

XAMPP Settings

The next step is to set up a database for WordPress in XAMPP. To do this, you’ll need to open the XAMPP application and turn on the web servers. After turning on your web servers, you should be able to visit your local website environment at http://localhost/ and see the welcome page for the XAMMP server.

To use WordPress on your XAMMP server you’ll need to set up a database by following these simple steps:

  1. open http://localhost/ in a web browser;
  2. open the phpMyAdmin link to open your database manager;
  3. selected Databases from the navigation tabs;
  4. create a new database with an appropriate name (wordpress for example);
Create a database in phpMyAdmin

Now that you have a database for your WordPress local development environment to populate, it’s time to install the software properly.

Installing a WordPress Local Development Copy

WordPress in the XAMPP htdocs folder

Installing WordPress on your local server is now as simple as it would be on any website server except it’s local.

  1. download WordPress from the official source;
  2. decompress the archive;
  3. move the resulting folder to your local htdocs folder;
  4. set the folder permissions so everybody can read/write;
  5. open your new WordPress website at http://localhost/wordpress/ and enjoy;

Since I’ve done this a number of times over the years, there are a few things that I like to keep in mind to help me make the process smoother.

Set your file permissions

Take the time to set your file permissions on the WordPress folder. It may not seem a big deal but without the ability to write files, WordPress will struggle to create the required wp-config.php, .htaccess files, directories, and plugin files you’ll need later.

Local database settings

WordPress wp-config file for XAMPP

When you’re setting up WordPress, you’ll need to remember your basic credentials:

  • Database Name – wordpress
  • Database User – root
  • Database Password –
  • Database Host – localhost

Remember, there is no password by default for connecting to your local database.

What’s Next?

After you’ve successfully installed your local copy of WordPress, take a few moments to set up your website properly with the right plugins and themes you’ll need to get started. Remember, if you’re using your local development environment to test a website, you can still follow the same internal linking and deep linking rules, they make a huge impact on your Search Engine Optimization.


If you’re still looking for help setting up your own local hosting environment for WordPress, here are some great resources that I can recommend:

Of course, installing WordPress locally created its own set of problems from how to migrate your database between a test environment and the live hosted site, to how to debug WordPress, develop themes, and connect to your server. I’ll do my best to find you some new tutorials to help you solve some of those problems shortly.

For bonus coolness, if you set up your IDE correctly you can make edits to your themes without having to upload anything to a web server. I use this technique regularly while sitting in airport terminals without a strong WiFi connection.

I’d love to be able to sync my live blog directly with my local offline copy every now and then so that I can always have a fresh copy on my MacBook. What would you do?