Managing categories in WordPress is a fundamental part of organizing content for both posts and products in WooCommerce. However, the default categories “Uncategorized” can sometimes be restrictive or unnecessary. If you need to disable the default post category and/or the default WooCommerce product category, phpMyAdmin provides a robust tool for making these changes directly in your database and the definitive solution to this annoying setting . Here’s a step-by-step guide to help you through the process.
Prerequisites
- Access to your WordPress database via phpMyAdmin.
- Basic understanding of MySQL and phpMyAdmin.
- A full backup of your WordPress site and database (very important).
- Recommended to test first on a localhost and then on the production.
Step-by-Step Guide
1. Access phpMyAdmin
- Log in to your hosting account.
- Navigate to the phpMyAdmin tool (usually found under database management or a similar section).
2. Select Your Database
In phpMyAdmin, select the database associated with your WordPress installation from the list on the left-hand side.
3. Locate the wp_options Table
In the list of tables, find and click on the wp_options table. The “wp_” prefix may vary depending on how you created your DB.
This table contains information about all the pre-configured options used in your WordPress site.
4. Identify the Default Categories
By default, WordPress assigns a category named “Uncategorized” for posts and a similar default for WooCommerce products. To find these and deactivate:
For Posts:
Navigate to the wp_options table. Look for the option name default_category in the wp_options table. Set the option_value to “0” (zero).
For WooCommerce Products:
Navigate to the wp_options table on subsequent pages. Look for the option name default_product_cat in the wp_options table. Set the option_value to “0” (zero).
5. Verify Changes
Log in to your WordPress dashboard and navigate to the Posts and Products sections to ensure the default “Uncategorized” categories are no longer applied if you delete or unassign them. It now can be deleted without restrictions.
Disabling default categories “Uncategorized” in WordPress and WooCommerce using phpMyAdmin requires careful manipulation of your database tables. Always back up your database before making changes and verify everything after completing the steps. By customizing your category structure, you can better align your site with your content strategy and improve overall user experience. It will also solve the annoying task of having to control that “Uncategorized” is not assigned automatically, making the process slower.