We sometimes need to test things out with wordpress like plugins and themes before applying them on the live sites. The best way to do that is by installing wordpress on your harddrive for testing purposes. Since PHP is a server side scripting language and needs to be translated, you will have to make your computer a host. Follow the following tutorial to do that

Download and Install WAMP / XAMPP / MAMP / LAMP.

Where WAMP stands for Windows Apache MySQL and PHP
MAMP stands for Macintosh Apache MySQL and PHP
LAMP stands for Linux Apache MySQL and PHP
and XAMPP will work on whatever operating system you are using.

Choose the package which is suitable for you with respect to your operating system. Install it and you are done with setting up a localhost.

if you installed WAMP the installation directory would be C:\WAMP\ and in case of XAMPP your installation directory would be C:\XAMPP\

You can now simply type http://localhost/ in your browser and it will show you the index.php or index.htm from C:\WAMP\WWW\ or C:\XAMPP\Htdocs\ if you are using WAMP or XAMPP respectively.

Copy the wordpress package files to C:\WAMP\WWW\wordpress\ or C:\XAMPP\Htdocs\wordpress\

You now need to setup a database. To do that simply type http://localhost/ in your browser and open PHPmyadmin from the page. Type the name of the new database, let’s call it ‘wp’ and click create new database.

To configure the wordpress with your localhost andĀ databaseĀ open the wp-config-sample.php file from your wordpress folder in any text editor and use these settings:

host: ‘localhost’
user: ‘root’
pass: ”
database: ‘wp’

Save the file as wp-config.php and point your browser to http://localhost/wordpress/ The installation of wordpress on localhost will begin. Just provide your blog’s title and email address and everything is setup.

You can now use wordpress on your own computer.