Run the below SQL command in phpMyAdmin. Replace portion CODE_TO_SEARCH with the code you want removed. Make sure database table prefix matches the site you are doing this on.
update wp_posts set post_content = replace(post_content,'Text to find','text to replace with');
ANOTHER WAY BELOW:
phpMyAdmin includes a neat find-and-replace tool.
Select the table, then hit Search > Find and replace
This query took about a minute and successfully replaced several thousand instances of oldurl.ext
with the newurl.ext
within Column post_content
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article