How to reduce the size of the wordpress wp_options table

Web programming topics
Post Reply
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

How to reduce the size of the wordpress wp_options table

Post by Neo » Fri Nov 29, 2013 9:40 pm

If you have noticed an abnormal increase of wp_options tables, it is probably due to a plugin that keep on adding transient entries. The first thing you need to do is to find the plugin and then disable it. It is not easy to find the plugin, so you may disable all plugins (probably using database by adjusting 'active_plugins' record) and then enable one by one. It is also good if you can login to mysql server and execute SHOW PROCESSLIST; to see the ongoing process list of Mysql server.

Later on you may execute the following SQL string to delete the invalid entries.

Code: Select all

DELETE FROM `wp_options` WHERE `option_name` LIKE ('_transient_%');
Hope that helps!
Post Reply

Return to “Web programming”