Whether you are new to WordPress or you’ve been using it for many years like me then you know that when you install WordPress you’ve always got to work with the wp-config file. Just like it sounds the wp-config file is a PHP file that tells WordPress where and how to configure WordPress with your mySQL database.
Now this can be daunting for many people considering creating a WordPress website that they host on their own servers under their own domain name (The other less invasive way is to go to www.Wordpress.com and create a wordpress website this way but you won’t have control over the domain name or hosting because WordPress.com hosts it all!) considering that you need to know what and how to code this PHP file in PHP and deploy it to your website. Now, for those of you who are brave enough to learn a little PHP please keep reading.
When you get down to editing the wp-config file you will need to be able to provide information about the mySQL database including the database name, the user name, the database password and mySQL hostname also known as the “localhost” by some web hosting companies. The next thing you will need to edit the “wp-config-sample.php” you’ll need to save it as “wp-config.php” for it to work correctly. Below are some of the fields you will encounter in the wp-config.php file…
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
In order to locate the values for these fields you’ll need to access your web hosting account and either create a mySQL database or access an existing mySQL database in order to get this information. Once you have this information simply add it to your wp-config.php file, save it and upload it to your web hosting account and you’ll be good to complete the installation process of your hosted WordPress website.