22 Jan 2013
This tutorial comes with an illustrated method and alternatives on how to install and run WordPress locally on Windows. You will only need two software bundles to complete it, which won’t cost you anything.
Here are WordPress local install Windows requirements:
Let’s get started…
1. Install XAMPP
Installing this powerful software is a snap, just run the installer and follow the instructions without changing anything. XAMPP will install its system files in c:\xampp which is a safe location if you want full control over your local WordPress site.
If you need a little help installing XAMPP, check out How to Install XAMPP on Windows 7 tutorial (which will also apply on other versions of Windows) before going to step #2.
Important: After installation, run XAMPP Control Panel and make sure to start Apache and MySQL services. Apache is the web server environment, while, MySQL is the database server that will handle your data.
2. Test XAMPP
To make sure that XAMPP is working, open your favorite browser and type localhost or http://localhost in your browser’s address bar, then press enter. Your browse will look like this after you select the English language:
3. Create a database
Still in XAMPP main window, click phpMyAdmin under Tools category (lower portion of the left widget). Your next screen should look like this:
Enter a database name (e.g. mylocaldb) inside Create new database text box, then click the Create button. Your screen will now look like this (confirming that a new database has been created):
4. Add a new user to your database
Since, creating wp-config.php doesn’t work for all server setups, WordPress suggests that the safest way is to create it manually. But before we do that, let’s add a new user to the database we’ve just created. This is vital because WordPress will require a database, username, and password during installation.
Still in the same phpMyAdmin window, click the Privileges tab (9th tab from the left). The window should look like this:
Click Add a New User link to add a new user. The window should now look like this:
Supply your login information for the following:
- User name – select Use text field: from the drop down list, then provide your user name to the right.
- Host – select Local (localhost will automatically appear in the right text box).
- Password - select Use text field: from the drop down list, then provide your user password to the right.
Select Grant all privileges on database under Database for user.
For added control, you can Check All Global privileges.
Scroll down, look for the Go button to the right of the screen, then click it.
The next window should look like this (confirming that you’ve added a new user to the database):
5. Prepare your WordPress files
By now you have either WordPress Elvin or a previous version. Just a quick feedback about Elvin here, because although this version is more powerful, secure, and site looks clearer compared to the previous version, by the time this post was written, some great plugins have not yet upgraded to adapt to this new phenomenon.
6. Extract WordPress files
To extract WordPress files, use either use jZip, WinZip, or Winrar. Use the option Extract here to do it, then copy the unpacked WordPress folder to C:\xampp\htdocs - this is XAMPP’s localhost root. Now, rename the WordPress folder to the name of your local site (e.g. mylocalsite).
7. Create wp-config.php
Browse inside your new local WordPress directory (i.e. C:\xampp\htdocs\mylocalsite in this example); look for wp-config-sample.php file; then rename this file to wp-config.php.
Edit the file using Notepad or any text editor, then supply your own database name, username, and password to the following:
- define(‘DB_NAME’, ‘database_name_here’);
- define(‘DB_USER’, ‘username_here’);
- define(‘DB_PASSWORD’, ‘password_here’);
Your work should look similar to the wp-config.php below:
If you find this complicated, click here for an easier method before going to step #8.
8. Install WordPress
Install and activate your local WordPress site by typing http://localhost/[YOUR SITE NAME] (e.g. http://localhost/mylocalsite), then press enter. WordPress responds by displaying this screen:
You’re almost there! Complete the WordPress installation by doing the following:
- Supply any Site Title you want
- For simplicity, leave username as admin
- Supply log in password
- Supply your E-mail
- Uncheck Allow search engines to index this site, since you want to run WordPress locally.
As soon as you are ready, click the Install WordPress button. You should see this screen:
9. Log in to WordPress
Click the Log in button, then supply your username and password (not the user password in phpMyAdmin). I’m sure you’ll be overjoyed when you see the screen below:
Now, your installation is complete and you’re in the WordPress dashboard.
10. Test your local site
Test your site by typing http://localhost/[YOUR SITE NAME] (e.g. http://localhost/mylocalsite) in the address bar of your browser. You should see the screen below (which will tell you that your local site is now active):
So, were you able to follow through and installed your local WordPress site? Feel free to ask for assistance in case you need it.
→ Subscribe to Blog Via Email to receive updates directly to your email.