Cleaning unnecessary database tables means deleting tables that were created before by some plugin and now are not in use on your website. Removing such tables lightens up your MySQL database. In this lesson, you will learn about cleaning up a database manually and with plugins’ help.
Before making any changes, always ensure and be careful when deleting database tables, as removing the wrong ones can break your WordPress site. Always keep a full WordPress database backup.
Step-1, access your hosting’s cPanel and locate the phpMyAdmin option under the Databases section. Click on it to access the database management interface.
Step-2 In phpMyAdmin, find your WordPress database on the left-hand side panel. Click on the name of the database to view the tables it contains.
Step-3 Now identify unnecessary tables. Unnecessary tables might come from uninstalled plugins or themes. Tables that don’t seem to match the standard WordPress table names like wp_posts
, wp_users
, or wp_options
may be safe to delete. Some tables have a prefix based on the name of a plugin (e.g., wp_woocommerce_*
for WooCommerce).
Step-4 Once you identify the tables you no longer need, select them by checking the box next to each table. Then, scroll down and choose Drop from the options in the dropdown menu. Confirm the deletion.
Automatically Identify & Clean MySQL Database Tables
Alternatively, You can clean your database with a plugin. Plugins such as WP-Optimize or Advanced Database Cleaner let you automatically identify and clean up unnecessary tables without manually going into phpMyAdmin.
These WordPress plugins provide you with an easy way to clean up unnecessary database tables from your WordPress site.