{"id":1789,"date":"2009-11-17T11:01:18","date_gmt":"2009-11-17T16:01:18","guid":{"rendered":"http:\/\/blogs.terrorware.com\/geoff\/?p=1789"},"modified":"2009-11-21T10:00:35","modified_gmt":"2009-11-21T15:00:35","slug":"wordpress-mu-spammed-chickenfoot-to-the-rescue","status":"publish","type":"post","link":"https:\/\/blogs.terrorware.com\/geoff\/2009\/11\/17\/wordpress-mu-spammed-chickenfoot-to-the-rescue\/","title":{"rendered":"WordPress Mu spammed, Chickenfoot to the rescue"},"content":{"rendered":"<p>I found out last night that I had forgotten to turn off new blog registration on my WordPress Mu instance and that over 500 spammers had created new blogs on my site.\u00c2\u00a0 The admin interface allows you to bulk delete blogs but requires that you check the checkbox next to each blog to select it for deletion.\u00c2\u00a0 This was getting pretty tedious.\u00c2\u00a0 Though I&#8217;m sure I could have delved into the internals of WordPress and figured out how to delete these blogs at the database level, this was a little scary and I didn&#8217;t really want to spend the time to do the research necessary to feel confident about this method.<\/p>\n<p>So, I installed the Chickenfoot Firefox extension and wrote this simple script that would check every checkbox on the administration page.\u00c2\u00a0 This was made easy because of the fact that the only checkboxes on this particular page were ones associated with blogs that I wanted to delete.\u00c2\u00a0 This reduced the number of clicks to delete blogs significantly and it only took me a few minutes of manual clicking to delete the hundreds of spam blogs.<\/p>\n<pre><span style=\"color: purple\">for<\/span> (chk = find(<span style=\"color: purple\">new<\/span> XPath(<span style=\"color: green\">\"\/\/input[@type='checkbox']\"<\/span>)); chk.hasMatch; chk = chk.next) {\r\n  check(chk);\r\n}<\/pre>\n<p>Photo by <a href=\"http:\/\/www.flickr.com\/photos\/geishabot\/\">love\u00ef\u00bd\u00a5janine<\/a> via <a href=\"http:\/\/www.flickr.com\/photos\/geishabot\/4065804042\/\">Flickr<\/a><strong>.<br \/>\n<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I found out last night that I had forgotten to turn off new blog registration on my WordPress Mu instance and that over 500 spammers had created new blogs on my site.\u00c2\u00a0 The admin interface allows you to bulk delete blogs but requires that you check the checkbox next to each blog to select it&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.terrorware.com\/geoff\/2009\/11\/17\/wordpress-mu-spammed-chickenfoot-to-the-rescue\/\">Continue reading <span class=\"screen-reader-text\">WordPress Mu spammed, Chickenfoot to the rescue<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[27],"tags":[153,764,21291,763,264,62,765],"class_list":["post-1789","post","type-post","status-publish","format-standard","hentry","category-hacks","tag-blog","tag-chickenfoot","tag-hacks","tag-spam","tag-sysadmin","tag-wordpress","tag-wordpressmu","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wnIz-sR","_links":{"self":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/comments?post=1789"}],"version-history":[{"count":5,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1789\/revisions"}],"predecessor-version":[{"id":1791,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1789\/revisions\/1791"}],"wp:attachment":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/media?parent=1789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/categories?post=1789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/tags?post=1789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}