All About wp-config.php
Posted by ASO Admin on 30 January 2020 01:08 PM
|
|
The wp-config.php is a fundamental part of your WordPress installation. It specifies, most importantly, information about how to connect to your WordPress database, which is where most of your content is stored. Without this file, your WordPress installation is a sad, empty shell. // ** MySQL settings - You can get this info from your web host ** // /** MySQL database username */ /** MySQL database password */ /** MySQL hostname */
The above section is where WordPress specifies the MySQL database, the MySQL username and the MySQL user password (which is different than your cPanel username and your wp-admin username). When someone clicks to one of your WordPress articles WordPress pulls the images from your media folder, which is usually in your wp-content folder. But it pulls all the text and metadata for your article from the database, using the info specified here in the wp-config.php file. On a cPanel system, you can create the database, user, and password without having to ever log in to the command line. Check out our instructions for this quick and easy process: https://help.asmallorange.com/index.php?/Knowledgebase/Article/View/102/10/cpanel-and-mysql-access-hosts. If you use Softaculous, then you specify the name of the MySQL database when you install, but it actually creates the database for you and assigns a user and password to it automatically! Done and done. Tip! You can also use the wp-config.php file to correct a half-changed site URL! If you want to use a new domain name for your site, and make the change in WHM/cPanel before you make the change in the wp-admin area, your site may not work anymore. And you won't even be able to log in to the admin area to fix it, because that area relies on the domain name too. Whoops. If you have access to the wp-config.php file, however, you can simply add these following lines at the bottom, using your new domain name, and the site will work again. define('WP_HOME','http://www. | |
|