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?

Optimize Your Wordpress Website to Load Much Faster Today

$50.00
End Date: Thursday Jun-29-2017 8:57:22 PDT
Buy It Now for only: $50.00
Buy It Now | Add to watch list

Custom Made Professional 5 Page Business/Personal Wordpress Website Limited Time
$129.00
End Date: Thursday Jun-29-2017 13:09:54 PDT
Buy It Now for only: $129.00
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