Support » Fixing WordPress » Search-and-replace in MySQL database

  • I need to make a number of minor spelling corrections in my WordPress database. Before I do this, I would appreciate some confirmation that I’m approaching the task correctly. (I don’t have a lot of experience with MySQL.)

    1. Using phpMyAdmin, back up the database (data and structure). Download to local workstation.

    2. On a copy of the backup, use UltraEdit (Windows text editor) to replace the strings I want to fix.

    3. Save the modified file with unix line endings.

    4. Using phpMyAdmin, DROP all the tables in the database. [This is the step I’m worried about. Seems a bit drasticâ€?but necessary?]

    5. Using phpMyAdmin (SQL tab), repopulate the database by uploading the modified file.

    Is that about right? Is there anything unnecessarily risky in this approach?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Mark (podz)


    Support Maven

    That’s how I would do it.

    I use Notepad++ and it opens and saves .sql files without a problem so I’m not sure about #3 above.
    #4 is needed, yes – but you’ve got a backup tucked away somewhere safe haven’t you ?

    Risky ? No, not with your procedure.

    I’d wish you good luck, but then you’d worry, so I’ll just say “You’ll be fine !”

    Mark (podz)


    Support Maven

    In fact ……..
    If the corrections are only in one table, you could just export that one table, correct it, drop the old one, import the new amended one.

    Thanks, podz. That makes me feel better.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search-and-replace in MySQL database’ is closed to new replies.