CLI
Lumbermill ships with a set of WP-CLI commands under the wp instance namespace.
They are provided by the instance-cli mu-plugin and are only available when WP-CLI is active.
activate
Section titled “activate”One-time setup commands that enable an opt-in feature, scaffold a starter class, and update the relevant config file.
activate ajax
Section titled “activate ajax”wp instance activate ajax- Creates
app/Ajax/Action/ExampleAjaxAction.php - Sets
enabled => trueinconfig/ajax.php
See Advanced → AJAX for the full guide.
activate rest-api
Section titled “activate rest-api”wp instance activate rest-api- Creates
app/RestAPI/ExampleRestAPI.php - Sets
enabled => trueinconfig/rest-api.php
See Advanced → REST API for the full guide.
Scaffold classes and wire them up automatically.
All make commands accept a --confirm=true flag to skip the preview confirmation prompt.
make ajax
Section titled “make ajax”wp instance make ajax <name>Generates an AJAX action class in app/Ajax/Action/. The AjaxAction suffix is added automatically.
wp instance make ajax GetPosts# → app/Ajax/Action/GetPostsAjaxAction.phpmake rest-api
Section titled “make rest-api”wp instance make rest-api <name>Generates a REST API endpoint class in app/RestAPI/. The RestAPI suffix is added automatically.
wp instance make rest-api Cats# → app/RestAPI/CatsRestAPI.phpmake hook
Section titled “make hook”wp instance make hook <name>wp instance make hook <name> --register=trueGenerates a hook class in app/Hook/. With --register=true (or confirming the prompt) it also adds the class to config/hooks.php.
wp instance make hook ThemeColours --register=true# → app/Hook/ThemeColoursHook.php# → added to config/hooks.phpmake provider
Section titled “make provider”wp instance make provider <name>Generates a provider class in app/Provider/ and a matching config file in config/. Also registers the provider in functions.php via $config->addProvider().
wp instance make provider ThemeOptions# → app/Provider/ThemeOptionsProvider.php# → config/theme-options.php# → $config->addProvider(new \App\Provider\ThemeOptionsProvider) added to functions.phpmake classmap-post
Section titled “make classmap-post”wp instance make classmap-postwp instance make classmap-post --post-type=<slug>Generates a Timber post classmap class in app/Classmap/Post/ and registers it. Prompts for a post type if --post-type is omitted.
make classmap-term
Section titled “make classmap-term”wp instance make classmap-termwp instance make classmap-term --taxonomy=<slug>Generates a Timber term classmap class in app/Classmap/Term/ and registers it. Prompts for a taxonomy if --taxonomy is omitted.
make classmap-menu
Section titled “make classmap-menu”wp instance make classmap-menuwp instance make classmap-menu --menu=<slug>Generates a Timber menu classmap class in app/Classmap/Menu/ and registers it.
make classmap-menu-item
Section titled “make classmap-menu-item”wp instance make classmap-menu-itemwp instance make classmap-menu-item --menu=<slug>Generates a Timber menu item classmap class in app/Classmap/MenuItem/ and registers it.
make util
Section titled “make util”wp instance make util <name>Generates a utility class in app/Util/. The Util suffix is added automatically.
wp instance make util String# → app/Util/StringUtil.phpmake template
Section titled “make template”wp instance make template <name>Generates a WordPress page template: a PHP controller file and a matching Twig view. Use kebab-case for the name.
wp instance make template my-page# → templates/my-page.php# → views/templates/my-page.twigThe PHP file includes the Template name: comment that WordPress uses to expose the template in the page editor. The Twig file extends layouts/base.twig and includes a content block ready to fill in.
make field-group
Section titled “make field-group”wp instance make field-groupInteractive command that scaffolds an ACF field group for any content type. Prompts for:
- Location type — all 22 ACF location rules (Post Type, Page Template, Taxonomy, etc.)
- Location value — dynamic select list for supported types (post types, taxonomies, templates, page types, user roles, nav menus, options pages, etc.), or free-text input for the rest
- Field group name — kebab-case name for the group (e.g.
content,meta)
New content type folder — creates the folder, index.php (with location rule), and the field group file. No wiring needed: acf-php/index.php autoloads every nested index.php via a glob, so the new folder is picked up automatically:
acf-php/post-types/post/├── index.php ← location rule + register call└── content.php ← createFieldGroup('Post - Content', ...)Existing content type folder — creates only the field group file and appends the load + register lines to the existing index.php.
Field group title is automatically prefixed with the location label, e.g. Post - Content, Front Page - Hero.

