1

I am running few Magento 2 sites on different servers. As now M2 is depending on CLI for many things, we need to run commands in development mode for the installing/upgrading modules, installing themes and for deploying static content.

Recently I was using one economy normal server and where I was not able deploy content on live server and site breaks as I flush cache and try to deploy. This was just a default M2 setup with one theme installed.

I was using the same server for M1 and it was running fine.

Is there any specific server requirement for M2 with memory limit and other inputs for the server so next time before purchasing any hosting for M2 we can take care of it?

Definitely it will work with the higher configuration as per the link suggested. I want to know minimum configuration needed to running M2 without any memory and slow speed issue.

1

1 Answer 1

0

As to my limited knowledge you will not be able to run M2 on a server without shell access. Production mode relies on cli commands run when changing something in the codebase and is not generating anything on the fly to avoid stretching server resources. If you need to handle server without shell access you can create a deployment script that will perform those tasks for you. This doesn't have to be that complicated. Something like cron running every few minutes which checks for a flag file whether to do the deployment and do:

  1. create var/.maintenance.flag file to put store in maintenance mode
  2. do git pull to fetch newest changes
  3. run composer install for any changes to vendor packages
  4. do bin/magento setup:upgrade to make any upgrades
  5. perform bin/magento setup:static-content deploy to generate static files
  6. remove maintenace file and deployment flag file

If you need something more adjustable you can put some data to the deployment file which will trigger some additional elements.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.