I’m migrating a WordPress install and trying to get down the correct process for doing so.
I’ve tried using the method I thought would work, but it didn’t.
My files and database are in place, but when I visit the wp-admin the theme manager tells me this – The active theme is broken. Reverting to the default theme.
Unfortunately if you then re-activate it, it work’s but loses all it’s widgets etc.
I’ve been using a search and replace function to change all the instances and options using the old domain with this script – http://interconnectit.com/124/search-and-replace-for-wordpress-databases/
Which is pretty cool.
I’m just replacing
http://domain1.com
with
http://domain2.com
although even running this before I access the site doesn’t seem to stop the problem of the broken theme and thus losing all the widgets.
Anyone know how I can migrate this site without having the ass-ache of losing all the widgets (of which there are way to many to do manually).
Try the XCloner plugin: http://wordpress.org/extend/plugins/xcloner-backup-and-restore/.
I use XCloner to move sites between my live server and my dev server. It takes care of all the migration differences between the domain, database, etc. It preserves all my widget settings, custom menus, etc.
The Widget settings are stored in the
theme_mods
DB entry for your Theme (i.e.{theme-slug}_theme_mods
).The problem with a database search-and-replace is that
theme_mods
is a serialized DB entry. So if the new domain name has a different string length than the old domain name, the serializedtheme_mods
DB entry (as well as any other serialized DB entry that includes a domain name, such as attachment URLs, etc.) will become malformed.Ipstenu explains the issue well:
So:
Then, your original
theme_mods
should be restored.