Filed Under: Wordpress

Move Wordpress Blog To A New Host Or Domain

7 August 2009 No Comment

Before you move a wordpress blog to a new host you should prepare a few things.

First of all make a backup of your database. Next you should copy your complete site to the new host or directory. Once it’s there make sure you got no 403 forbidden error. If you do read the previous post.

When everything is set, you should now open that “general” settings page in your wordpress admin panel and add the new domain names (don’t save yet). Also open the .htaccess file of your old site and add the following:

Options +FollowSymLinks 
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Now, quickly save both the wordpress admin page and your htaccess file. I can do both in less than 5 seconds, so you can do it too.

If you are *not* using permalinks you also got to run this SQL query:

UPDATE wp_posts SET guid = REPLACE(guid, 'http://www.old-domain.com','http://www.new-domain.com');

Did you link internally? Yes? Good! It’s good for seo to do interlinking to your important sites. To update your posts run this query too:

UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

VoilĂ , you now moved your wordpress blog to a new domain!







Like our posts? Then subscribe via Mail:

Email:  

Similar Posts:

Socialize:

delicious stumbleupon

Leave your response!

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.com.