• Resolved mkellam2

    (@mkellam2)


    Hi,

    I need to find 3 paragraph/div lines of HTML from my posts table and replace with a shortcode.

    The exact HTML string exists in 300+ posts.

    I cannot find a suitable way to find and replace multi-line that I understand as I don’t know PHP.

    Is it possible for me to:
    1) Download the sql file from phpmyadmin
    2) Find and replace the string in the sql file in a text editor
    3) Drop the existing posts table in phpmyadmin
    4) Then re-import the corrected posts table from the edited sql file?

    I think I may have done this successfully before, but I can’t remember for sure. I want to make sure it’s not blog suicide before I try it!

    I would keep a backup of the unedited table to re-import in case of a catastrophe.

    Thanks in advance!

    Mike

    • This topic was modified 4 years, 4 months ago by t-p. Reason: Moved to Fixing WordPress from Everything else WordPress
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Howdy!

    Yes, that actually does sound very doable. And yes, making sure you have a backup ready is a great thing too. Not that I know about that or anything ??

    Thread Starter mkellam2

    (@mkellam2)

    Thanks a bunch, Jose!

    I’m pretty sure I did it successfully before -data in, data out! lol

    Yes and I’ve had my share of learning experienced about backups!!

    Thanks again!

    Mike

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    That’s awesome to hear, Mike.

    Glad you were able to get it working. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can I edit a table in a text editor, drop and re-import?’ is closed to new replies.