Last Updated: February 25, 2016
·
31.04K
· pothi

Delete All Existing WordPress Transients in MySQL Database

WordPress Transients API offers a simple and standardized way of storing cached data in the database. It is also possible to use APC or memcached to store the transients, thus increasing the overall performance of a WordPress site. When we do so, the existing transients are not removed from the database. The following commands help to do just that...

DELETE FROM `wp_options` WHERE `option_name` LIKE ('_transient_%');
DELETE FROM `wp_options` WHERE `option_name` LIKE ('_site_transient_%');

Remember to use the correct table prefix. In the above example, the default table prefix has been used.