Tooling & Dependencies
Composer Package Management
This project uses Composer to manage the WordPress core, plugins, and PHP-level dependencies. This ensures a consistent environment across different development setups.
Installing Dependencies
To install all required packages defined in composer.json, run:
composer install
Adding New Plugins
Plugins are sourced via WPackagist. To add a new plugin, use the wpackagist-plugin prefix:
composer require wpackagist-plugin/contact-form-7
Autoloader
The project utilizes the standard Composer autoloader. To use installed PHP libraries within your custom themes or plugins, ensure the autoloader is required (handled automatically in the base setup):
require_once __DIR__ . '/vendor/autoload.php';
NPM Scripts & Frontend Tooling
Frontend assets, including stylesheets and JavaScript bundles, are managed via NPM. The build pipeline handles compilation, minification, and linting.
Installation
Install frontend dependencies before running build scripts:
npm install
Available Scripts
The following scripts are available for managing the asset pipeline:
| Command | Action |
| :--- | :--- |
| npm run dev | Compiles assets for development with source maps. |
| npm run watch | Monitors files for changes and re-compiles automatically. |
| npm run build | Compiles and minifies assets for production deployment. |
| npm run lint | Runs ESLint and Stylelint to check for code quality issues. |
Usage Example
For active development with hot-reloading (if configured) or automatic recompilation:
npm run watch
WP-CLI Integrations
WP-CLI is the primary interface for managing the WordPress installation from the command line. This project includes configurations to streamline common tasks.
Core Management
Verify the installation and check the current version of WordPress:
wp core version
Plugin & Theme Operations
You can activate or deactivate components without accessing the admin dashboard:
# Activate the primary theme
wp theme activate your-theme-name
# Update all plugins managed by WP-CLI
wp plugin update --all
Database Operations
Commonly used for environment synchronization:
# Export the current database
wp db export backup.sql
# Import a database dump
wp db import data.sql
# Search and replace strings (useful for URL migrations)
wp search-replace 'http://old-url.local' 'https://new-url.com'
Custom Commands
If the project includes internal WP-CLI commands (located in includes/cli/), they are registered automatically. You can list all available custom commands by running:
wp help