Though the task of moving from one domain to other might appear rather daunting, but is really easily managed. Even beginners can manage their way through a few simple steps and hence can undergo a quick and hassle free transition from one domain to the other.
It might not be the wisest of decisions to be taking from an SEO point of view, but in a situation where you can’t help without shifting domains, follow these steps.
A simple domain shift does not require any changing in the PHP files and the WordPress database connection. One needs to focus on the database tables and the URL related values.
Assuming that the shift is from olddomain.com to newdomain.com, you would need to find all table values that contain “olddomain.com” and replace them with “newdomain.com”. Begin by copying all PHP program files to the new directory associated with the new domain.
Use phpMyAdmin or MySQL command to connect to WordPress database. We continue explaining using the phpMyAdmin example.
In the database level, take the following route: Search > Select All > Search for “olddomain.com” > Go. Mostly, you’ll just need to modify a couple of tables, those being wp_post and wp_options.
The Browse option allows you to look for occurrences of “olddomain.com” in records and update them to “newdomain.com.” Hit the Go option to affect the update. As far as wp_posts is concerned, you can keep the guid field untouched.
Alternatively, you could update it as regards the new domain, but there aren’t any severe implications associated with failure to do so. Updating any occurrences of the old domain name in the posts’ content is much harder. However, you can do so by using the SQL query:
UPDATE wp_posts SET post_content = REPLACE(post_content, \’olddomain.com\’, \’newdomain.com\’)
Now, you can open up a new browser window and key in the new address of your WordPress website. See if it opens up correctly.