0

I moved my site based on Magento 2 from hosting to my localhost. I cleared cache, adjusted(secure and unsecure) urls in core_config, ran static content deploy using cli. Checked all permitions for "folder".

Magento runs but with no css and js files.

In console I can see following:

Printscreen of main Magento 2 page after deploying

Please give some advice, what should I do to remove this issue? Thanks in advance!

P.S: Win 10 Open Sever (PHP7x64, MySQL5, 7x64, Apache-PHP7-x64+Nginx1.10) No external caching

P.P.S Before I copied site from host I tried to setup magento with sample data using cli and I received the same issue! So I believe it's not only issue about moving magento 2 from host to local. I can see that M2 tries to load all files from version1485628564 folder which doesn't exist in pub/static http://magehost.two/pub/static/**version1485628564**/frontend/Magento/luma/en_US/mage/calendar.css

2 Answers 2

1

Inside your Magento project folder run magento deploy:mode:set production

It will create a new folder version inside pub/static/ and should work.

As you are working localhost you can enable developer mode magento deploy:mode:set developer

Source : http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-mode.html

0

If you are using a cPanel and/or WHM, depending on your settings you may need to remove the .htaccess from the [magento_root]/pub/

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.