It is done through the following query:
delete from `wp_terms` where `term_id` in ( SELECT `term_id`
FROM `wp_term_taxonomy`
WHERE `taxonomy` = 'category' ) and `term_id` not like 1
This query deleted all the category except the default. Hope this helps to the others.
Related Posts:
- How To Find Out WordPress Category Table in MYSQL?
- How to convert regular categories to custom taxonomy?
- Deleting All tags except categories Wp database
- How Do I Merge Categories With phpMyAdmin
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- Wacky taxonomy in wordpress
- Array: What is this value based on?
- How to list all categories and their IDs using SQL query?
- Deleting a category from WordPress admin does it remove it completely from the database?
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- How to store category and tags separatly on wordpress?
- Create categories manually in database
- Search Replace Database ONLY for posts of certain category?
- Backend – Categories and Menus conflicts
- add an image field to wordpress category
- Fetch all categories from database
- Get posts from sites in Multisite?
- How to create a custom sort for WordPress categories
- Hook when category is added to post
- How to add the category ID to admin page
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Category Archive
- WordPress remove separator from last item in wp_list_categories
- Filter categories using tags
- Sticky posts on home page, search, tag and archives without plugin
- Need help adding custom field to category
- Show Post from parent category (custom taxonomy) ONLY!
- How to display a list of categories
- One WordPress Install, Two Categories. Each Category Gets a Domain
- Create single.php for specific category by category id
- is_category in pre_get_posts results in php notices
- Filtering Children of the “uncategorized” Category out of the Loop?
- How to make all posts in a category “unsticky”?
- How do I get the total number of categories in a list of search results?
- Update wordpress post terms programatically
- advanced custom field Show field in special categry page [closed]
- Display products for a category, sorted by post_excerpt
- Creating archive pages for children categories
- “NOT ONLY IN” taxonomy query operator?
- How do you bulk remove a category from posts?
- How to remove the “+Add Category” button from the Category metabox?
- Show recent posts from one category on a non-WP site
- Omit specific product categories from WooCommerce shortcode
- Inserting Category programmatically
- Category-slug.php not being used
- Additional form options based on category selected not working
- Pagination for category slug returns 404 when page >= 2
- Display category-specific comments in sidebar
- Paging not working in category.php
- Display list of categories filtered by date?
- Drop posts from categories in MySql
- Exclude category by slug in pre_get_posts?
- add slug beside name in Admin Category Checklists
- How to show 5 posts from specific category on related page?
- Exclude category from related post
- Post belonging to many categories
- how do I use the walker class to display categories in their correct heirarchy?
- How can you access category information from a theme?
- Filter WooCommerce archive pages by an additional category
- WP 4.7 in_category change?
- display category list year wise in wordpress
- Display subcategories in dropdown
- Illegal string offset ‘taxonomy’ in
- Category Page Template – Can’t get category ID
- Are term_taxonomy_id and term_id the same? [duplicate]
- Display all sub category but one
- Filter Category Loop Dynamically
- SQL query to get posts from multiple categories but not in a category
- Can each user have only access to a private area (his own categories and posts)?
- WP Category Meta plugin fix? [closed]
- WP SQL Categories Export and Import
- How to display WooCommerce category image in my category page banner as a background?
- Why are my newly added categories not showing up when creating a post?
- WordPress Default Category and Custom Taxonomy Selected Attribute not Working After Searched in wp_dropdown_categories Array
- Order wp_dropdown_categories by ASC or DESC
- Add filter for specific category only
- How to exclude a category returned by get_categories from function.php?
- Displaying only selected categories
- How to get get_categories()’s ‘hide_empty’ argument to work with global year var in the archive template?
- Getting a sub category based on a category name
- How to display only sticky posts on category pages?
- Conditional statement: if is_category, append at the end of page
- I have many different products on my website how can I get them to display under specific categories?
- Help with SQL query, how to add taxonomie terms with value stored in options?
- /blog/ permalink prefix causes category pages to 404
- How to create an array with category ids order by the one that has the most recent post
- Pass list of categories to JS
- WP url to get rss with full text of post
- Display Referring Category on single post?
- Conditional statements based on custom meta value in category archives
- Placement of categories
- Paginating a list of all posts collected by category titles
- Display deepest post category, when post have multiple categories
- Paginate WordPress Category Pages
- Get a list of post titles and links from yootheme master theme
- How to structure Multisite sites into categories?
- Page permalink rewrite
- Excluding cateory not working on my site. how to solve this? [closed]
- Get all first images of posts in same category
- Woocommerce Force the category choice before creating new product? [duplicate]
- Replace category titles inside RSS feed