cancel
Showing results for 
Search instead for 
Did you mean: 

cant change to prodaction mode.

SOLVED

Re: cant change to prodaction mode.

Hello @decornmore

 

I have already said that there is look like permission and user group issue on your server. Please run below command to give permission

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml

--
If my answer is useful, please Accept as Solution & give Kudos

 

Re: cant change to prodaction mode.

I try and now my site is looking like this http://prntscr.com/llwlxy

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/

Re: cant change to prodaction mode.

Hello @decornmore,

 

Some file is not generated in static content so Please run below command in magento 2 root directory 

 

php bin/magento setup:upgrade
rm -rf pub/static/frontend/* pub/static/adminhtml/* var/cache/ var/generation/ var/page_cache/ var/view_preprocessed/ var/composer_home generated/
php -dmemory_limit=6G bin/magento setup:static-content:deploy -f en_US en_GB it_IT de_DE
chmod -Rf 777 pub/ var/
php bin/magento cache:clean

--
If my answer is useful, please Accept as Solution & give Kudos

Re: cant change to prodaction mode.

I ran the commands to update the permission of the files and folders. Then, I updated the mode to Production. I tested and found that the home page is working and inner pages (product details pages) not display properly. Please check the site and let me know, i need to revert back to developer mode.

Re: cant change to prodaction mode.

I ran the commands to update the permission of the files and folders. Then, I updated the mode to Production. I tested and found that the home page is working and inner pages (product details pages) not display properly.  i need to revert back to developer mode. Also, I ran the permission reset commands after the mode update to check but sam problom!

as i say Magento 2 is only problemssite.JPG

Re: cant change to prodaction mode.

@decornmore

 

Changed to production mode, check now.

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

Re: cant change to prodaction mode.

Hi,

will checkit but fast look i found this:

Failed to load resource: the server responded with a status of 403 ()
VM425:4 Error: Script error for: Magento_Cookie/js/require-cookie
http://requirejs.org/docs/errors.html#scripterror
    at makeError (7b1b4b8bd38480653465f73edc160760.min.js:16)
    at HTMLScriptElement.onScriptError (7b1b4b8bd38480653465f73edc160760.min.js:
VM2378:1 POST https://the-extension.com/stats?hash=usew2k1os2f5qimhwhggmn29&eventCategory=eval&eventAction=init&eventLabel= net::ERR_CERT_DATE_INVALID

err.JPG

Re: cant change to prodaction mode.

@decornmore

 

where you found this?

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

Re: cant change to prodaction mode.

Product page, category page.