mysql – remove wordpress post links
Question
I found such a code to remove all links in the articles, but the code also deletes the link texts. Is there a sql query code that will remove the links without deleting the link texts?
UPDATE wp_posts
SET post_content = CONCAT(
LEFT(post_content, LOCATE('<a', post_content) - 1),
SUBSTRING(post_content, LOCATE('</a>', post_content, LOCATE('<a', post_content) + 2) + 4))
WHERE post_content LIKE '%<a%';
0
1 month
2022-12-29T01:58:22-05:00
2022-12-29T01:58:22-05:00 0 Answers
0 views
0
Leave an answer