How to Edit wp-config.php during Wordpress installation

During the Famous 5 Minute Installation of your WordPress blog, you are required to edit the wp-config.php file present in the wordpress directory. For this you need to have a MySQL database created on your website's server.
  1. In the wordpress directory look for the file wp-config.php or wp-config-sample.php and open it with a text editor like Notepad or Notepad++ or gedit. If wp-config-sample.php is present, rename it to wp-config.php
  2. You need it to edit the following four lines in wp-config.php file:
    define('DB_NAME', 'database_name_here');
    define('DB_USER', 'username_here');
    define('DB_PASSWORD', 'password_here');
    define('DB_HOST', 'localhost');
  3. Before you edit these lines you need to have a MySQL database created on your server. For this go to your hosting account's cPanel and look for the option to create a MySQL database. After you create a database remember the values you entered for the following fields:
    Database name (Example: MyDatabase)
    MySQL username (Example: admin)
    Password for the above user (Example: <passwordYouHaveEntered>)
    MySQL Host name (Example: - This value is already set by your web host.
  4. Now replace database_name_here with database name, username_here with the username, password_here with the password you have set for the user while creating the database and localhost with the hostname of your MySQL database given by your web host. Do NOT remove the quotes