Archive of the day June 29, 2011

WordPress: delete all the posts of a category

Nessun commento » MySQL , Tips & Tricks , Wordpress No Comments »

This guy was found in my same situation and solved the problem before me in a simple and elegant, which is why I report on his article and I note here the valuable SQL string. It 's true that before doing anything else googolata is a must!

I fully agree with what he says about the limits of the plugin Bulk Delete : works only if the posts are removing a few hundred, unless you put out, raising his hand to the server Apache and reserving more RAM to process PHP - highly recommended choice , as a rule these are tuning in a more rational facts and not just to run a WordPress plugin.

Here the string, sempclie and immediate, to obtain the definitive cancellation of all the posts belonging to a specific category:

 
 b , c , d DELETE a, b, c, d

 FROM wp_posts to

 ( a . ID = b . object_id ) Wp_term_relationships LEFT JOIN b ON (. ID = b. Object_id)

 ( a . ID = c . post_id ) Wp_postmeta LEFT JOIN c ON (. ID = c. Post_id)

 ( d . term_taxonomy_id = b . term_taxonomy_id ) LEFT JOIN d ON wp_term_taxonomy (d. Term_taxonomy_id = b. Term_taxonomy_id)

 ( e . term_id = d . term_id ) LEFT JOIN and ON wp_terms (and. Term_id = d. Term_id)

 term_id = '12345' WHERE and. Term_id = '12345 ' 

A quiet weekend of fear (Deliverance, 1972) and the legendary freak sequence of dueling banjos

Nessun commento » YouTube No Comments »

Dedicated to all those who were kids in the eighties and if they are seen and reviewed a dozen times on private television.