DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Transients are a simple and standardized way of temporarily storing cached data in the database by giving it a custom name and a timeframe after which it will expire and be deleted. But sometimes, transients set by WP and countless plugins can take a lot of space in your database. Using a simple SQL query, you can easily getting rid of them.

First of it all, login to your phpmyadmin and choose your WordPress database. Once done, click on the sql button to open the sql command window.
Then, simply paste the following sql command and execute it.

DELETE FROM `wp_options` WHERE `option_name` LIKE ('%\_transient\_%');

Credit: Stack Overflow

Want more super useful SQL queries? Check out this article on Cats Who Code.


Leave a Comment

Your email address will not be published. Required fields are marked *