Saved for later reference

online repository of stuff I had to google for hours to figure out – and random snippets of code

Moving to new domain

Tags: , , ,

SFLR moved WordPress from to

In spirit of the site, here are some of the pitfalls of moving WordPress:

Getting search engines to redirect correctly

I set up the old site to return HTTP 301 – Moved Permanently by putting the following .htaccess file in the /wp folder:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^([^.:]+\.)*vagabonds\.info\.?(:[0-9]*)?$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

This ensures that (most) search engines consider the new location as equivalent to the previous, and will – hopefully – make only the new location appear in search results.

All my WordPress pages are blank after the move!

Assuming you’ve followed the standard operating procedure for moving the blog, and all database entries are updated to the new path (I did this part manually, but the linked procedure seems OK), the most likely reason is that your plugins are still using the old path. If you can still re-enable the old path (in my case, I moved /wp to /wp-deactivated), go in to the admin panel and deactivate all plugins.

They can also be deactivated from the database, if you have no way of returning to the old installation:

UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';

When everything works again you can reactivate the plugins, and things should be back to normal.


© 2009 Saved for later reference. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.