Magento 2 shows 404 error and front end css crashed

I hope this will help you

If you are using wamp server on windows then

C:\wamp\bin\php\php5.5.12>php.exe C:\wamp\www\<Magento root directory>\bin\magento setup:static-content:deploy in your CLI.


Deploy static content using Magento 2 CLI. If you don't know how to do it, I have written everything in the answer below with the reasons why this happens and how to solve it. Please check it out:

https://magento.stackexchange.com/a/97230/34408


After static content deploy my js and css not loading because in url deploy version is added so insert Query in my database.

INSERT INTO core_config_data (scope, scope_id, path, value) VALUES ('default', 0, 'dev/static/sign', '0');

Or in Admin below screenshot setting static file settings enter image description here

I hope this will work

Solution : 2 Permission issue so correct your permissiom first of all Command in your teminal

chmod -R 777 var pub
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Solution: 3 Deploy according to your language.

bin/magento setup:static-content:deploy en_US nl_NL -f 
php bin/magento cache:flush