Hi guys I want to move my old blog to a new domain on the same hosting service. The reason is that my old domain name is not very good. So I want to move or 301 redirect my old blog to a new domain with all the blog post. Can you please share me the exact process to doing this? Also please inform me that will the new blog get all the SEO stats of my old blog within 2-3 months? Thanks in advance.
Process to change domain: Go to your WP dashboard > Settings > General : Update WordPress address (URL) and Site address (URL) with new domain. Don't give a trailing slash. Then go to PHPMyAdmin from your cPanel/Hosting control Panel > Click on your database > Click on SQL tab > write following command one by one: UPDATE wp_posts SET guid = replace(guid, 'hxxp://www.old-domain.com','hxxp://www.new-domain.com'); PHP: change your domains accordingly and make hxxp to http After running this, run following one: UPDATE wp_posts SET post_content = replace(post_content, 'hxxp://www.old-domain.com', 'hxxp://www.new-domain.com'); PHP: And you are done
Hey buddy thanks for this help. Well this procedure is for completely for moving my old blog to new blog? And what will happen when someone click on my old blog post? and will all the SEO things will transfer to my new domain?
Put following lines in your .htaccess file of the old domain: Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] PHP: It will then redirect all your old blog post links to new domain
Hi I have done, every this is going fine, I also done 301 redirection, but when I click on old domain homepage, it still not redirect to my new domain.
Friend I have 301 redirect on my .htaccess file by using your said code, now homepage is redirecting, but not the post and pages. Please inform me what I will have to do. Thanks
Ok try this one. Remove old .htaccess content in the root folder of the old domain, and replce it with following codes: RewriteEngine On RewriteCond %{HTTP_HOST} ^.*old-domain\.com$ [NC] RewriteRule ^(.*)$ http://new-domain.com/$1 [R=301,L] PHP: First try this one, if it does not work as well, then try the below one (remove previous code): RewriteEngine On RewriteCond %{HTTP_HOST} ^old-domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.old-domain.com$ RewriteRule (.*)$ http://www.new-domain.com/$1 [R=301,L] PHP: But the code I have given you previously, should have working perfectly. Did you put that code properly at your old-domain's root folder?
Hey brother, now it is working fine, actaully there was a problem in my .htaccess file, there are already some code on that file and I wrongly placed the 301 code, after placing the code on the right place now it is working fine, all the post also redirect to the new post, well if you have experienced within how many period I will get all the SEO stats on my blog