Glossary

Composer

Composer is the package manager for PHP. It handles downloading, installing, and updating PHP libraries and applications based on a composer.json configuration file in your project root. Running composer install sets up all the dependencies a project needs. Running composer update pulls in newer versions according to your version constraints. If you’ve worked with npm in the JavaScript world, Composer fills the same role for PHP.

Statamic is installed and updated via Composer. A new Statamic project starts with a command like composer create-project statamic/statamic my-site, which sets up a fresh Laravel application with Statamic installed as a dependency. Add-ons from the Statamic marketplace are also installed via Composer. Keeping Statamic updated means running composer update statamic/cms and committing the updated composer.lock file.

WordPress works differently. It’s distributed as a zip file you download and upload to your server. Updates happen through the WordPress admin interface or WP-CLI. There’s no equivalent of Composer in the standard WordPress workflow, though tools like Bedrock (from Roots) do bring Composer-based dependency management to WordPress projects. Most WordPress users have never needed to touch Composer.

For developers coming from a WordPress background, Composer is one of the bigger workflow changes when moving to Statamic. The command line is more central to the development process. That said, it’s not complicated — you mostly need a handful of commands (install, update, require) and an understanding of semantic versioning so you can read version constraints in composer.json.

A few things worth knowing: Composer requires PHP to be installed locally on your development machine. It writes a vendor/ directory containing all installed packages — this directory is large and should be excluded from version control via .gitignore. The composer.lock file, however, should be committed; it records the exact versions installed so every developer and deployment environment gets identical dependencies.

If you’re setting up a local Statamic development environment for the first time, the migration guide covers the tooling setup in context. Understanding Composer basics will make the rest of the Statamic development workflow considerably easier to follow.

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 →