Skip links

How to View/Change Which Database Your WordPress Website Is Referencing

Follow these steps to view/change which database your WordPress website is referencing:

 

Before you make any changes, you will need to ensure that your user is assigned to the database. To do this, please click here.

 

1. Log in to your cPanel account.

How to View/Change Which Database Your WordPress Website Is Referencing

 

2. Under the Files section, click File Manager.

How to View/Change Which Database Your WordPress Website Is Referencing

 

3. Click on the folder where your website files are stored. (Most commonly public_html)

How to View/Change Which Database Your WordPress Website Is Referencing

 

4. Right click the folder called ‘wp_config.php’ then click Edit. A pop-up box will appear advising you to back up the file before making any changes. Click the Edit button.

How to View/Change Which Database Your WordPress Website Is Referencing

 

5. You will see the following code:

How to View/Change Which Database Your WordPress Website Is Referencing

Any code that begins with /** and ends with */ means it is a comment. So when the file is being read, those comments are ignored, they are there for informative purposes only.

Here, you are specifying the database name with ‘DB_NAME’ and 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.

How to View/Change Which Database Your WordPress Website Is Referencing

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

How to View/Change Which Database Your WordPress Website Is Referencing

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

How to View/Change Which Database Your WordPress Website Is Referencing

 

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

How to View/Change Which Database Your WordPress Website Is Referencing