Mobile app version of vmapp.org
Login or Join
Debbie626

: Moving a WordPress installation from a subdomain to its own domain without losing PageRank I'd like to move a WP installation from a subdomain to its own without losing the PageRank achieved

@Debbie626

Posted in: #Google #Migration #Pagerank #Subdomain #Wordpress

I'd like to move a WP installation from a subdomain to its own without losing the PageRank achieved by that subdomain.

What are the best steps in order to do this properly? Especially how do I set the redirects properly?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Debbie626

1 Comments

Sorted by latest first Latest Oldest Best

 

@Harper822

Follow these instructions on moving WordPress, but use the root domain for references to your old subdomain instead of the /blog/ directory (I've made this change for you in the steps below):


Create a robots.txt file in the root directory of the new domain with the following contents:

User-agent: *
Disallow: /

Copy the database and files to the new domain.
Edit wp-config.php to have the new database settings, and add the following lines, replacing example.com with the new domain:

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

Now set up your blog install with the same settings as on the old domain. (If you have a caching plugin installed, delete your cache files.)
Install the Search and Replace plugin, and do a search and replace for your old URL to change it to your new URL.
Once you're done moving WordPress and you've checked everything works twice, remove the robots.txt file.
On your old blog, add the following line to the top of your Apache .htaccess or vhost-config:

Redirect 301 / www.newdomain.com/
Remove the old blog code and database.
Change your FeedBurner account, if you have one, to pick up the correct feed.


To keep your PageRank, the crucial step is step 7, which redirects requests for your old blog pages to the new site.

Also see Moving WordPress and Changing The Site URL.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme