Question Asked: How Do I Move My WordPress Blog To A New Domain?
|
Mar 16th, 2009 |
I get this question a lot, in my day to day life, and see it on message boards all the time. Though it’s super easy to do, for those that know how, it may be complicated for those that don’t.
I’ll outline all the steps you need to take, in order, and you’ll be moving blogs before you know it.
- Purchase your new domain name, and set it up with your host.
- Download all your files from your old domain name.
- Upload those files to your new domain name. (We’re going to assume you’re using the same web host, and same MySQL database.)
- That’s it, as far as moving files. Now, there’s just a few changes you need to make to your database. You’ll need to login to phpMyAdmin to do these next few steps. If you don’t know how to do this, consult your web host.
- Once in phpMyAdmin, navigate to the database for your WordPress blog, and click the “SQL” tab across the top of the right frame.
- The first query you want to run, is this:
UPDATE wp_options SET option_value = replace(option_value,(This simply updates the two variables in your blog’s database, to tell your database what your blog’s URL is.)
'http://www.old-domain.com', 'http://www.new-domain.com') WHERE
option_name = 'home' OR option_name = 'siteurl'; - The second query you want to run is this:
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');(This simply updates your post’s individual URLs from your old domain, to your new domain.) - The last query you need to run is this:
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');(This query updates all your posts that have links to your old domain in them, to the new domain.)
A few things you should note about these queries:
- Ensure you replace www.old-domain.com and www.new-domain.com with your old and new domain names.
- These queries assume that you haven’t changed the default table prefix from wp_ to anything else. If your WordPress tables are prefixed with something else, be sure to change it in your queries.
That’s all you need to do. If you encounter any errors, post a comment below, and I’ll do my best to help you.
Other answers you may find useful:
- How Hard Is It To Move To A New Webhost?
- How Do I Redirect All My Webpages To My New Domain Name?
- How Do I Register A Domain Name?
- Where Should I Buy My Domain Name?
- How Do I Stop People From Linking To My Images On My Website?
Previous Post |
Next Post |
| « When Was The Last Full Moon on Friday the 13th? | How Do I Make Corned Beef and Cabbage? » |
Comment On This Post
