Support » Fixing WordPress » Editing html code

  • What is the easiest way to edit the html code for a bunch of WP posts? I would like to remove the “rel=lightbox[pics33]” type code from several dozen blog entries.

    Is there a way I can access the raw html so I can use a search tool and edit this information?

    Is this a good idea? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Les Bessant


    keeper of the Tiggers

    The content of your posts lives in the database, you you can’t actually edit the generated HTML.

    You can try the Search and Replace plugin, which will let you make changes to the database.

    Make sure you have a good backup first, and handle with care – there is no “undo” if you make a mistake with your edits.

    And make sure you have a backup of your database first (yes I know I said that twice!)

    Thanks I’ll check out the plugin.

    I wonder if you could export the SQL from the proper MySQL table, then run a search and replace operation on the data, then upload it back to the database?

    I wouldn’t know where to start, and this would be for the future. Seems this would be safer as you could verify your changes prior to uploading the changed table data back.

    I looked at the plugin, and, well, I’m not sure I trust it.

    I had success using an approach that wasn’t suggested here. I exported the database to an SQL file, then ran a search & replace utility to replace the code. I then imported the SQL back into the database after dropping the MySQL tables.

    The nice thing was that I could see the proposed changes to the SQL prior to committing. This is a feature of the utility I used (Funduc Search & Replace).

    That’s exactly what I was going to suggest.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Editing html code’ is closed to new replies.