WordPress is undoubtedly the most preferred blogging platform in the world due to the fact that it can be easily installed, easily customized and easily used. With a plethora of add-ons, plugins, hacks and themes available all over the Internet, it is almost irresistible to use. In almost all the cases you need to install WordPress on your remote server under your domain name. But sometimes you have to install it on your local machine so that you can customize it to your heart’s content without beginning to use it in real time. Even if you don’t want to host your WordPress blog on the remote server, you can install it on your local PC for the following reason:
- Design themes for your customers and yourself
- Work on the plug-ins and add-ons
- Use it as your private journal (in which you can organize your thoughts topic-wise or date-wise)
- Use it to organize your thoughts or chapters while working on your novel, book, term paper or research article
- Use it as a content management tool
Of course you can think of many more users.
Easy as it is to install WordPress, the prerequisite are not as easy to install and configure. First of all you need a local server running, preferably Apache. After successfully setting up and running Apache you have to set up PHP and MySQL [Read how to install Apache, PHP and MySQL in Ubuntu].
This can be difficult or easy, depending on your comfort level with such things. You can use packages like XAMPP (Windows version) but still for the uninitiated this can be an uphill task and you may end up spoiling something.
After making sure that your local server is running properly you can download the current installation files from the WordPress website and unzip them in a newly-created folder under www or htdocs. You’ll also need to create a MySQL database to be used with your local WordPress installation. You can create the database using phpmyadmin or the MySQL server prompt. In your wp-config.php file you’ll need to make the following entries:
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
In more than 99.99% cases DB_HOST is going to be “localhost”.
After this you simply have to run the WordPress installation just the way you run it on your remote server using the path: http://localhost/localblog/wp-admin/install.php
Alternatively, as Amit explains on his blog, you can use Microsoft’s Web Platform Installer to install WordPress on your local computer in just 5 minutes.