WPML installation via Composer using private-composer-installer no longer works

Hi everyone,
I wanted to share that, as of recent tests, installing WPML via Composer using the private-composer-installer method no longer works.
I was following the setup documented in this post:
WPML + Composer on Roots Discourse

I have correctly configured auth.json at the root of my project with my WPML credentials. Even so, Composer fails when trying to download the plugin ZIP files, returning a 403 Forbidden. I also tested the direct download URLs via curl and still receive a 403 response. The links themselves are valid when opened in a browser.
Has anyone else encountered this issue recently? Are there alternative ways to handle WPML installations in a Bedrock setup via Composer without running into authentication or 403 errors?

Thanks in advance for any insight!

FWIW, I tested the direct link and it works for me. Try logging into WPML, copy the download url from your WPML dashboard, and try to open it in a private window. The zipfile should be downloaded correctly. Then compare the url in your composer.json file to the download url you just copied, maybe there is a discrepancy.

1 Like

Did you add your credentials in your .env file, or in a auth.json file? AFAIK, they should be in the .env file.

WPML_USER_ID=xxx
WPML_KEY=xxx
1 Like

Same issue here. Was working fine before, but now it returns a 403 Error. Tested it with credentials in auth.json and in .env.

1 Like

@leodudedev I’ve contacted the WPML Support regarding this issue. WPML now blocks composer user agents, and they said that it won’t be whitelisted at this time. They are tracking this as a feature request, so for now installing via composer isn’t possible (unless you host your own repository for this).

You can see the entire conversation I had with the support here: 403 error when installing WPML via ffraenz/private-composer-installer - WPML

3 Likes

Thanks a lot.
I suspected that might be the case.