wp transient <command>

Manipulate the WordPress Transient Cache.

By default, the transient cache uses the WordPress database to persist values between requests. When a persistent object cache drop-in is installed, the transient cache also uses the WordPress Object Cache.

EXAMPLES EXAMPLES

# Set transient.
$ wp transient set sample_key "test data" 3600
Success: Transient added.

# Get transient.
$ wp transient get sample_key
test data

# Delete transient.
$ wp transient delete sample_key
Success: Transient deleted.

# Delete expired transients.
$ wp transient delete --expired
Success: 12 expired transients deleted from the database.

# Delete all transients.
$ wp transient delete --all
Success: 14 transients deleted from the database.

Top ↑

SUBCOMMANDS SUBCOMMANDS

Name Description
wp transient delete

Delete a transient value.

wp transient get

Get a transient value.

wp transient set

Set a transient value.

wp transient type

Determine type of transients implementation.

Command documentation is regenerated at every release. To add or update an example, please submit a pull request against the corresponding part of the codebase.