This is Part 1 of a 2 part tutorial.
Back in December of 2008 I showed you how to install WampServer and WordPress on your PC in a tut called Installing WordPress Locally. I thought it was time to revisit the topic but this time I’ll show you how to do it using XAMPP.
Having WordPress running in a local environment is a good idea for several reasons,
- Maintaining a clone of your live blog.
- Testing new functionality such as themes or plugins without affecting your live blog.
- General experimentation.
I currently have over a dozen instances of WordPress on my computer including two SVN flavours.
As I said in the original article WordPress is not an executable. It is a software package written in PHP meaning it needs a few things to operate. The minimum requirements for WordPress 3.0.4 are:
- PHP version 4.3 or greater
- MySQL version 4.1.2 or greater
- a server that supports PHP and MySQL preferably Apache
XAMPP will install these things for you. Now that we’re ready let’s begin. Head over to the Apache Friends website and download the XAMPP for Windows package. At the time of this writing it is version 1.7.3. For the purposes of this tutorial we will be using the EXE version that weighs in at 51 MB. You’ll find it under Basic Package.
After you have downloaded the EXE to your hard drive, double click the XAMPP icon to begin the installation. After double clicking the XAMPP icon you will see the screen below,
It’s pretty self-explanatory. It’s asking you what directory you want to install XAMPP in. Go with the default which is C:\ When ready click on Install. The procedure will take several minutes depending on your system so be patient.
Once the various files have been unpacked and set up you will be presented with a series of dialogue boxes.
The first one you will see is the image below,
In the above screen it is asking if you want to add shortcuts to your desktop and start menu. I chose yes. Make your selection and hit Enter.
Next up is the screen below,
In the above screen it is asking you if it should locate the XAMPP paths correctly. Choose the default which is Yes. Hit Enter.
After that you will see the following screen,
In the above screen it is asking if it should make a portable XAMPP without drive letters. Pay special attention to the Note on that screen. If you plan on using services you must choose No, which is the default. I chose No because I want the services and don’t plan on using USB sticks. When done hit Enter.
Now you will be shown the next screen below,
When it has finished relocating the various paths hit Enter.
After that you will be presented with the screen below,
In the above screen it is telling you that it set the timezone in
my.ini to America/Chicago and that you should correct it if it is wrong. We’ll worry about that later. Hit Enter.
After hitting Enter you will see the following screen,
In the above window it is telling you that XAMPP is ready to rock and roll. Select option 1 and hit Enter. This will start the XAMPP Control Panel which sits at the bottom right corner of your screen when maximized. From here you can access the various functions. See the image below,
You may see a warning from your firewall – grant permission to both Apache and MySQL. To minimize the Control Panel to the taskbar click the red x in the top right corner.
We now have a functioning server and database installed on our computer.
At this stage you may want to configure a few things such as password protection. Navigate to
http://localhost/xampp/ and select your language. I chose English. You are now at the XAMPP welcome page.
From the XAMPP welcome page click on Security in the menu on the left side of the page. See the image below.
After clicking on Security you will see the screen below advising you of security problems. (click image to enlarge)
Don’t worry, this is easy to fix. Navigate to
http://localhost/security/xamppsecurity.php Once you navigate there you’ll see the screen below,
It is in the screen above that you can set your passwords. Referencing the image above, under the heading MYSQL SECTION: ROOT PASSWORD is the password you’ll need to access phpMyAdmin. Choose a password and enter it. Don’t forget that password because we’ll need it again later when we install WordPress. For the options entitled phpMyAdmin authentication and Set a random password for the phpMyAdmin user pma you can go with the defaults. If you want you can tick the box where it asks if you’d like to store your password in the directory shown. When you’re finished click on Password Changing.
Still looking at the image above, let’s go down to the section entitled XAMPP DIRECTORY PROTECTION. Select a username and password and enter them. Again, if you want to, tick the box where it asks if you’d like to store your password in the directory shown. When you’re finished click on Secure the XAMPP directory.
At this point you will need to restart both Apache and MySQL for the changes to take effect. All you need to do is open the XAMPP Control Panel and click on Stop beside both Apache and MySQL. Wait a few seconds then click Start beside both Apache and MySQL.
Okay, now let’s test it. Navigate to
http://localhost/xampp/ If everything works correctly you should see a dialogue box asking for your login credentials. See the image below.
Enter the username and password you chose earlier. Those will be the values you selected under XAMPP DIRECTORY PROTECTION.
If you entered the correct username and password you should now be back at the XAMPP welcome page.
You can access phpMyAdmin in one of two ways:
- While at the XAMPP welcome page, click on phpMyAdmin in the menu on the left
- Navigate directly to
Either method will take you there. When you arrive at the phpMyAdmin screen it will ask you for your login credentials. See the image below,
The username you will need is root and the password is whatever you chose earlier. It will be the value you entered under the heading MYSQL SECTION: ROOT PASSWORD.
Congratulations! XAMPP is installed and configured along with a fully functioning Apache and MySQL.
In Part 2 of this tutorial we will install WordPress on your computer. Stay tuned for that.
Go to Part 2 of this tutorial.