Support » Plugin: Global Content Blocks » Blocks Disappear After Search Replace

  • Resolved thepeel


    I tend to do all of my developing locally and then transfer the entire site to the production server when it’s ready. After moving it I use a search and replace plugin to remove all hardcoded local URLs and replace them with the URL of the production site.

    On a current site I’m developing this kills all of my global content blocks. They remain in the DB but don’t appear in the plugin settings.

    Do you know of a workaround to make this work? I’m quite positive I have done this with GCB in the past on another site.



Viewing 6 replies - 1 through 6 (of 6 total)
  • After scouring this forum, I see that what I am doing is not how it was intended to be used. However, if we are unable to use it like this, then it makes GCB unusable for developing sites.

    I tested an old site with an older version of GCB and it worked just fine when running a search and replace.

    If there is no intention to make this work, please let me know so I can find a viable alternative.

    I’m having the same issue with this plugin. I was hoping to just change the URL’s in the DB and be good to go. But the only way to get the entries in there was to export from the development version and import into the new one.

    Plugin Author benz1


    The plugin was changed to use a serialized database structure in keeping with WP best practices but due to serialized structure particularities this might cause issues with some search and replace scripts. However, there is a search and replace script that actually deals with this. It can be found on so I would suggest you give this a go.

    I would add that this is not how the plugin was intended to be used and with over 42,000 downloads it would be impossible to try to make the plugin work in every conceivable way that users may want to use it.

    I have the same problem whenever I move sites.

    Benz1, if the domain string is simply being replaced with another domain string, why would this stop the blocks from showing?

    Plugin Author benz1


    I answered this above. You’d have to ask WordPress why but I provided a link to a search and replace script that seems to work with the serialized structure. I move sites using Backupbuddy and haven’t had any problems.

    Just to let you know that the Automatic Domain Changer devs have updated their code, and it doesn’t break GCB anymore!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Blocks Disappear After Search Replace’ is closed to new replies.