wordpress change domain

After updating the Domain for WordPress

  1. go to wp-config.php
update:the URL with the latest one
/** MySQL hostname */
define('DB_HOST', 'microscience.com.au');

Same for another website

/** Sets up WordPress local environmental test only for local test */
define( 'WP_SITEURL', 'http://localhost/didi' );
define( 'WP_HOME',    'http://localhost/didi' );
  1. go the the backend of WordPress:/wp-admin/options-general.php

    update the WordPress Address (URL) And Site Address (URL)
    This part might not be necessary

  2. sometimes we need access to database, modify the table :wp_options. In the tale of wp_options, find the two fields:home and siteurl, change the option_value to the same with wp-config.php. For example, for the website of didi, we use http://localhost/didi for both fields.