database find and replace help for multisite

Hi, let's say that I use gridmarket theme for my subsites. I want to change the shortcode on all widgets that say [mp_product_price]
How do I search the phpadmin database for widgets in this theme that contain this shortcode which I want to quickly replace with [mp_buy_button] shortcode without manually going through each subsite, and not interfere with product posts that might have this shortcode in it?

Tags: find and replace phpmyadmin wordpress mu sidebar widgets

  • aecnu

    Greetings Atlanta,

    Thank you for bringing this up - whatever it is you are trying to tell here, meaning that I cannot figure out what it is you are trying to accomplish.

    From what I can tell, this seems to be a theme related items and nothing to do with the database and why would one even want to mess with the database when widgets can be dealt with in theme functions and widgets themselves.

    What am I missing here?

    What is it that you are trying to accomplish?

    Please advise.

    Cheers, Joe

  • Atlanta

    Hi @aecnu

    Let's say I have 4000 subsites and I need to change one of the widgets in each site. In a previous forum message you said that the easiest way to accomplish this was by doing a find and replace on the database so that I don't have to change each subsite manually. Okay, great.

    How exactly do I do it?

    I want to replace every sidebar widget that says [mp_product_price] with [mp_buy_button] shortcode. I also want to change these widgets from is_blog_user(1) to is_blog_user(2).
    How do I do this without affecting other areas of my site where [mp_product_price] or is_blog_user(1) appears?

  • aecnu

    Greetings Atlanta,

    Thank you for the clarification which is certainly appreciated.

    If indeed it is not hard coded in the theme you would search for [mp_product_price] and replace with [mp_buy_button] and the same with is_blog_user(1) replacing with is_blog_user(2).

    How do I do this without affecting other areas of my site where [mp_product_price] or is_blog_user(1) appears?

    Ah I see you want your cake and to eat it too ... lol

    It cannot be done.

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.