Exploring The Internet

Exploring the web – Growing my experience toward my online business – Journey to success!

How to Transfer My WordPress Blog to a New Domain?

November 24th, 2008 · 4 Comments · Domain, How to, WordPress, 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.
  • Second 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 fold 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
    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.

BSA ColorOfSex Sexotle SmellOfSex MORE DOMAINS FOR SALE
US $5,000.00
End Date: Tuesday Mar-16-2010 8:11:04 PDT
Buy It Now for only: US $5,000.00
Buy it now | Add to watch list
iPadRumors.com Domain For Sale Apple ipad premium name
US $500.00 (0 Bid)
End Date: Tuesday Mar-16-2010 8:29:50 PDT
Buy It Now for only: US $1,500.00
Bid now | Buy it now | Add to watch list

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

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

Tags: ·········

4 Comments so far ↓

  • website browser wordpress domain links

    [...]  http://www.siteground.com/tutorials/php-mysql/mysql_database_user.htm  http://www.learningwp.com/transfer-my-wordpress-blog-to-a-new-domain.html   website browser wordpress domain [...]

  • Susmita Chatterjee

    Hi

    Nice informative post indeed. I searched “transferring wordpress blog to new domain” in google and found your post URL at the top and landed up here. I would also like to transfer my blog to a domain. I decided to book my domain on Godaddy.com. Is it possible to transfer all my blog (http://susmita.wordpress.com) posts to the new domain. More important is is it possible to incorpoarate Google Adsense into the transferred blog.

    Please help.

    Thanks & regards
    Susmita

    • Lanna

      Hello Susmita,
      This post was written to transfer an old domain to a new one and it was done within the same host.
      Your situation is to transfer a wordpress.com blog to a new self-hosted domain. So the following link can be helpful to you:
      Moving a Blog/Moving to WordPress.org
      If you have a self-hosted domain, there is no problem of incorporating Google Adsense into your blog.
      Good luck!

  • » Moved I Think (And Hope!)

    [...] in my wp-config.php file and voila! For now, at least, it’s fixed. Now I get to attempt at re-direct at my old blog url. Wish me [...]

Leave a Comment

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

Security Code:

Custom Search