Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In my Wordpress Blog site i have installed too much plugin and remove also many plugins. In database table "wp_options" size increases approx 13MB and there are many rows which are unused at this time. So I want to remove these unused rows from "wp_options" table and optimized this table as much as low size. But HOW?

share|improve this question
    
What do you mean by Unused, Are you looking to remove rows created by plugins that are no longer in use ? –  amit Jul 12 '12 at 7:04
add comment

2 Answers

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 tables with prefix _yoast_wpseo_ (Note the '%') to delete from SQL table, Similar way you can delete tables created by other plugins too.

share|improve this answer
add comment

i guess you've already dug the path. from where you've seen that table is already taken 13MB? certainly from some GUI tools and possibly using phpMyAdmin. You can clean the unused rows from there.

  1. Take a full backup of the current table. you can copy table using phpMyAdmin's operations tab.
  2. then open wp_options table in phpMyAdmin and remove any suspecting rows.
  3. after removing the any rows, check site to make sure you did not break anything. remember, you will break wordpress and/or any of its extensions (plugins/themes) if you remove any rows that are used by wordpress itself or its current installed extensions.

you can also check the disabled plugins which fields they added. if those plugins did not uninstall/remove those rows, you can delete it yourself and this way you create less risks of breaking stuffs.

Good luck

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.