我有一个wordpress网站,最近受到恶意软件攻击。我设法删除所有恶意软件文件和广告安全。
但那个黑客在所有帖子内容的结尾注入了一些如下的随机网址。该网站有大约1.5公里的职位。
<a href="http://www.cgparkaoutlet.com">canada goose outlet</a> <a href="http://www.cgparkaoutlet.com">canada goose outlet</a>
我需要删除这些链接。已经测试过这个mysql,但它不工作
UPDATE wp_posts SET post_content = REPLACE(post_content, substring_index( substring_index(post_content, 'href="', -1), '"', 1),'');
UPDATE wp_posts SET post_content = REPLACE(post_content, '<a href="">','');
UPDATE wp_posts SET post_content= REPLACE(post_content, '<a href="" target="_blank">','');
UPDATE wp_posts SET post_content= REPLACE(post_content, '</a>','');
任何人都知道如何删除这些链接从所有职位没有老化的内容。谢谢您
1条答案
按热度按时间1l5u6lss1#
我建议您使用wp\u strip\u all\u tags wordpress函数,例如:
https://codex.wordpress.org/function_reference/wp_strip_all_tags