I'm having this weird error and I did not suceed to find the origin. First of all I would like to say that I succeeded to perform some installation of Magento 2 on a windows os with a xampp server before.
I'm now trying to install a magento instance on Windows Server with IIS
Basically after configuring composer etc.. the installations runs well. No error mentioned during the installation process etc..
However at the end when I try to access at the backend or the front store it display the page but no css or images files are loaded. When I looked in the missing ressources, basically I have 404 errors for all css & images files supposed to be located in the following folders
pub/static/frontend/*
pub/static/backend/*
Physically in my folder pub/static/ there is only the _requirejs folder and .htaccess file but no folder frontend and backend
I guess the folder frontend and backend are generated automatically because they are not by default in the initial clone of magento 2.0
So if anyone has got any ideas of where the problem could come from.
Additional information to consider: I have checked the permissions, the web server has full access (read and write) on every folders and file magento 2.0 root directory.
An easier would be to run below command from magento root folder.
php bin/magento setup:static-content:deploy
This will feed the content perfectly in respective folders. If you have specific language then run like below.
php bin/magento setup:static-content:deploy en_US
php bin/magento setup:static-content:deploy en_GB
If you have only one language then you can use
php bin/magento setup:static-content:deploy en_US
Yeah, why do we have to google this sort of stuff...?
That is, I do find mention of these "static" resources in the documentation, but for the "easy" installation route, seems like this sort of stuff should be called out in the same tutorials..
it gives me an error : [InvalidArgumentException] There are no commands defined in the "deploy:mode" namespace. please help
Thank you, php-bugs, for mentioning the additional language parameter! I changed my store default language to en_GB, and deployed the static content. Boom - 404 on css and js files. Running
php bin/magento setup:static-content:deploy en_GB
fixed it.