Appearance
Use WP-CLI
If you manage WordPress from the command line, the show.fm plugin adds wp showfm commands to WP-CLI. Run them in your WordPress folder on the server.
On a multisite network, add --url= with the site's address to every command. Each site connects separately.
| Command | What it does |
|---|---|
wp showfm connect | Connects the site to show.fm with a site key. |
wp showfm status | Shows the connection. |
wp showfm sync | Picks up episode changes from show.fm now. |
wp showfm sync status | Shows where the sync is, without contacting show.fm. |
wp showfm disconnect | Disconnects the site. |
wp showfm migrate-embeds | Swaps players from other podcast hosts for show.fm blocks. |
wp showfm cache flush | Clears the plugin's cached show and episode data. |
Connect
In show.fm, open your podcast and go to Podcast Settings → Connected sites.
Under Add a site with WP-CLI, click Create site key.
Enter your current password, choose whether to include transcripts, and click Create site key.
Copy the key. This is the only time you'll see this key.
On the server, run the command (show.fm's Copy command copies it):
shwp showfm connectPaste the key when asked. In a terminal, the command asks with the input hidden, so the key stays out of your shell history.
The key connects that one show, and must be used within 24 hours. The site must use https, be reachable on the internet and have the plugin active, because show.fm checks with the plugin before it accepts the key. If the site was already connected, that connection stays until the new one succeeds.
Other ways to give the key, for scripts or anywhere without a terminal:
- Set the
SHOWFM_KEYenvironment variable, then runwp showfm connect. The command uses it and doesn't ask. - Pipe it in with
--key=-, for example from a password manager:pass show showfm/site-key | wp showfm connect --key=-. --key=YOUR_SITE_KEYalso works, but the key then stays in your shell history and shows in the process list, so the command warns you. Prefer one of the ways above.
Check the connection
sh
wp showfm statusIt shows the connection's state, the key's last four characters, when the key expires, and when the site last synced and was last pinged by show.fm.
Sync now
The site checks for changes every 15 minutes, and straight away when show.fm pings it. To check now:
sh
wp showfm sync| Option | What it does |
|---|---|
--dry-run | Shows the next page of changes (up to 20) without applying them. |
--from-start | Goes through every change from the beginning. Existing posts are kept, and edits made in WordPress stay protected. |
To see the sync's position, pending reports and recent problems without contacting show.fm:
sh
wp showfm sync statusDisconnect
sh
wp showfm disconnectAdd --yes to skip the confirmation.
The command asks show.fm to cancel the site's key, then removes the key from the site and stops its scheduled syncs, whatever show.fm answers. If show.fm didn't confirm, the command says so and links to Connected sites in show.fm, where you can disconnect the site yourself. Posts the site already made stay.
Clear the cache
Players, lists and the block editor's show and episode lookups read a copy of show.fm's data that the plugin keeps on your site and refreshes in the background. To throw that copy away, for example after fixing an episode's details in show.fm:
sh
wp showfm cache flushPages keep showing each block's saved copy until the background refresh fetches the data again. Nothing else in WordPress's cache is touched.
On a multisite network, add --network to clear the cache on every site. On a single site, --network is refused.
Migrate embeds
wp showfm migrate-embeds runs the same migration as the Migrate tab. It needs a connected site, and an administrator passed with --user=.
Run a dry run, which scans and reports without changing anything:
shwp showfm migrate-embeds --dry-run --user=adminRead the table. Each player has its post, host, status, how it matched and its candidate episodes.
Apply the dry run you just read:
shwp showfm migrate-embeds --resume --yes --user=admin
--yes applies only the saved dry run. It never scans again, so run a new dry run after you change anything.
| Option | What it does |
|---|---|
--dry-run | Scans and reports without changing posts. It always wins, even with --yes. |
--yes | Swaps the matched players, and any you chose with --choose. Needs a completed dry run. |
--resume | Carries on a scan that stopped, or applies the completed dry run. |
--post=<id> | Scans only this published post or page. |
--choose=<choices> | Picks episodes for players that need a choice, as post:embed:episode with the post ID, the player's number in that post (from 1) and the episode ID. Separate several with commas. |
--batches=<number> | Stops after this many batches of 50 posts. Carry on with --resume. |
--reset | Throws away a scan that stopped part way, without contacting show.fm. Use it alone, or with --dry-run to start afresh. |
--format=<format> | table (the default) or json. |
For example, to pick episode 11111111-2222-4333-8444-555555555555 for the first player in post 42:
sh
wp showfm migrate-embeds --yes --resume --choose=42:1:11111111-2222-4333-8444-555555555555 --user=adminIf show.fm is busy or can't be reached, the scan keeps what it already has. Run --dry-run --resume to carry on later. While another administrator is running a migration in the Migrate tab, the command refuses to change anything. Try again when they finish.