How To Edit The wp-config.php file for WordPress Using cPanel?
July 31st, 2016 | by Ravi Chahar || 4 Comments |
You may have heard about the wp-config.php file many times. But do you know how to edit wp-config.php file? There are basically two ways to complete this task. You can use the FTP account to edit this file or you can use the cPanel of your web hosting account.
Here, I am going to provide the method to edit this file using the cPanel. The choice is yours, if you want to use the FTP account using the Filezilla then I can help you with that too. It is always recommended that before doing any changes in the cPanel, you should have the backup of your website and the database.
The Guide To Edit wp-config.php Without FTP.
First of all, you should know about this file. What is the wp-config.php file? Do you have any idea? It is one the most important files present in the root of the WordPress directory. It contains all the information about the database of your website.
The database name, hostname, username etc. As I have explained in another post about adding multiple websites with one database. It can be done only using the wp-config.php file. You have the change the table prefix for which you should how to edit the wp-config file for WordPress.
There are many other things like the authentication keys are included in this file using which the WordPress checks the user’s originality. You can generate your own authentication key using the WordPress platform.
If you get the database establishing error then it means the credentials filled in this file are wrong. To remove those errors, you have to edit this file.
Edit wp-config.php File using cPanel.
There are few simple steps tp follow:
Step 1:- Login to your cPanel and search for the “files” section. Choose the “file manager” option from all the options shown in there.
Step 2:- Don’t forget to check the checkbox to show the hidden files. After that, click on the “Go” button.
Step 3:- A new tab would open in your browser. You could see many files and folder present in the cPanel. In this root directory of your website, you have to search for the wp-config.php file. After finding the file, just right-click and choose the “CodeEdit” option and the file would open in the new tab.
After opening the file, uou would see the codes like mentioned below. These are the database name, database userame, hostname and all.
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
You won’t get this file with the WordPress. Though the similar file is present name wp-config-sample.php which can be renamed later. But still, you just choose the file to edit and then do whatever you want to do.
Open wp-config.php file for WordPress to see authentication keys.
As I have mentioned above that WordPress checks the authentication keys to validate the user of the database. You will see after scrolling down in the file, there are many authentication keys present.
And the table prefix for the tables of your database is present there. If you want to change the prefix for all the tables present in the database of your website then, you can do it using the wp-config.php file. From the WordPress security purpose, it is recommended to change the table prefix.
Have You Come To know how to Edit wp-config.php Without FTP?
As I have mentioned above that you can edit this file according to your choice. If you don’t want to use the FTP account then the cPanel is there for you. You can edit this file using it. The process of editing is shown above in the tutorial.
Have you ever done anything with this file? If you are thinking about hiring any professional to deal with the database error then give it another thought. It is because you can do it your own. Just follow the guide and check the credentials filled in the wp-config.php file.