clean wp_options table unused rows

There is a plugin called – Clean Options which promises to remove all unused entries from wp_options table. NOTE – that plugin hasn’t been updated for 2 years, you must do backup before using it.

To remove all data manually

You have to manually look into database for unused tables or rows and use the SQL query to delete those permanently from the database.

  • Most of the plugins create new tables with a custom prefix such as if you installed yoast seo plugin it will create tables with prefix _yoast_wpseo_ that makes easy to identify All the tables created by that plugin and If you’re no longer using them you can drop them by using SQL command similar to that of given below.

      DELETE FROM wp_options WHERE option_name LIKE ‘_yoast_wpseo_%’;
    

Note

That SQL query will select all rows with prefix _yoast_wpseo_ (Note the ‘%’)
to delete from SQL table. Similar way you can delete tables created by other plugins too.