How I moved from my old domain to this one

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
February 24, 2009

After being on my old domain http://www.bishaladhikary.com.np for a couple of months, I finally decided to move to this one. Actually my friend Ghtozkat suggested me that as the domain was a country domain of Nepal, the traffic would be targeted to Nepal by default. So, he suggested me to move to a new domain .com, .net or .org and so I moved my WordPress blog to this domain. Well I had to go through a lot of processes to get all my previous posts on this domain and then finally redirect my old domain to this.

After purchasing the domain, I first pointed my domain to the web hosting by supplying the required nameservers ids. Then I began the process of moving my WordPress blog from old domain to new one. I first tried to copy the files in my old domain’s directory to the new one’s via WS FTP Pro. But the process started getting slow. So I aborted the process midway and then downloaded the compressed files in tar.gz format from the cPanel. Then I added a robots.txt file in the root directory of the new domain to disallow the Search Engines during the uploading process with the following lines.

User-agent: *

Disallow: /

Then I restored the files into the space of my new domain by uploading it via cPanel. Actually this feature is very useful as you won’t need to upload every single file and moreover the process is much faster. Next I had to restore the WordPress database. I just exported the SQL file from phpMyAdmin in zipped format. As suggested in WordPress Codex I exported with the required settings in the Export options which were as follows. In the SQL Section I ticked on the following boxes:

‘Structure’

‘Add DROP TABLE’

‘Add AUTO_INCREMENT’ and

‘Enclose table and field names with backquotes’
In the data section I unticked all boxes except the checkbox next to DATA. Well the database could also be backed up using WordPress Database Backup Plugin.The SQL file had to be edited as it had the occurrences of the old domain name. So I opened up the file in Notepad++ which is a great text editor and then replaced all the occurrences of the old domain with the new one. Actually this could also be done with notepad but notepad didn’t show all the text properly. I finally saved the file. Then I went to phpMyAdmin in my cPanel of the new domain. I clicked on the Import Tab and then imported the SQL file that I just edited. Now, there were occurences of my old domain’s name in the theme files as well. As I was moving my wordpress blog to new domain, the links in the theme files with my old domain’s URL had also to be replaced. So, I opened up all the files of my active theme in Notepad++ and replaced the old domain’s name with the new one’s. I saved them and uploaded them to the new domain’s space which was the public_html folder. The public_html default folder is the place where all the core files of your blog sit, even the favicon.  The wp-config.php file also had to be edited as I had to supply the correct Database Usernames and Password.  Though I was moving my WordPress blog to a new domian, I didn’t want to lose the traffic that my old domain was getting. So, I decided to redirect it to techattitude.com. To do this, I simply needed to edit the .htaccess file with the required parameters. I opened up my notepad, inserted the following lines and finally upladed it in the public_html folder of my old domain.

RewriteEngine On

RewriteBase RewriteCond %{HTTP_HOST} ^(www\.)?old_domain\.com.np

RewriteRule (.*) http://www.new_domain.com/$1 [R=301,L].

Finally I edited the robots.txt file for my new domain as per my requirements. This was the series of processes that I went through to move my wordpress blog to a new domain. Hope the information was useful to you.

You may also like...