views:

119

answers:

3

Hello friends,

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!

+1  A: 

If you haven't changed your site information (url and such) in the backend (or in the database) after the migration, this is the likely problem. http://www.siteground.com/tutorials/magento/magento_configuration.htm#base_url
for the database:
in the core_config_data table
change key "web/unsecure/base_url" to your site base url ex. http://yoursite.com
good luck!

pferdefleisch
Thanks, but I did that. Everything seems to point to the right domain.
Rafa
+3  A: 

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.

melee
The .htaccess came over, and everything seems to be OK with it. The system is in the server's root folder, just like it was before in the previous server. Should anything have to change in the .htaccess file?
Rafa
RewriteRule ^(index.php/)?minify/([^/]+)(/.*.(js|css))$ lib/minify/m.php?f=$3=$ - Is this anywhere in there?
melee
Thanks! That did the trick! You rock!
Rafa
+2  A: 

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

Alan Storm
Thanks! That's very useful info!
Rafa
+1 as well, as that merge_css_files would be crucial in getting you back going if it was a critical situation
melee
I'll keep that in mind. Now I have to find a way to force the cache to clear, cause most images aren't being displayed.
Rafa