Created
September 21, 2017 19:46
-
-
Save gpspake/b500a8eb103251f90953db0322d7c7da to your computer and use it in GitHub Desktop.
Delete Script tags from WordPress Posts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://www.makeuseof.com/tag/edit-thousands-wordpress-posts-sql-command/ | |
UPDATE wp_posts | |
SET post_content = REPLACE( | |
post_content, | |
substr( | |
post_content, | |
locate('<script type=', post_content), | |
( | |
(locate('<script type=', post_content) + 82) - locate('<script type=', post_content) | |
) | |
), | |
'' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment