Exploring The Internet

Exploring the web – Growing my online experience

How to Transfer My WordPress Blog to a New Domain?

November 24th, 2008 · 18 Comments · Domain, How to, WordPress Plugins, WordPress Tips

I’ve just successfully transferred my old WordPress blog which is in the subdomain of /blog/ to a new domain (the current domain). This was done within the same host.

  • First I used FTP to back up my old WordPress blog files to my laptop.
  • Third I upgraded my old WordPress 2.6.1 to be the newest version WordPress 2.6.5.
  • Next I created a new folder named wp for the new domain. I then created a robots.txt in wp folder with the following contents:
    User-agent: *
    Disallow: /

    This is to prevent any search engines to crawl my site before it is ready.

  • Next I typed the url of my website in my browse to run the install and input the information I’v got from the last step to finish the installation.
  • Then I edited wp-config.php file which should be in your root directory and changed the high-lighted parts with the information I’ve got earlier.
  • define(‘DB_NAME’, ‘databasename‘); // Change the high-lighted part to be your database name
    define(‘DB_USER’, ‘mysqlusername‘); // Change the high-lighted part to be your MySQL username
    define(‘DB_PASSWORD’, ‘mysqlpassword‘); // Change the high-lighted part to be your password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value.
  • Next I used FTP to upload all my old WordPress blog’s files to public_html/wp folder.
  • Then I imported my old database to replace the new one I’ve created eariler. (if your database name, mysql username, and mysql password are the same as the old one, then you don’t need to do anything otherwise you have to change them before you can import it.)
  • Then I logged in to my WordPress admin area and used Search and Replace plugin to search all my old WordPress urls in database to be replaced with my new urls.
  • Then I double checked my website to see whether everything was working properly. After that I deleted the robots.txt file.
  • Finally I added the following line in my old blog’s .htaccess file right after RewriteEngine On, see below
    RewriteEngine On
    RewriteRule ^(.*)$ http://www.yourdomainname.com/$1 [R=301,L]
  • You must change yourdomainname to be your actual domain name. Adding this line in my old blog’s .htaccess will ensure that all my old blog’s traffic will be redirected to my new blog with every single post I’ve created.

Any questions? or suggestions? Please share them with us.

Related articles
Transfer My Joomla! Website to a New Host
How to Transfer Your Joomla! Website to a New Domain?


End Date: Sunday Feb-18-2018 8:24:36 PST
Buy It Now for only: $299.50
Buy It Now | Add to watch list

Total Wordpress Website Security - Secure YOUR Site From 99.9% Of All Hackers
End Date: Sunday Feb-18-2018 9:46:16 PST
Buy It Now for only: $50.15
Buy It Now | Add to watch list

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

Tags: ·········

18 Comments so far ↓

Leave a Comment

Your e-mail address will not be published. Required fields are marked *

Comment moderation is in use. Please do not submit your comment twice.


Custom Search