Best way to install private/paid plugins with Composer?

Thanks for the quick response Nick,

I think I was setting the version wrong, I was setting a version number when it needs to be the branch (?), your link to the composer docs pointed me in the right direction.


For future reference for others, this worked:

Your project’s composer.json needs:

{
      "type": "vcs",
      "url": "git@bitbucket.org:accountname/reponame.git"
}

in your repositories list,

"accountname/reponame":"dev-master"

listed as a requirement and your external plugin only needs to contain:

{
    "name": "accountname/reponame",
    "version": "master",
    "type": "wordpress-plugin",
    "dist": {
        "url": "git@bitbucket.org:accountname/reponame.git",
        "type": "git"
    }
}
4 Likes