cancel
Showing results for 
Search instead for 
Did you mean: 

error when set mode to production

error when set mode to production

hello,

 

i have magento 2.1.5 (runnung on webserver like http://project.sub.domain-url.com/ and want to set mode to production with

php bin/magento deploy:mode:set production

 

but i get an error and in debug.log is error:

 

[2017-03-31 14:00:55] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"tags":[],"mode":"all"},"is_exception":false} []

 

also if i start compilation with 

php bin/magento setup:di:compile

i get error.

 

does anybody know why this error is comming?

thanks for help!

martin

1 REPLY

Re: error when set mode to production

Hi,

Execute the following commands in given order:

1. Go to the Magento root directory

2. rm -rf var/di, var/generation, var/cache

3. change the deployment mode

4. Recompile 

5. clear the cache

6. Provide appropriate permission for the var directory