Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Core Command

Core Command Laravel Package

wp-cli/core-command

WP-CLI package providing the wp core command set to download, install, update, and manage WordPress core. Includes update checking via the Version Check API with flags for major/minor comparisons, forced checks, and flexible output formats.

View on GitHub
Deep Wiki
Context7

Downloads, installs, updates, and manages a WordPress installation.

Frequently asked questions about Core Command
How do I use wp-cli/core-command in a Laravel application?
Use it as a CLI dependency rather than a native Laravel package. Install WP-CLI or the Composer package in your environment, then call commands such as wp core install through Symfony Process or a custom Artisan command. Keep the integration thin and pin the WP-CLI version to avoid breaking changes.
How do I install wp-cli/core-command with Composer?
Run composer require wp-cli/core-command to add the package to a project, but note that the package provides the core command set and may not install a global wp binary by itself. For a usable CLI, install WP-CLI globally or require the WP-CLI bundle, then verify that wp core version runs in your environment. In Laravel deployments, ensure the wp binary is available to the same user and PATH as Artisan.
Does wp-cli/core-command work with Laravel 10 or Laravel 11?
It does not depend on Laravel directly, so compatibility is determined by your PHP version and WP-CLI rather than the Laravel release. Laravel 10 and 11 applications can invoke it through Artisan or Symfony Process when WP-CLI is installed and PHP requirements are met. Test the exact pinned WP-CLI and Laravel versions in CI before production use.
How can I check for WordPress core updates from Laravel?
Run wp core check-update with the JSON format and parse the output in Laravel. The command uses the WordPress Version Check API and can return fields such as version, update_type, and package_url. Use Symfony Process so you can capture exit codes and stderr reliably.
What do the --minor, --major, and --force-check options do in wp core check-update?
The --minor option compares only the first two parts of the version number, while --major compares only the first part. The --force-check option bypasses the transient cache and performs a fresh update check. You can combine these with --field, --fields, and --format to control output.
Can I create a custom Artisan command to run wp core install?
Yes, you can wrap wp core install in an Artisan command and pass the URL, title, admin user, admin password, and admin email as arguments. Prefer Symfony Process with an argument array instead of building a raw shell string to reduce injection risk. Check the process exit code and surface WP-CLI stderr as a Laravel command error.
What are the database risks of using WordPress and Laravel together?
WordPress expects its own tables and may conflict with Laravel migrations if both share the same schema. Use a separate database or a distinct WordPress table prefix such as wp_ to isolate the installations. Also account for different database users, backups, and migration workflows.
How should I test wp core commands in a Laravel CI pipeline?
Provision a disposable WordPress environment with MySQL or MariaDB and install WP-CLI in the container. Run commands like wp core download, wp core install, and wp core check-update against that isolated environment. Assert on exit codes and JSON output, then tear down the database so tests remain repeatable.
Is it safe to expose wp-cli/core-command through Artisan in production?
Treat any command that installs, updates, or modifies WordPress as privileged. Restrict Artisan access to trusted operators, avoid exposing it through public HTTP routes, and validate all arguments before invoking WP-CLI. Run with least-privilege filesystem and database credentials and log command execution.
What alternatives exist to wp-cli/core-command for managing WordPress from Laravel?
WP-CLI remains the standard for core install, update, and version checks, and the core-command package is the source of its wp core commands. Alternatives include the WordPress REST API for runtime operations, custom Composer scripts for downloads, and SSH-based WP-CLI execution from Laravel. Choose based on whether you need full lifecycle management or only content and API interactions.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo