If you receive an error when installing plugins or Craft CMS updates, it is usually due to an incorrect PHP version listed in composer.json. Use the following steps to resolve the issue:

1.

Open craft/composer.json

2.

After the "require" values, manually add a PHP version. Note that this PHP version should not be greater than the version you're using on your server (either MAMP Pro or the production server)

{
    "require": {
        **** Leave this the same ****
    },
    "config": {
      "platform": {
        "php": "7.0"
      }
    }
}
3.

Go into terminal and navigate to your project's /craft directory. Run "composer update". Dependencies will be updated and appear in your repository

4.

Try running updates again. This should fix the issue (on both DEV and PROD environments).

Related Articles


Having trouble finding something?

Submit the content update/request form, and we’ll be sure to make the change or find the answer.