0

This question already has an answer here:

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 :

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

marked as duplicate by Raphael at Digital Pianism, Ben Crook, Siarhey Uchukhlebau, Rakesh Jesadiya, Moose May 25 '17 at 9:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

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 May 18 '17 at 9:37
0

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 May 18 '17 at 9:20

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