This is Part 2 of a 2 part tutorial.
In Part 1 of this tutorial we showed you how to install XAMPP on your PC. In this tutorial we’ll show you how to get WordPress up and running.
First off, head over to WordPress.org and download the latest ZIP which is 3.0.4 at the time of this writing. After you have saved it somewhere on your hard drive we need to extract the contents of the ZIP. Personally, I prefer to use 7-Zip for this. 7-Zip is free and open source and is released under the GNU LGPL license.
Extract the contents of the ZIP to the
htdocs folder which you will find at
C:\xampp\htdocs All of your web projects will go in that folder. For example, if you want to install another package such as bbPress, Joomla, phpBB etc they all go in the
htdocs folder. Think of it as the
public_html folder on your host’s server. Once you have extracted the ZIP you will now have a folder named wordpress inside the
As a sidenote, you can rename the wordpress folder to anything you want. If you’re like me and intend to run more than one instance of WordPress you’ll have to. I have my folders renamed as wp01, wp02 and so forth. If you want to go with just one instance of WordPress then just leave it as it is.
Now we can begin. In your browser navigate to
http://localhost/phpmyadmin/ and log in. This is where we’ll create the database WordPress needs in order to function. Once you log in you’ll see the screen below,
In the screen above you’ll need to set a few things. Choose a name for your database. It doesn’t matter what it is, for the sake of simplicity I use database names like wp01, wp02 etc to coincide with my various WordPress installs. After you have entered the name of your database you need to set both the charset and collation – go with
utf8_general_ci When you’re finished click on Create. You now have an empty database.
In the wordpress folder look for the
wp-config-sample.php file and open it with a plain text editor like Notepad. The lines we will need to edit are,
define('DB_NAME', 'database_name_here'); define('DB_USER', 'username_here'); define('DB_PASSWORD', 'password_here');
In the first line you will enter the name of the database that you chose earlier. The second line is where you enter the username, it will be root. The third line is where you enter the database password. Using XAMPP the database password is the same password you use to log in to phpMyAdmin. Remember this paragraph from Part 1?
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.
Just for the sake of simplicity let’s say you chose wordpress as the database name and 1234 as the password. The username is the default root. The lines you need to edit should now look like this,
define('DB_NAME', 'wordpress'); define('DB_USER', 'root'); define('DB_PASSWORD', '1234');
That’s all you need to edit here. If you were installing WordPress on a live server than you would have to make further edits. You’d want to enter the various security keys in the following section,
define('AUTH_KEY', 'put your unique phrase here'); define('SECURE_AUTH_KEY', 'put your unique phrase here'); define('LOGGED_IN_KEY', 'put your unique phrase here'); define('NONCE_KEY', 'put your unique phrase here'); define('AUTH_SALT', 'put your unique phrase here'); define('SECURE_AUTH_SALT', 'put your unique phrase here'); define('LOGGED_IN_SALT', 'put your unique phrase here'); define('NONCE_SALT', 'put your unique phrase here');
You might even want to change the database prefix here,
$table_prefix = 'wp_';
Since this is localhost we don’t have to worry about any of that. When you’re finished with that file save it and rename it as
Now browse to
http://localhost/wordpress/wp-admin/install.php and follow the onscreen instructions. Of course this assumes you haven’t renamed the wordpress folder. If you did then you would browse to
http://localhost/YourRenamedFolder/wp-admin/install.php You will now be at the WordPress installation screen. See the image below. (click to enlarge)
In the screen above fill in the various details and click on Install WordPress. If all goes according to plan you will see a Success message with a log in button.
Go to Part 1 of this tutorial.