I'm working on a live site and I'm trying to install a module using composer, but the proccess is killed. I found out that is due to server RAM. So, I am unable to work with composer, is there any solution?
Composer is a notorious memory hog, and some web hosts will not allow you to run it on a production server. Even if it is allowed, it is not necessarily a good idea to deploy things this way.
The preferred method is to keep your project in version control (e.g.,
git) and then check out a feature branch in your local development environment.
Install the module using Composer in your feature branch, perform any code review, testing, or QA that you need to do, and then do one of the following:
- if you have some form of Continuous Integration / Continuous Delivery set up, you can merge the code into
masterbranch and use a git hook to automate build and deploy to the target hosting environment
- if you don't have any CI/CD tools, build your site in the local environment and use something like
rsync(or SFTP) to deploy it to the remote server