The installation went fine, no errors. I activated also rewriting mode for Apache2. But I found no CSS files:

The inspector shows:

enter image description here

The folder /pub/static has no version folder.

UPDATE: Also I have no backend when I go to localhost/admin.

I didn't delete pub/static after my installation. When I run sudo php bin/magento setup:static-content:deploy I get error :

Missing required argument $alternativeSources of Magento\Deploy\Model\Deploy\LocaleDeploy.

  • Run command php bin/magento setup:static-content:deploy Commented May 18, 2017 at 8:53
  • Check my answer : magento.stackexchange.com/questions/174296/… Commented May 18, 2017 at 8:54
  • Didn't work, please see my update
    – bourax
    Commented May 18, 2017 at 9:07
  • Based on my knowledge, it is not an issue, please goto system > configuration > general > web > change the secure and unsecure urls from https to http Commented May 18, 2017 at 9:09
  • You have posted question under wrong tag. It should not be Magento-1. Commented May 18, 2017 at 9:20

2 Answers 2


First check if your css is loaded, your website -> right click and select view page source or just press ctrl+u. There you'll find your style.css. Check if it is showing this style.css and the right url. Click on it, see if it is loading ok.

It should look like this:

<link rel="stylesheet" type="text/css" href="http://www.exemple.com/skin/frontend/package/theme/css/style.css" media="all" />

For this problem to happen, There are three reasons I know of:

1.) There might be an issue because of System Cache. Clean the cache from the backend or go to magentoroot/var/ and delete the contents of the cache and session folder.

2.) There can be issue with the file permission of your css File. In this case just type the following command in terminal, sudo chmod 777 -R /magentoroot/ (update file permissions after Magento creates these new static files. They are not owned by www-data, so they will give 404.)

3.) Lastly, there could be something wrong with the url in your core_config_data table of your database, which I think you have already checked.

4.) Flush your navigator cache : Ctrl+Shift+R

  • The CSS file itself doesnt exist
    – bourax
    Commented May 18, 2017 at 9:37

Run following steps and commands from terminal of your magento installation root directory.

Step 1 : Deploy the static content to create symlinks

php bin/magento setup:static-content:deploy

Step 2 : Reindex files

php bin/magento indexer:reindex

Step 3: Enable rewrite module extension

make sure apache “rewrite_module” is enable and then restart the server

Step 4 : Give you WebServer access

$ chown -R www-data:www-data /var/www/html/magento2 

Step 5: Give write permission.

$ chmod -R 777 /var/www/html/magento2 

Step 6: Clean and flush magento cache

php bin/magento cache:clean
php bin/magento cache:flush

Hope this helps you !!

  • I get [BadMethodCallException] Missing required argument $alternativeSources of Magento\Deploy\Model\Deploy\LocaleDeploy. when I run your first command
    – bourax
    Commented May 18, 2017 at 9:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.