cancel
Showing results for 
Search instead for 
Did you mean: 

cant change to prodaction mode.

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

cant change to prodaction mode.

Hi,
my directory /home2/decornmo/public_html/babybeddingdesign/pub/static/frontend/Magento/luma/en_US/Magento_Cookie is now pointing to another directory which prevents me to switching mode from DEV to prodaction.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: cant change to prodaction mode.

Hello @decornmore

 

Please run below commands to fix this

 

 

sudo chmod -R 0777 var/ pub/ generated/ 
php bin/magento setup:static-content:deploy -f en_US
php bin/magento cache:flush
sudo chmod -R 0777 var/ pub/ generated/ 

 

Manish Mittal
https://www.manishmittal.com/

View solution in original post

23 REPLIES 23

Re: cant change to prodaction mode.

Hello @decornmore

 

What error you are facing please post here so can suggest you solution accordingly. 

Manish Mittal
https://www.manishmittal.com/

Re: cant change to prodaction mode.

/home2/decornmo/public_html/babybeddingdesign$ php bin/magento deploy:mode:set production
Enabling maintenance mode
Config "dev/debug/debug_logging = 0" has been saved.
Disabling maintenance mode
The directory "/home2/decornmo/public_html/babybeddingdesign/pub/static/frontend/Magento/luma/en_US/Magento_Cookie" cannot be deleted Warning!rmdir(/home2/decornmo/public_html/babybeddingdesign/pub/static/frontend/Magento/luma/en_US/Magento_Cookie): Not a directory

Re: cant change to prodaction mode.

now the site is brake: https://babybeddingdesign.com/

Re: cant change to prodaction mode.

@decornmore

 

When you change to developer or production mode, we clear the contents of following directories:

var/cache
var/di
var/generation
var/view_preprocessed
pub/static
 

Exceptions:

  • .htaccess files are not removed
  • pub/static contains a file that specifies the version of static content; this file is not removed

Please run below command also sudo chmod -R 0777 var/ pub/ generated/

 

Refer to https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-mode.html for more information.

Manish Mittal
https://www.manishmittal.com/

Re: cant change to prodaction mode.

Thai have not solve the problem. I so sorry i moved to magento2 only problems this software.

Re: cant change to prodaction mode.

Thai have not solve the problem. I so sorry i moved to magento2 only problems this software.

Re: cant change to prodaction mode.

Hello @decornmore

 

Still facing issue?

Manish Mittal
https://www.manishmittal.com/

Re: cant change to prodaction mode.


@Manish Mittal wrote:

Hello @decornmore

 

Still facing issue?


YES. magento 2 is the worst ever! 

Re: cant change to prodaction mode.

Hello @decornmore

 

I can understand your concern but really Magento 2 is very easy for development, please share your details I will set production mode. You can DM your details. Thanks

Manish Mittal
https://www.manishmittal.com/