Beginner Developer Series: Setting Up a Local Environment via XAMPP (Apache, PHP, mySQL)

When developing, it is always good to have a local site. Many skip this and use only a staging site and the production site. However, having a local environment will make life easy with testing scripts quickly and easily. Change a file, save, and run. However, using a staging site, you have to FTP up and down, and with WordPress and Windows, this sometimes can get you into trouble if not done correctly.

So, we need to install Apache (the server software), PHP (the language that WordPress runs on), and MySQL (the database). To do this on an Apple machine, use the Make WordPress Tutorial for MAMP or see the older tutorial in the Codex: Installing MAMP. For Windows machines, there is XAMPP, which stands for Apache + MySQL + PHP + Perl.

Quick Summary

Here are the simplified steps on how to install WordPress on your local computer that we will walk through this week:

  1. Install a local server ( XAMPP).
  2. Configure PHP
  3. Launching Apache & Troubleshooting with Skype
  4. Create a new database via phpMyAdmin.
  5. Setup XAMPP Security
  6. Download WordPress from and install into the htdocs folder (typically C:/xampp/htdocs).
  7. Run the famous 5 minute install and follow the instructions: wp-admin/install.php.
  8. Done!

What can I do for you!?

Custom Development

We develop plugins by determining both business/functional and technical requirements, following WordPress development best practices, and using agile methodology to ensure you get the best solution.


Have questions? Need a reliable developer to consult? Please contact us today!

Customized Theme

We can customize your theme or child theme, or create a child theme for you based on your needs while enhancing the performance of every individual attribute.

Customized Plugin

We can customize your plugins, extend plugins (e.g., Gravity Forms, Jetpack, Soliloquy) based on your needs ensuring security, performance, and positive business impact.


  1. says

    Hi Travis! Very helpful tutorial. Am curious as to why you’re recommending to change the database prefix from the default wp_. This is the second place I’ve seen that recommendation, but no explanation.

    I plan to do multiple installs, and I’m wondering if it is fine to use any consistent db prefix (such as db_site1, db_site2, db_site3. Although rather than use such generic name/numbers I’d create more descriptive names, to help me identify the databases on the fly –without having to consult an org chart).

    And shouldn’t there be something in the name that identifies them as WP databases? Just in case, later, I had to create straight MySQL databases for some other web use?

    Thank you,


    • says

      Yes, I recommend some complicated combination that only you understand that identifies the database. Many hosts like Hostgator in shared hosting will apply prefixes to your database for you (typically your username_yourdatabasename). Now for db_site1, db_site2, etc. that’s a great idea and if you are using WordPress 3 MS, then something like this is done for you on the table level.

  2. says

    I did find an answer to the above question, having to do with avoiding the malicious intrusion known as SQL injection. I have another question: Do you have to use the same username/password for the MySQL database on the host server as on the local server? (I am assuming this answer is “no,” but thought I’d double check with someone more expert.)

    Thank you!


    • says

      You don’t. You only need to use FileZilla to upload to WordPress that are hosted on servers as an FTP option. To use on your localhost, you can use Windows Explorer or whatever the Mac equivalent is. Now, WordPress is installed as localhost in wp-config.php:
      [php]/** MySQL hostname */
      define(‘DB_HOST’, ‘localhost’);[/php]

      So if it is located on a site like, then you would need to use FileZilla. Download FileZilla. In Hostname, put ur, then insert your username and password and click QuickConnect. Your hosting provider should have some information on how to setup your FTP site.

  3. Sherry says

    Hello I’m just trying to insta wp to my comp(very new to it) not make it public I want to be able to mess up and only I can see it .do I need a host?a domain name? I got a host and a domain name but I’m lost can you help me?

    • wpsmith says

      No you don’t need a host and a domain name to install locally. This post tells you how to do what you are looking to do.

  4. Sherry says

    Hello I got camp installed. Changed pw on php but when I updated after putting pw I go to log in to it it’s not letting me? I’m 3/4 way thru any suggestions?

Leave a Reply