Delete WordPress Transients Using WP-CLI Updated on March 23, 2023 by InMotion Hosting Contributor 1 Minutes, 26 Seconds to Read WordPress utilizes Transients to manage the cache. If you are experiencing issues with cached pages or a plugin’s functionality, deleting the transients (stored in the database for the website) may resolve the issue. In this guide, you will learn how to delete transients using the WordPress Command Line Interface (WP-CLI). Delete Expired Transients Using WP-CLI Delete All Transients Using WP-CLI WARNING: We strongly recommend backing up your database before using the commands in the tutorial below. Delete Expired Transients Using WP-CLI SSH into your server as the cPanel user that owns the website you want to delete expired transients for. Use the cd command to switch to the document root directory of your website. For example:cd public_html/my_websiteNOTE: Be sure to replace public_html/my_website with the actual path to the document root directory of your website. Run the following command:wp transient delete-expiredThe following output will be displayed once the command finishes running: [email protected] [~/public_html]# wp transient delete-expired Success: 32 expired transients deleted from the database. Delete All Transients Using WP-CLI SSH into your server as the cPanel user that owns the website you want to delete all transients for. Use the cd command to switch to the document root directory of your website.For example: cd public_html/my_websiteNOTE: Be sure to replace public_html/my_website with the actual path to the document root directory of your website. Run the following command:wp transient delete-allThe following output will be displayed once the command finishes running: [email protected] [~/public_html]# wp transient delete-all Success: 38 transients deleted from the database. Congratulations! Now you know how to troubleshoot caching issues by deleting expired WordPress transients in the database. Learn more about WP-CLI, the command-line interface for WordPress, and how to streamline your WordPress maintenance workflows! Share this Article IC InMotion Hosting Contributor Content Writer InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals! More Articles by InMotion Hosting Related Articles Install and Configure WP-CLI How to Create and Delete a WordPress Page Using WP-CLI Install a Theme Using WP-CLI Install WordPress Using WP-CLI Manage WordPress Comments Using WP-CLI Update WordPress Using WP-CLI Manage WordPress Users Using WP-CLI WP-CLI search-replace Command Delete WordPress Transients Using WP-CLI Manage WordPress Plugins with WP-CLI