Glossary

Artisan (CLI)

Artisan is Laravel’s CLI tool. You run it from the command line with php artisan followed by a command name, and it handles tasks like generating boilerplate files, running database migrations, clearing caches, running queued jobs, and interacting with your application. Every Laravel application includes Artisan, and Statamic extends it with additional commands specific to the CMS.

The full list of available commands on any given Statamic install is visible by running php artisan list or php please list — Statamic provides a please wrapper around Artisan that exposes its own commands alongside the core Laravel ones.

Common Statamic Artisan Commands

php please make:addon scaffolds a new addon directory structure. php please stache:clear clears Statamic’s content cache. php please static:clear clears the static cache if you’re using it. php please import:wordpress is the command used in WordPress migration workflows that feed the import script.

For sites running in database mode, Artisan’s migration commands handle schema changes: php artisan migrate runs pending database migrations, and php artisan migrate:rollback reverts the last batch. This is similar in purpose to WordPress’s dbDelta() function used when plugins update the database schema, but Laravel’s migration system is more structured and version-controlled.

Comparison to WordPress WP-CLI

WordPress has a comparable tool called WP-CLI, which provides command-line access to WordPress administration tasks: managing plugins, users, database operations, running cron jobs, and more. WP-CLI is widely used in WordPress development workflows and deployment automation.

Artisan serves a similar role but is more tightly integrated with the application framework. Because Statamic is a Laravel application, Artisan can do anything your PHP code can do — you can write custom commands that interact with your content, automate data transformations, run complex queries, or trigger workflows that would otherwise require a web request. For developers comfortable with Laravel, this is a natural extension of how they already work.

Artisan in Migration Workflows

During a WordPress-to-Statamic migration, Artisan is often involved in running import scripts, transforming content data, generating entry files from exported WordPress content, and clearing caches after bulk operations. Custom Artisan commands are a practical way to encapsulate migration logic — you can run them repeatedly during development and testing without going through a web interface.

Need more clarity?

Book a discovery call and we’ll walk through your situation — what you have, what the migration looks like, and whether it’s the right move.

Book a Discovery Call →