---
title: "Delete WordPress Transients Using WP-CLI"
description: "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..."
url: https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/delete-wordpress-transients-using-wp-cli/
date: 2018-02-06
modified: 2023-03-23
author: "InMotion Hosting Contributor"
categories: ["WP-CLI"]
type: post
lang: en
---

# Delete WordPress Transients Using WP-CLI

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](#expired-transients)
- [Delete All Transients Using WP-CLI](#all-transients)

WARNING: We strongly recommend [backing up your database](https://www.inmotionhosting.com/support/edu/cpanel/cpanel-backups/#database/) before using the commands in the tutorial below.

## Delete Expired Transients Using WP-CLI

1. [SSH into your server](/support/server/ssh/shared-reseller-ssh/) as the cPanel user that owns the website you want to delete expired transients for.
2. Use the cd command to switch to the [document root directory of your website](/support/website/where-to-upload-files/). For example:cd public_html/my_website**NOTE: **Be sure to replace **public_html/my_website** with the actual path to the document root directory of your website.
3. Run the following command:wp transient delete-expiredThe following output will be displayed once the command finishes running: `exampl3@example.com [~/public_html]# wp transient delete-expired Success: 32 expired transients deleted from the database. `

## Delete All Transients Using WP-CLI

1. [SSH into your server](/support/server/ssh/shared-reseller-ssh/) as the cPanel user that owns the website you want to delete all transients for.
2. Use the **cd** command to switch to the [document root directory of your website](/support/website/where-to-upload-files/).For example: cd public_html/my_website**NOTE: **Be sure to replace **public_html/my_website** with the actual path to the document root directory of your website.
3. Run the following command:wp transient delete-allThe following output will be displayed once the command finishes running: `exampl3@example.com [~/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](https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/), the command-line interface for WordPress, and how to streamline your WordPress maintenance workflows!
