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

    (@whiteshadow)

    When migrating the database, did you run a global search & replace to replace the old site URL with the new one? Unless you account for PHP serialized strings when doing that, it’s possible to inadvertently corrupt plugin settings.

    In short, the problem is that when PHP serializes a string it includes both the string itself and its length. If you change a serialized string without also updating the length, the stored length will no longer match the actual length. This makes the stored data invalid.

    Admin Menu Editor stores many settings as serialized strings – menu title, menu URL, icon URL and so on. Some of these settings might contain your site URL. As a result, globally replacing the URL can corrupt AME settings. And if AME can’t load its settings from the database, it will automatically reset everything to default values.

    I would recommend using a search & replace tool that knows how to handle PHP serialized strings. Here’s one:
    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Thread Starter fantara

    (@fantara)

    Hello! Thanks for the quick reply Janis.

    Yes, there might be that then, I’ll use the plugin you suggest from now on.

    Is there any way to “rescue” the configuration we already have in the databases where we lost the configs?

    Thanks!

    Plugin Author Janis Elsts

    (@whiteshadow)

    Do you have a database backup from the old site, preferably one made just before migration? If yes, you could probably get the original value of the “ws_menu_editor” option (as in wp_options) from the backup and copy it to your current database.

    Thread Starter fantara

    (@fantara)

    I do! Thanks! I’ll do that

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database migration loses configuration of plugin’ is closed to new replies.