How to setup wordpress on localhost?

First you need to install Apache web server to run PHP and MySQL. XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start.

Steps to install XAMPP

  1. Download from http://www.apachefriends.org/en/xampp-windows.html
  2. Extract the file and double click the exe. This will install Mysql and Apache servers.
  3. Once the installation is complete, you will find XAMPP under Start / Programs / XAMPP. You can use the XAMPP Control Panel to start/stop all servers. Start Mysql and Apache servers. Make sure it is running.

    XAMPP contol panel
    XAMPP contol panel
  4. Now open any browser(IE or Mozilla) and enter the address as http://localhost/
  5. Select your Language
  6. XAMPP will also create a folder in C drive.

Steps to install WordPress

  1. Download the latest wordpress codes from wordpress.org
  2. Extract and copy folder “wordpress” to C:/XAMPP/htdocs/
  3. Open any browser(IE or Mozilla) and enter the address as http://localhost/
  4. Now click phpMyAdmin
  5. Create a new database for your wordpress website. Under MySQL provide the new database name for example “wpdatabase” and select “utf8_unicode_ci”, click create.
  6. Rename the file C:/XAMPP/htdocs/wordpress/wp-config-sample.php to wp-config.php and open it in notepad. (You can skip the step 6 and 7. You can enter the database details in step 8)
  7. Fill the details as below
    define(‘DB_NAME’, ‘wpdatabase’); // The name of the database
    define(‘DB_USER’, ‘root’); // Your MySQL username
    define(‘DB_PASSWORD’, ”); // password
    define(‘DB_HOST’, ‘localhost’);
  8. Now open http://localhost/wordpress, provide the details as asked and click next.
    Wordpress installation - Provide the database details
    Wordpress installation - Provide the database details

    Wordpress installation - provide the site details
    Wordpress installation - provide the site details
  9. Login using specified password and admin as username.
  10. View your first local wordpress website by browsing http://localhost/wordpress
  11. To access control panel url is http://localhost/wordpress/wp-admin

Let me know if you get any error while installing.


One Response to “How to setup wordpress on localhost?”

  1. Ashok Saini

    Thanks dear……it’s was very east to install wordpress after reading this…..

    great work….

    Thanks again…

    Reply

Leave a Reply