Skip to main content

wp transient get

Overview

Inspect the stored value of any transient by name — useful for debugging cache hits, verifying what data a plugin has cached, and understanding transient content without writing PHP.

What It Does

wp transient get calls get_transient() and returns the stored value. It works for both regular and network transients (multisite).

Syntax

wp transient get <key> [--network] [--format=<format>]

Options

FlagDescription
KEYTransient name (without _transient_ prefix)
--networkGet a network transient (get_site_transient())
--format=FORMATtable, json, yaml, serialized

Basic Usage

wp transient get my_plugin_api_data

Output (string):

{"rate":1.23,"currency":"USD","timestamp":1710000000}
wp transient get my_plugin_api_data --format=json

Output:

{"rate":1.23,"currency":"USD","timestamp":1710000000}

Check If Transient Exists

wp transient get nonexistent_key

Output:

Warning: Transient with key "nonexistent_key" is not set.

Network Transients

wp transient get update_core --network

Output:

...serialised WP update check object...

Quick Reference

wp transient get <key>                  # Get value
wp transient get <key> --network # Network transient
wp transient get <key> --format=json # JSON output

Next Steps