Data Serialization, WordPress, and my new best friend
Recently, Miriam wrote about Data Serialization and what a pain in the tuchus it can be to migrate a site that has serialized links in the database.
So, today, when I migrated one of our client’s sites from our staging server to the live/production server, I was frustrated that some of the widgets weren’t showing up properly after my usual Search and Replace of the old URL to the new URL in the database, yet excited that I could read her post to find a solution. Frustrexcited, if you will.
Here are the solutions I tried and read on to see which one actually worked:
WP Live Server Deploy: This plugin was featured on wpmu.org, looked like a really good solution. The plugin claimed to quickly migrate your development/staging site to your live/production site, including changing all the old URLs to new URLs. Well, it sounded great, but.. it didn’t work. After I entered the new site’s FTP information into the plugin settings, the FTP info was verified. But when I clicked the “Automate Deployment” button, the plugin couldn’t “determines the remote capabilities of the server”. Then I tried to do a manual backup using this plugin and that didn’t work either. Next.
Peach - An online tool that lets you drag-and-drop a .sql file into the page and set a new domain. I was skeptical because it looked too easy. When I dropped in my .sql file it said there were 0 serialized links. Boo.
WP Migrate DB - My new best friend. Please meet WP Migrate DB. No, he/she doesn’t have a fancy, memorable name, but I definitely wanted to hug and high-five this plugin after it did what it said it would do. It changed all the old URLs to new URLs in the database, including fixing serialized links, and lets you download the new SQL file. I was so happy not to have to mess with any Search and Replace plugins or SQL queries in PHPMyAdmin.
Category: Tips










[...] trying these tools, we wrote an update on data serialization. 0savesSave If you enjoyed this post, please consider leaving a comment or subscribing to the [...]
Great tips, thanks Rebecca! I’ve tried a bunch, too. So far I’ve had best luck with Backup Buddy, which sails through the task of migrating WordPress in its entirety, files included, and adjusting the db… as long as you’re prepared for the quirks of the host’s environment!
Great tip Rebecca, WP Migrate DB worked for me. It make seamless migration of gravity forms possible. I used it for migration of the live db to my local environment.
Interesting article but… I read it after my migration!! and having some links to the old site in my post, I discovered a very simple and powerful MySql command: REPLACE().
Using it I fixed all old links in this way:
update wp_posts set post_content = replace(post_content, ‘http://my.old.web/testdir/’,'http://my.new.web/’)