0

I've created a backend theme from Mage/backend. When I deploy the static content, the theme is deployed but in front, the CSS is not shown. I created a styles.css file in the CSS folder of the theme.

Maybe I need to declare somewhere the styles.css but where?

  • try to add in pub and load the page is it woring? – Jaimin Nov 8 '17 at 12:43
  • Where you create a new theme? In which folder? – St3phan Nov 8 '17 at 12:44
  • We need more information. – St3phan Nov 8 '17 at 12:46
  • You can declare that css file in Magento_Theme->Layout->default.xml file and put css file in Magento_Theme->Css folder – Kushal Nov 8 '17 at 13:00
0

After installing Magento 2

sudo service apache2 restart 

sudo chmod -R 777 var/

sudo chmod -R 777 pub/

sudo service apache2 restart

 sudo chmod -R 777 /var/www/html/magento

 sudo a2enmod rewrite

sudo service apache2 restart

Content deploy

php bin/magento setup:static-content:deploy "on root dir".

if it's not working yet

For Ubuntu edit the file /etc/apache2/apache2.conf

find /var/www/

Change AllowOverride None to AllowOverride All under the following section:

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
  • Thanks it works well. It was a file permissions problem :/ – Kpone Nov 9 '17 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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