WPML composer

Have anyone solution how to install WPML with composer ?
I read tutorial how to install paid plugins via private repo.
But I am not sure is that correct way…

  1. I have a empty repo with composer.json file
  2. My composer
  "name": "xxx/sitepress-multilingual-cms",
  "description": "",
  "keywords": ["wordpress", "plugin"],
  "homepage": "https://github.com/xxx/sitepress-multilingual-cms",
  "authors": [
      "name": "OnTheGoSystems",
      "homepage": "https://wpml.org/"
  "type": "wordpress-plugin",
  "require": {
    "php": ">=7.1"

My question is what next ? put there unzip wpml files inside and commit ? Or zip? I am afraid I will screw something

You don’t need to install WPML via a private repo. You can use the private-composer-installer package which works well for WPML (I use it) and ACF among others. You will want to add your WPML_USER_ID and WPML_KEY to your .env file.
Add the below and adjust for each package that you need:

  "type": "package",
  "package": {
    "name": "wpml/wpml-multilingual-cms",
    "version": "4.3.19",
    "type": "wordpress-plugin",
    "dist": {
      "type": "zip",
      "url": "https://wpml.org/?download=6088&user_id={%WPML_USER_ID}&subscription_key={%WPML_KEY}&t=1572509351&version={%VERSION}"
    "require": {
      "composer/installers": "^1.4",
      "ffraenz/private-composer-installer": "^4.0"

Then run composer require wpml/wpml-multilingual-cms:*


Hi @aaronjpitts
Thank you so much, it works :slight_smile: I was confused a little bit where is wpml_user_id and wpml_key.
But I found. As other packages with .env changes vagrant reload --provision is required.
Thank you again :slight_smile:


This topic was automatically closed after 42 days. New replies are no longer allowed.