Component deployment failure
This topic discusses how to recover from a failed component deployment. Typical examples include components that have dependencies that are not met by your environment, such as incompatible PHP versions.
You can recover from a failed deployment in any of the following ways:
- Restore a snapshot
- Remove the component from the
composer.json
and redeploy the environment
Clean, remove, and redeploy
To clean up from the previous deployment, you must log in to the remote environment and manually clear the contents of the Magento var
directory. And then you must remove the component from the composer.json
file in your local environment and redeploy.
To clean the var
directories:
-
On your local workstation, change to the Cloud project root directory.
-
Use a SSH to log in to the remote environment.
1
magento-cloud environment:ssh
-
Clear the
var
directories.1
rm -rf var/*
To remove the component:
-
On your local workstation, change to the Cloud project root directory.
-
Clear the cache.
1
composer clear-cache
-
Remove the component from the
composer.json
file.1
composer remove <component-name>:<version>
If the following message displays, you do not need to do anything further:
1
Package "<name>:<version>" listed for update is not installed. Ignoring.
-
Wait while the dependencies are updated.
-
Add, commit, and push code changes.
1
git add -A
1
git commit -m "<message>"
1
git push origin <environment-ID>