We have already discussed about changing your website domain name or URL by editing functions.php file and by editing wp-config.php file. Now this tutorial explains you how you can update your website web address to new one (when you are migrating your website to a new domain) directly by updating your WordPress site’s MySQL database.
First of all open your web hosting account and then access your website database by logging-in to phpMyAdmin. Now follow the given steps:
- From the screen showing all your database tables look up for wp_options. Note: The table prefix of wp_ may be different in-case you have changed it when installing.
- Click the small Browse icon.
- A screen will open showing a list of the fields within the wp_options table.
- Under the field option_name, scroll down looking for siteurl.
- Click Edit Field icon (usually present at the far left at the beginning of the row)
- The Edit Field screen will appear.
- In the input box for option_value, change the URL information to the new address.
- Verify and click Go for saving information.
- You should be returned to your wp_options table.
- Look for home field in the table
- Click Edit Field. Note There are several pages of tables inside wp_options. Look for the> symbol to page through them.
- From the input box for option_value, change URL information to the new address.
- Verify and click Go for saving information.
That’s all. Your website domain name is now updated to new one. If you face any problem then feel free to write it up in the following comments.