If you are developing a theme or plugin for WordPress, you should definitely install WordPress on your machine because it will save you time, hassle, bandwidth, and much more. It’s also good for when you are just starting a new blog or a new project because you’ll be able to preview it and fix any mistakes before it goes online. In this post, I’ve only written a tutorial on how to install WordPress locally on Windows. So, I apologize Mac users, I don’t have a tutorial for you. However, installing WordPress locally on a Mac is very similar to what I’ve written below if you use MAMP.

Installing WordPress Locally on Windows

Installing XAMPP Lite:

  1. Download and install XAMPP Lite (I downloaded the EXE (7-zip) version and extracted it to the root of my C drive);
  2. Go to the xampplite folder and open setup_xampp.bat (Press any key to continue when it tells you to);
  3. Open xampp-control.exe and start Apache and MySql (It’s inside the xampplite folder as well and all you need to do to start these services is press the corresponding ‘Start’ buttons);


Creating a New Database:

  1. Open up a Web browser and go to http://localhost/xampp/splash.php (Apache and MySql need to be running. By the way, I used Mozilla Firefox);
  2. Click on the language that you want (I assume that English is good since you are reading this);
  3. On the left side, under Tools, click on phpMyAdmin (A new page will open);
  4. Find where it says Create new database and type in a name for your database in the box (I typed in wordpress);
  5. Select utf8_unicode_ci from the drop down menu (It should be the last one);
  6. Click on the ‘Create’ button (You’ve just created a database);

Installing WordPress:

  1. Download and extract WordPress to a temporary folder (I extracted it to my desktop);
  2. In the extracted folder, rename wp-config-sample.php to wp-config.php;
  3. Open wp-config.php in a text editor (I used notepad);
  4. Change
    define('DB_NAME', 'putyourdbnamehere'); // The name of the database
    define('DB_USER', 'usernamehere'); // Your MySQL username
    define('DB_PASSWORD', 'yourpasswordhere'); // ...and password

    to
    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'root'); // Your MySQL username
    define('DB_PASSWORD', ''); // ...and password

    and save
    (If you typed in another name in step 4 of ‘Creating a New Database’, type in that name instead of wordpress)
  5. Go to the xampplite folder and open the htdocs folder;
  6. Cut and paste the WordPress folder to the htdocs folder;
  7. Open up a Web browser and go to http://localhost/wordpress/wp-admin/install.php;
  8. WordPress should now be installed. You’ve just installed WordPress locally! (Woot!)

13 Responses to “Installing WordPress Locally”

  1. i’ll recomend this to my friend.she have her own webhost on wordpress a couple of days ago.she’s still confused on putting her plugins and customizing her theme.

  2. I’m definitely going to do this as not only would it be handy when tweaking my template here and there, I’d also love to start designing templates.

    Not entirely sure on where to start but will have a look around and see what I can find.

    Thanks for this!

  3. I can get MySql running no probs but when it comes to trying to get Apache running it doesn’t want to play. Any idea what’s rong or more importantly what I’m doing wrong?

    Thanks

  4. @David - This could happen if you already have a web server running on the same system.

  5. As far as I am aware, there isn’t a webserver on my statem already, I’ll have a go at installing it on one of my other computers, see how that goes :)

    Thanks,

    David

  6. So I’ve gotten it installed, Apache and MySQL running fine, but when I type in the “http://localhost/xampp/splash.php” address, I get a file not found error. When I go through all of the xampp folders I can’t find the file, either. Have any idea what I might have done wrong?

  7. @Belinda - The file splash.php should be in C:\xampplite\htdocs\xampp if you have installed xampplite correctly.

  8. This is odd. So I found the splash page where you said (thank you!!), but even with Apache and MySQL running, the php isn’t parsing correctly. That is, I’m seeing the php code rather than any discernible content. Do you have an idea on why this is happening?

  9. I decided to re-install my Apache and that seemed to fix everything. I don’t know what went wrong, but thank you for taking the time to respond to my comments!

  10. @Belinda - You’re welcome. I’m glad that everything worked out in the end.

  11. thanks for that instruction..

    some sites did’nt givethat much…

    THANKS SO MUCH!!

    also try this site about running

  12. Can I host ads on the site even with a local host?

  13. @Ruth: I’m not quite sure what you are asking.

Leave a Reply