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

How 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.
2. Under the Files section, click File Manager.
3. Click on the folder where your website files are stored. (Most commonly public_html)
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.
5. You will see the following code:
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.
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.
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.
6. If you have made changes, click Save Changes on the top right-hand corner of the page.