WP-Battery CLI Commands
A WordPress CLI plugin for creating and managing WP-Battery components
★ 0stars
173composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/larsgowebdev/wp-battery-cli/archive/refs/heads/production.zipAlso on Packagist as larsgowebdev/wp-battery-cli:
composer require larsgowebdev/wp-battery-cliFrom the readme
WP-Battery CLI Plugin
A WordPress CLI plugin that provides commands for creating and managing WP-Battery theme components. This plugin extends WP-CLI to streamline the development workflow with WP-Battery themes.
Requirements
- PHP = 8.1
- WordPress = 6.5 (Composer-based), Bedrock recommended
- WP-CLI installed and configured
- WP-Battery theme framework installed
Installation
1. Install the plugin with composer:
2. Make sure the plugin is activated:
3. Verify installation:
Available Commands
Initialize WP-Battery Structure
Creates the required folder structure for a WP-Battery theme.
Usage:
This creates the following structure in your theme:
Create Block
Creates a new block with required files and structure.
Required arguments:
- --name: Identifier of the block, it will be registered to that name and the folder structure will be named after it.
- --title: Name of the block, displayed in the WP admin area
Usage:
Creates:
Create Page Template
Creates a new page template with required files.
Required arguments:
- --name: Identifier of the page, the template will be named after it.
Usage:
Creates:
Create Menu Configuration
Creates a new menu configuration file.