I'm migrating a WordPress site from one server to another, and the entire migration seems fine, except the sidebars aren't moving over properly. The obvious thing that comes to mind is a serialization issue with the MySQL migration, but I'm not making any changes to the database because the domain name isn't changing (or even the server paths for that matter). I'm literally just moving it from one box to another.

  • 1
    What does "aren't moving over properly" mean? What are the symptoms?
    – s_ha_dum
    Jun 7, 2013 at 16:53
  • Widget content in the back-end has been completely wiped out, but the positions themselves are still present. On the front-end, the default fallback for the theme is rendering without problem, but that's to be expected as they're hard-coded in the PHP and not "widgets" themselves. Jun 8, 2013 at 18:07

2 Answers 2


Rather than mess around trying to find the serialised data that got messed up, just use a tool to migrate environments and avoid messing up serialised data. WP Migrate DB is a good one that handles serialised data properly. The free version does a great job, as long as you don't have a huge database. The Pro version is the duck's nuts, well worth the money.

  • I tried a standalone script similar to this, but again since I'm not changing any paths / domain info, it doesn't surprise me that I haven't had any success with this particular problem. Jun 8, 2013 at 17:44
  • When you say "not changing paths", does that include the file paths, e.g. /var/www/html/example.com ? Some plugins track the paths to files, and may fail if the path to the website's files changes.
    – webaware
    Jun 9, 2013 at 1:29
  • That's correct. This is from one box to another at the same host, and the server paths are identical. Jun 10, 2013 at 15:16
  • So why do you think it's serialised data? I would instead look for errors in the browser console, and in the PHP error log; I recommend you turn on WP_DEBUG and WP_DEBUG_LOG so that you can catch any errors easily -- see Debugging in WordPress.
    – webaware
    Jun 10, 2013 at 23:02

Broken sidebars on migration is indeed symptomatic of plain text replacement on serialized data...

In such situation I would try following steps:

  • examine environments, mismatch in encoding settings (WP and/or MySQL) can cause issues

  • examine process, personally I find tools that to end-to-end copying more robust than going through intermediary file

  • enable debug mode, broken data might manifest as errors from unexpected/bad inputs

  • manually compare source and target data after migration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.