[resolved] mass search and replace (4 posts)

  1. Atlanta
    Posted 3 years ago #

    Hi, I am testing your plugin on a multi site set up. I have this code in a text slide

    <div style="background-image: url(../image1.png); height: 400px; width: 500px; border: none;">Well hello there</div>

    and I want to do a mass search and replace of every time it occurs and swap it out with

    <div style="background-image: url(../someotherimage2.png); height: 500px; width: 500px; border: none;">Well goodbye there</div>

    I see from this post http://www.hongkiat.com/blog/how-to-search-and-replace-wordpress-in-blog-post/ that I would do something like this in phpmyadmin

    UPDATE wp_posts SET post_content = REPLACE (
    'Item to replace here',
    'Replacement text here');

    but I am displaying the slideshow in an admin dashboard widget http://wordpress.org/extend/plugins/dashboard-widget-sidebar/. So how do I do it?
    I backed up my database before hand.



  2. Stefan Boonstra
    Plugin Author

    Posted 3 years ago #


    The table that stores the slideshow's slides is the 'wp_postmeta' table. The 'meta_value' column stores the slide data. This would make your query look something like this:

    UPDATE wp_postmeta SET meta_value = REPLACE (
        'Item to replace here',
        'Replacement text here'

    Best regards,

  3. Atlanta
    Posted 3 years ago #

    Thanks. Is there an issue with serialized data breaking with this slideshow widget if I do a search and replace?

  4. Stefan Boonstra
    Plugin Author

    Posted 3 years ago #

    When looking at the serialized data in PHPMyAdmin, it looks like it won't be that much of a problem. If the replace query doesn't match any records, you won't have any results anyway. You can use an online PHP serializer to check if there will be any complications with your data.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Slideshow
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.