There was a problem loading the comments.

How to Change the Database Your WordPress Website Is Referencing in cPanel

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
Note: Before making any changes, you must ensure that you have assigned your user to the database. For instructions on how to assign a user to a database, please click here.

 

Follow these steps to change the database your WordPress website is referencing in cPanel:

 

1. Log in to your cPanel account.
For instructions on how to log in to your cPanel account, please click here.

e67bc52bc40656261a64477d109e88c36200cd6ec44572d26e421abce763aa4abd741ae6f2174bef?t=16a6aeb0a7b17c76830f158aac1b2d47

 

2. Under the Files section, click File Manager.

 

3. Navigate to your website files (most commonly in your public_html folder). Click public_html.

 

4. Right-click on the wp-config.php file, then click Edit.

 

5. A pop-up box will appear advising you to back up the file before making any changes. Click the Edit button.

 

6. You will see the following code:

Note: Any code that begins with /** and ends with */ is a comment. These comments will be ignored when the file is read. They are there for informative purposes only.

 

Here, you are specifying the database name with ‘DB_NAME’. The name of the database you are referencing is ‘wordpressexampledatabase01’. If you wish to change the database name, you would update ‘wordpressexampledatabase01’ to the new name for your database.

 

Here, you are specifying the database user with ‘DB_USER’. The name of the user you are referencing is ‘wordpressexampleuser02’. If you wish to change the user, you can update ‘wordpressexampleuser02’ to the new name of your user.

 

Here, you are specifying the database password with ‘DB_PASSWORD’. The password you are referencing is ‘passwordexample03’. If you wish to change the password, you can update ‘passwordexample03’ to the new password for your user.

 

7. If you have made any changes, click the Save Changes button on the top right-hand corner of the page.


Share via
Did you find this article useful?  

Related Articles

Tags

© DreamIT Host