ACF Pro as a Composer dependency (without committing your license key)


I was loading ACF with the keyed download link in a special composer package, but it sometimes required deleting the plugin to get it to update (which disrupted our nice reliable trellis deploys). acf-pro-installer works great, thanks @philippbaschke


Glad that you like it. :blush:


Hey guys,

Previously I was able to deploy without any issues but now I am getting the MissingKeyException error. I am able to use ACF Pro without any issues in the dev environment, the error only appears when I deploy to staging or production.

The acf_pro_key variable exists in each vault.yml file and successfully gets deployed to each remote environment in the .env file. I have re-provisioned the server but continue to get the error when I try to deploy.

Any help would be great :slight_smile:


Unfortunately I never used Trellis so I can’t really help in that matter. I suspect that the problem occurs in the loadDotEnv method. Maybe the .env file is not in the current working directory (getcwd())?

Try to find out if the .env file is loaded. If it is loaded you have to check the environment after it is loaded. getKeyFromEnv should be the right place to do it :slight_smile:

Hope that helps. Please let us know if you find out what the problem is (because you don’t seem to be the first one to have it) :blush:


I started getting this issue out of nowhere also, it does not let me deploy to remote servers. Did you happen to solve this?

EDIT: Fixed by removing ACF, running composer update, pushing to remote, then adding it back in.