How to Transfer Full WordPress Website from One Domain to Another


How to Transfer website from one domain to another

This post discuss on the complete procedure of transferring full website from one domain to another, tested with WordPress site.

How to Transfer Website from One Domain to Another without loosing Traffic

For any reason if you have to change your domain from olddomain.com to newdomain.com without loosing any traffic or Google Ranking then you are at right place. I will be discussing the complete procedure from the beginning so it might help you guys to transfer your website easily. Well there are other ways too but i find this way far easy for me for transferring websites while changing domain name.

Step 1 (Old Domain Cpanel)

Login to your FTP via Cpanel: public_html folder > Select all files and Compress to a New archive (say Old.zip) and Download

Transfer Website Step 1
Click to Enlarge..

Step 2 (Old Domain Cpanel)

Login to phpMyAdmin via Cpanel

phpMyadmin

Now select your Database [from left side] and Check all> Export> Go and Download

Inside phpMyadmin Step 2-2
Click to Enlarge..

Step 3 (New Domain Cpanel)

Please make sure you already configured Name Servers and your domain Server is accessible. So Now

  1. Login to Cpanel>FTP>public_html of your New domain.
  2. Upload the ZIP (Old.zip) folder and extract.

Step 4 (New Domain Cpanel)

mysql database

  • Create a New MySQL database
  • MySQL database User (Save it on Notepad we gonna need it: Username and Password)
  • Add User To Database (Give all Privileges in next page)

Step 5 (New Domain FTP)

Go to public_html and edit config.php with the MySQL username, user and password.

mysql database 2

Step 6 (New Domain phpMyAdmin)

  1. Select the MySQL database you just created on the Left sidebar
  2. Click on Import (Right Top)
  3. Browse File and Upload [Note: If the Upload limit provided by your server is less then your SQL file then you have to contact your Webhosting support to increase the limit]
  4. Click Go

Step 7 (New Domain FTP)

  1. Download Search and Replace for WordPress Databases script
  2. Upload it to your public_html and Extract it
  3. Now open newdomain.com/searchreplacedb2.php : Click Submit : Submit DB Details : Continue

Search and Replace final

Now enter your Olddomain.com and Newdomain.com url respectively on the next page. After completion don’t forget to remove the searchreplacedb2.php script.

That’s it ! Now your WordPress website is successfully transferred from your old domain to new domain.

So what about the Traffic and Google indexed pages ? You might be asking about this, isn’t it ? No worries do as stated :-

  • Open .htaccess file available on public_html of olddomain.com server
  • Post this below code and Save
<IfModule mod_rewrite.c>
# For security reasons, Option followsymlinks cannot be overridden.
# Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]
</IfModule>
  • In Google Webmaster Tools Click on your Old domain and at the top right click on Change of Address

Google Webmaster Tools - Change of Address

and do as instructed. This will notify Google about the change of your Website address and will take few days or weeks to show up new domain in Google search results.

 


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.