CSS doesn't load after migration of magento website

27,078

Solution 1

Sounds like an issue with your .htaccess file. Minification rewrites are handled there. If you haven't already, make sure your .htaccess file came over in the transfer, and make the appropriate changes if directories or anything else has been changed.

Solution 2

In my case, the problem was a missing Slash "/" at the end of the domain.

Use the following to get both rows:

SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';

Then update them manually and make sure the domain has it's final "/", otherwise it will merge the domain name with the following folder name.

You can check whether this is your condition if when doing inspect, you see a wrong path to CSS and JS.

Correct Config:

enter image description here

Incorrect Config Results in:

enter image description here

  • Remember to clear the var/cache folder.

Solution 3

I'm going to assume you cleared your cache out. If "not having CSS" makes this hard to do via the admin, just delete the

var/cache

folder.

Sometimes giving the CSS (or Javascript) merge settings a quick toggle from on, to off, to on again will force Magento to recalculate the paths.

System -> Developer -> CSS Settings

If you can't access this in the Admin, change the value manually in the database table core_config_data (identified by the path column having the value dev/css/merge_css_files), clear your cache and reload your page

Solution 4

I solved the issue, by changing the merge css options in the backend to no It was a bit difficult to navigate through backend without css but managed to get there!
System > Configuration > Developer > CSS Settings

Solution 5

Thanks its helped me i just forget to place / in the end of the path.

Before:

Base URL http://mywebsitename.com

After:

Base URL http://mywebsitename.com/

Its solved all skin/css and admin problem. Cheeers

Share:
27,078
Rafa
Author by

Rafa

I'm a passionate web designer/developer!

Updated on August 29, 2020

Comments

  • Rafa
    Rafa over 3 years

    I migrated my magento website to a different server, following the steps described here. Everything went smoothly, except for the fact that when I load the page, the CSS won't load, and I just get the page in plain text.

    I used firebug and noticed that the path the system is using to get to the CSS file doesn't exist in the FTP server. It starts with the 'minify' folder, which makes me think that something might be cached from the previous server.

    An example:

    my_site_url/minify/1281335374/skin/frontend/default/hellouno/css/styles.css

    This path doesn't exist, not even in the previous server, so I'm thinking maybe these files are supposed to be generated on the fly? I'm really confused, any help will be very appreciated!