Question

My shared hosting doesn't allow me to use composer install (php memory limit error). So I had to install to my clone magento2 on xampp server.

http://wiki.ebizmarts.com/installation-guide-m4m2 below are the two commands i use.

composer require mailchimp/mc-magento2 1.0.32
composer require ebizmarts/mailchimp-lib

i can see from my local copy that files are created in

vendor\mailchimp\mc-magento2\
vendor\ebizmarts\mailchimp-lib\

My question is can I just copy this two folder and upload to my live magento2 server, and run php bin/magento setup:upgrade ?

Was it helpful?

Solution

You can, however you can set your own memory limit on demand.

php -d memory_limit=512M composer install

If not, do as you suggested and run the install somewhere else just rsync the /vendor folder. However I would recommend to still run the dumpautoload on the server

php -d memory_limit=512M composer dumpautoload

That will generate all the necessary autoloader files for the environment.

However, if running a composer install already gives you memory issues, I don't think bin/magento will run without problems.

So I would still do

php -d memory_limit=512M bin/magento setup:upgrade

EDIT:
You may need the location of composer to run it as a file with php. In that case you can try

php -d memory_limit=512M $(which composer) install

Which will substitute the full path of the composer command, so you can run it as a file with PHP.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top