Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Does your process for migrating a site involve running a direct search & replace on WP database tables to replace the old URL with the new one? Doing that with a tool that doesn’t know how to handle serialized PHP strings can corrupt plugin settings. I would recommend using something like this instead:
    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Technical explanation:
    The problem is that the admin menu might include the URL of the current site somewhere, e.g. as part of a menu icon URL. That URL will then be stored as a serialized string. Serialized strings include the string length. If you change the contents of the string without updating the length, PHP won’t be able to parse the string any more. As a result, the plugin won’t be able to load your settings.

    Thread Starter c.note

    (@cnote)

    Does your process for migrating a site involve running a direct search & replace on WP database tables to replace the old URL with the new one? …

    I’ve just being doing it manually on the SQL dump and to be honest for the most part its fine. Just annoying when one of the plugins loses its settings and a lot effort has gone into configuring those settings.

    I’ll check it out, thanks

    Thread Starter c.note

    (@cnote)

    I tried in a site I was just about to migrate and no joy on that server due to security

    2: set_time_limit() has been disabled for security reasons in /home/../replace/srdb.class.php on line 283
    The dry-run option was selected. No replacements will be made.

    Thread Starter c.note

    (@cnote)

    Edit: It worked on the second attempt

    Handy tool!

    Plugin Author Janis Elsts

    (@whiteshadow)

    Just annoying when one of the plugins loses its settings and a lot effort has gone into configuring those settings.

    Indeed. Unfortunately, there’s not that much I can do about it on this end. It’s just a PHP idiosyncrasy.

    Aside from the tool mentioned above, another thing you could do is export menu settings to a file before migrating the site. This way you will have a backup in case anything goes wrong.

    Thread Starter c.note

    (@cnote)

    Out of interest, how do you deal with the same issue when migrating a site that is part of a multi-site setup? Is exporting the menu settings (Pro version) the only option in order to retain the settings.

    Plugin Author Janis Elsts

    (@whiteshadow)

    I must say I haven’t tried that myself.

    If you’re using per-site menu settings (it’s an option in AME), theoretically, you could do it same way as when migrating a normal site. However, on Multisite the default is to store menu settings globally: in the wp_sitemeta table. In this case, exporting the settings is the only solution.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Migrating site loses Admin Menu Editor settings’ is closed to new replies.