WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Mar 03 2014

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 wordpress.org 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!

Written by Travis Smith · Categorized: Tutorials

StudioPress Premium WordPress Themes     WP Engine Managed WordPress Hosting

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.

Consulting

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.

Contact Us

About Travis Smith

As a WordPress enthusiast, developer, and speaker, Travis writes about what he learns in WordPress trying to help other WordPress travelers, beginners and enthusiasts with tutorials, explanations, & demonstrations.

Comments

  1. Paula Parisi says

    March 4, 2011 at 2:34 am

    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,

    Paula

    Reply
    • Travis Smith says

      March 4, 2011 at 10:09 am

      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.

      Reply
  2. Paula Parisi says

    March 4, 2011 at 3:16 am

    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!

    Paula

    Reply
    • Travis Smith says

      March 4, 2011 at 10:09 am

      Yes, it is because of SQL injection, and no, they are not any different as the host on the server is generally configured to localhost anyways.

      Reply
  3. Hell-Preacher says

    March 21, 2011 at 1:30 am

    hey how to use filezilla to load plugins and themes on ur localhost…..

    Reply
    • Travis Smith says

      March 21, 2011 at 2:22 am

      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 domain.com, then you would need to use FileZilla. Download FileZilla. In Hostname, put ur domain.com, then insert your username and password and click QuickConnect. Your hosting provider should have some information on how to setup your FTP site.

      Reply
  4. Sherry says

    April 28, 2011 at 2:57 pm

    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?

    Reply
    • wpsmith says

      April 28, 2011 at 3:15 pm

      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.

      Reply
  5. Sherry says

    April 29, 2011 at 8:39 am

    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?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

Copyright © 2025 � WP Smith on Genesis on Genesis Framework � WordPress � Log in