When designing WordPress themes, it’s nice to be able to store them locally to test them instead of uploading files to a web server. In this tutorial, you’ll learn how to set up WordPress locally on your PC and then manage multiple blogs with their own themes.
The first thing you’ll need to do is make sure you have WAMP installed and running on your PC. If you don’t, follow this tutorial first, and come back here when you’re done.
Next, you’ll need to have the latest version of WordPress.
After WAMP is up and running, drop that latest version of WordPress into the folder that your sites are stored in. This would be the ‘localhost’ folder that your sites are kept in.
Next, we need to create a database for WordPress. Single-click the semicircle WAMP icon on the toolbar. Select ‘phpMyAdmin’ from the menu that pops up.
Now you should see the phpMyAdmin interface in your browser. Under ‘Create a new database’, which is near the middle of the page, type what you want to call your database. If you plan on running multiple blogs, you may want to name it something other than ‘wordpress’. Leave the drop-down box alone, and click ‘Create’.
You can now leave the phpMyAdmin interface.
Next, find the ‘wp-config-sample’ file in the root WordPress folder. Open it up in Notepad (recommended), and change the following values:
define('DB_NAME', 'wordpress'); // new database name
define('DB_USER', 'root'); // MySQL username (root is default)
define('DB_PASSWORD', ''); // no password assigned by default
Save the file as ‘wp-config.php’ in the same folder. You should now be able to open up ‘http://localhost/WordPress root/wp-admin/install.php’ (substitute ‘WordPress root’ for the location of your WordPress folder). Proceed with a normal WordPress installation.
If you want to run multiple blogs with their own themes, all you have to do is repeat this process, and give each database a new name. You can use the same database if you like – some people prefer to have certain sample posts to test things.