WordPress.org

Ready to get started?Download WordPress

Forums

Conditional Widgets
Text Widgets get deleted when changing URL References in Database (5 posts)

  1. Joseph Hinson
    Member
    Posted 2 years ago #

    Hi,

    I love this plugin. It is just what WordPress needs. When I build sites, I often build them locally with MAMP, then move the site to it's new host home and update the URL references to the new .com.

    The problem is, when I use this method after having configured this plugin, I lose my text widgets. They don't drop to "recently used" widgets, they just go away. And only text widgets.

    I have tried deactivating the plugin, then updating the database, then reactivating the plugin, and on reactivation, it drops the text widgets immediately.

    I thought I'd bring this to your attention, Lately, what I've been doing is just not using the plugin until after I setup the site on it's home, but that's easier said than done sometimes.

    Any ideas?

    Thanks,

    Joseph

    http://wordpress.org/extend/plugins/conditional-widgets/

  2. blig
    Member
    Posted 2 years ago #

    Thank you Joseph for letting us know: i am going to use this plugin and i usually configure widget on test instances/demo sites and THEN transfer everything on the live space (which has always a different URL).

    I think this is pretty common, so UP for your report, i hope this can be solved in the next release.

  3. Jason Lemahieu (MadtownLems)
    Member
    Plugin Author

    Posted 2 years ago #

    This is... incredibly odd and I have no idea why this would be happening. The plugin merely stores some additional information along with the widget instance, and nothing to do with any Site URLs. Can anyone else confirm this is true or provide more info? (I don't do this style of development)

  4. fuzzyness
    Member
    Posted 2 years ago #

    Hi Joseph - it's nothing to do with any particular widgets, it's because you've done a simple find-and-replace of old URLs to new URL, rather than properly changing them in such a way that preserves the serialized string lengths that WordPress stores.

    Here's the solution:

    http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

    I use this all the time when migrating WP sites from sites with a different number of characters in the domain name.

    Hope that helps.

  5. Joseph Hinson
    Member
    Posted 2 years ago #

    Right you are Fuzzyness. Sorry MadtownLems, I forgot about this post I had made and stumbled on the better way to change URLs as fuzzyness mentions here.

    Thanks for the note fuzzy, you're totally right, and it does work much better. I didn't know why until you posted that though. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic