Installing ACF Pro with Composer and License Secrets
Composer-based installation gives you traceable, version-locked ACF Pro deployments.
Practical Use Cases
Use Case 1: Add ACF Pro repository and constraints to composer.json
composer.json
{
"require": {
"advanced-custom-fields/advanced-custom-fields-pro": "6.3.1"
},
"repositories": [
{
"type": "composer",
"url": "https://connect.advancedcustomfields.com"
}
]
}
install dependencies
composer install
Expected output
Installing advanced-custom-fields/advanced-custom-fields-pro (6.3.1)
Generating autoload files
Use Case 2: Configure CI secret for Composer auth
CI environment export
export COMPOSER_AUTH='{"http-basic":{"connect.advancedcustomfields.com":{"username":"license-key","password":"x"}}}'
composer install --no-interaction --prefer-dist
Expected output
Loading composer repositories with package information
Installing dependencies from lock file
Hands-On Practice
- Add ACF Pro package requirement and run
composer install. - Store Composer auth in CI secret manager and test non-interactive install.
- Verify plugin activation with
wp plugin list --status=active | grep advanced-custom-fields.
What's Next
- Continue to Production Deploy Patterns with Composer Lockfiles.
- Review this module context in Module 11 Overview.
- Related lesson: Installing ACF and Preparing Environments.