How do I update my WordPress Database settings?

Much like changing your WordPress Site URL, WordPress database settings can be configured in the wp-config.php file. Simply edit the following lines in the wp-config.php to update your database host, name, username, and password:

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘myDBname’);

/** MySQL database username */
define(‘DB_USER’, ‘myDBuser’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘myDBpassword’);

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

How can I change my WordPress Site URL?

WordPress sites can be “broken” by having an incorrect “Site URL” specified in your WordPress settings. Symptoms may include unexpected redirects, or for the site content to only load partially. It may also create problems logging in to the WordPress administration portion of your site to change the Site URL. Fortunately, there is an easy way to override the Site URL, by simply adding a couple of lines to a WordPress configuration file. Add the following two lines to wp-config.php file, making sure to replace the example URL with the URL of your website:

define(‘WP_HOME’,'http://example.com’);
define(‘WP_SITEURL’,'http://example.com’);