Category: Programming | Posted date: 2020-03-30 06:38:37 | Posted by: Jesza
At times you may find yourself in a situation where you need to change the database information that your Wordpress installation is connected to.
At times you may find yourself in a situation where you need to change the database information that your Wordpress installation is connected to. The quickest example that I can think of is if you move your website to a new web host and then the database prefix for the name and and user usually must be changed.
The first thing that you simply should do is obtain your database name, user, password, and host (though that usually stays at localhost). Locate and open the wpconfig file (It should be within the root web folder often named /public_html). The wpconfig file is what was created using the settings that you entered once you first installed this WordPress installation. it's a file that the site uses to hold the configuration information for the WordPress application.
Edit the wpconfig file by changing the referenced database information that's the second field within the define brackets. Save your file and reupload. you should notice that the web site is now connecting to the right database.