WordPress – query to dump all categories

WordPress mysql query to dump all categories (id, slug, name, description, count)

SELECT wp_terms.term_id, wp_terms.slug, wp_terms.name,
  wp_term_taxonomy.description, wp_term_taxonomy.count
FROM wp_term_taxonomy join wp_terms
  on (wp_term_taxonomy.term_id = wp_terms.term_id)
WHERE wp_term_taxonomy.taxonomy = 'category' 
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments