How to install Yoast SEO plugins using Composer

Note: If you do not know what Composer is, please use the normal method of installing the Premium plugins. You can use our installation guides for that. If you want to install Yoast SEO for TYPO3, please refer to the TYPO3 version of this article.

Installing Yoast SEO plugins using Composer

MyYoast offers the ability to install our Premium plugins via Composer. You will find a ‘or install with Composer’ link in the Download section of MyYoast.

Creating a developer token

Before you can install any Premium Yoast plugins using composer you will need to create a token to access our secure repository. You can do this by clicking the ‘create token’ button in the pop-up you receive when you have clicked the ‘or install with composer’ link. You can also create and edit your developer tokens under Account > Profile > Developer tokens.

After you have created the token, go to the Download section of MyYoast and click ‘or install with Composer’ again. Then, you will see a pop-up with all the specific commands you need to install our Premium plugins through Composer. We don’t list all of the commands here because they need the developer token which is unique and you can only get through MyYoast.

For future reference (once you’ve set your developer token) you can find the complete list of Composer commands when you go to the Downloads tab of MyYoast and click the ‘or install with Composer’ link.

Troubleshooting

Caching

Sometimes inaccurate data is stuck in the Composer Cache. Please clear it.

Composer 2.0

Composer 2.0 changes the way repositories are prioritized. You can find more information on the Composer website. In this case, you can use the only attribute. So, your composer.json file should have a line like this:

 "repositories":{
    "my-yoast": {
      "type": "composer",
      "url": "https://my.yoast.com/packages/",
      "only": [
        "yoast/wordpress-seo-premium",
        "yoast/wordpress-seo-local",
        "yoast/wpseo-video",
        "yoast/wpseo-woocommerce",
        "yoast/yoast-news-seo"
      ]
    }
  },

Related articles

Get free SEO tips!