We are in the process to update an existing WordPress website and imported posts from one site to another. On the old website we used a WYSIWYG editer and all the posts have styles embedded in them
Example:
<p style="margin: 6px 0px; color: rgb(20, 24, 35); font-family: helvetica, arial, 'lucida grande', sans-serif; font-size: 14px; line-height: 19.3199996948242px; background-color: rgb(255, 255, 255);">
<span style="font-family: helvetica, arial, 'lucida grande', sans-serif; font-size: 14px; letter-spacing: 0.4pt; line-height: 19.3199996948242px;">Content</span>
</p>
Expected output:
<p>
<span>Content</span>
</p>
Now I'm looking for a way to remove the style tag from the html elements. Self I was thinking about an MySQL query but have trouble to figuring out how to preg_replace in it.