Example:
All website posts have many paragraphs like this:
<h5>
PARAGRAPH TEXT GOES HERE
</h5>
I need to replace
<h5>
with
and
</h5>
with
Queries
UPDATE wp_posts SET post_content = REPLACE (post_content, ‘
<h5>’, ‘
‘);
UPDATE wp_posts SET post_content = REPLACE (post_content, ‘</h5>
‘, ‘
‘);
don’t help.
IMPORTANT:
I cannot run separate queries, i.e. one for
]]>and then for <h5>.
I need to somehow replace<h5> in one set.
Thank you.
I suggest you use the plugin Search Regex instead of doing MySQL queries, since it has the option to show you what would be changed before changing it. If you don’t know regular expressions, you might need to read up on that first.
And if you do have a way to distinguish between start and end <h5>, you can use a two step approach.