Moving Subdomain to New Domain Name in WordPress

If you hosted another blog on your subdomain you may want to move it to new domain. In WordPress it is easy to make it done. Use these steps to make your life easier. Let’s imagine that your new domain name is

1. Put robots.txt in your new domain for example public_html/ Fill the robots.txt with this:

User-agent: *
Disallow: /

2. Copy or move your database and WordPress files to your new domain.

3. In your wp-config.php for example public_html/, put these lines:

define('WP_SITEURL', '');
define('WP_HOME', '');

4. Download Velvet Blues Update Urls plugin. Activate and set it up in your WordPress admin. You’ll really need this plugin to change interlinking posts URL, images URL, and attachment URL. For example, if you have an image in your particular post that grab the image from, it must be changed unless it will become a broken link and the image won’t show. The Velvet Blues will do this job for you to change it to

5. Recheck your work: Check posts that have interlinking to another post. Make sure that the link points to your new domain. Check if it’s alive. Check from different IP and browsers. If you have no hesitation on it then remove robots.txt that you have created it before.

6. Redirect your blog on your subdomain by adding these lines in your .htaccess.

Redirect 301 /

Don’t for get to check your blog at old subdomain. Access its homepage and several particular posts. Make sure it’s properly makes redirection.

7. If you care about being indexed by Google you should add your site in Google Webmaster.

8. Wait and see it will take 3-7 days to get your new domain gets fully indexed by Google. Be calm, your traffic will be healed soon.