Docs

WP-CLI

2 min readUpdated October 28, 2026

Manage fonts from the command line with 10 wp nahnu-fonts commands. They’re handy for scripts, deployments and setting up many sites the same way.

Commands#

CommandDoes
wp nahnu-fonts list [--format=<format>]Lists fonts with id, name, source, active, styles and CSS variable. Formats: table (default), json, csv, yaml
wp nahnu-fonts add-google <family> [--weights=<list>] [--italic] [--subsets=<list>] [--variable]Downloads a Google Fonts family through the source set in Settings. Defaults: weights 400,700, subsets latin. --variable needs the Google source
wp nahnu-fonts enable <id>...Switches fonts on
wp nahnu-fonts disable <id>...Switches fonts off (kept, but not loaded)
wp nahnu-fonts delete <id>...Deletes fonts and their files
wp nahnu-fonts rebuildRebuilds the stylesheet
wp nahnu-fonts export <file> [--fonts=<ids>]Exports fonts and settings to a .zip. Default: all fonts
wp nahnu-fonts import <file>Imports a .zip exported from Nahnu Fonts
wp nahnu-fonts setting <key> [<value>]Shows a setting, or changes it when you give a value
wp nahnu-fonts adobe <project-id> or --disconnectConnects (or refreshes) an Adobe Fonts project, or disconnects it

Font ids are shown by wp nahnu-fonts list. They’re based on the family name, for example inter or open-sans.

Settings keys#

For wp nahnu-fonts setting, use true or false for switches and a comma-separated list for default_subsets.

KeyValuesDefault
sourcebunny, googlebunny
font_displayswap, fallback, optional, block, autoswap
default_subsetse.g. latin,latin-extlatin
block_editortrue, falsetrue
css_variablestrue, falsetrue
purge_cachetrue, falsetrue
inline_csstrue, falsefalse
block_google_fontstrue, falsefalse
builder_google_fonts_offtrue, falsetrue
jooosi_compattrue, falsefalse (on after a move)
delete_on_uninstalltrue, falsefalse
adobe_project_iduse wp nahnu-fonts adobe insteadempty
integrations_offintegration names, e.g. elementor,bricksempty

Examples#

Set up a new site with two families:

wp plugin activate nahnu-fonts
wp nahnu-fonts add-google "Inter" --weights=400,600,700 --subsets=latin,latin-ext
wp nahnu-fonts add-google "Lora" --weights=400,700 --italic
wp nahnu-fonts setting font_display swap

Copy fonts from staging to live:

# On staging
wp nahnu-fonts export /tmp/fonts.zip
# On live
wp nahnu-fonts import /tmp/fonts.zip

Get the variable version of a font:

wp nahnu-fonts setting source google
wp nahnu-fonts add-google "Inter" --variable

Check which fonts are active, as JSON:

wp nahnu-fonts list --format=json