cancel
Showing results for 
Search instead for 
Did you mean: 

CSS not loading in the front and backend after installing via Installatron Script

SOLVED

CSS not loading in the front and backend after installing via Installatron Script

G'Day All,

New to Magento, so go easy Smiley Happy

I recently installed Magento 2 via the Installatron script in cPanel on my server.

The install went smoothly with no errors, although when I visit the front and backends, there is no styling.

Any suggestions as to where to start?

Thanks in Advance.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: CSS not loading in the front and backend after installing via Installatron Script

You should adjust the filesystem permissions and maybe the webserver rewrites: https://mage2.pro/t/259

View solution in original post

Re: CSS not loading in the front and backend after installing via Installatron Script


@sivaselvanaerp wrote:

If you redeployed  it after deleting the pub/static directory you would have deleted the .htaccess file in pub/static directory. That causes the URL Rewrite issue. Put the .htaccess with urlrewrite option in the pub/static directory , will resolve the problem. 


Thank you so much, this solved my problem

View solution in original post

21 REPLIES 21

Re: CSS not loading in the front and backend after installing via Installatron Script

You should adjust the filesystem permissions and maybe the webserver rewrites: https://mage2.pro/t/259

Re: CSS not loading in the front and backend after installing via Installatron Script

Re: CSS not loading in the front and backend after installing via Installatron Script

Looks like it was clashing with an install of wordpress in a sub directory. Not sure why, but all good for now. Thanks

Re: CSS not loading in the front and backend after installing via Installatron Script

If you are facing problem of css and js page load design after installation in magento2

please follow the following step-:

open the terminal and navigate to magento web root

 $ cd /var/www/html/magento2

Step 1.

$ php bin/magento setup:static-content:deploy

Step 2.

$ php bin/magento indexer:reindex

Step 3.

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

Step 4.

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

Step 5.

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

Step 6.

delete cache folder under var/cache

The above step working. I hope this will work for you also.

Let me know if any issue. :)

http://gotechnies.com/css-javascript-files-loading-magento-2-installation/

Re: CSS not loading in the front and backend after installing via Installatron Script

Magento2 have this initial issue, but follow below steps for getting its work !

Step 1 : Run CMD

Step 2 : Goto Magento installation directory using

CD wamp/www/[Magento dir.]

Step 3 : Run

php bin/magento setup:static-content:deploy

Step 4 : Run

php bin/magento indexer:reindex

Step 5 : Delete Cache from

var/cache/[delete all dir.]

It's getting work for Front-end & Back-end !

http://developerforums.blogspot.com/

Re: CSS not loading in the front and backend after installing via Installatron Script

https://www.youtube.com/watch?v=fTxTdasJ0Js
This video helped.
Open /etc/apache2/apache2.conf 

 

Find <Directory /var/www/>

Replace rules inside with below rules.


<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

</Directory>

Re: CSS not loading in the front and backend after installing via Installatron Script

I have done by your step,but my problems still exist.The problem is 'pub/static/version1489468762/ ..' not found.My dev environment is php7.0 ,mysql5.6 ,nginx 1.9 .I use the nginx.config.example of magento 2

Re: CSS not loading in the front and backend after installing via Installatron Script

I'm having the exact same problem, also using nginx.

Re: CSS not loading in the front and backend after installing via Installatron Script

If you redeployed  it after deleting the pub/static directory you would have deleted the .htaccess file in pub/static directory. That causes the URL Rewrite issue. Put the .htaccess with urlrewrite option in the pub/static directory , will resolve the problem.