Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1171
  • Last Modified:

magento pointing to incorrect CSS files in MEDIA folder


I recently migrated from servers and also went from Magento 1.5 to 1.6.

I followed all the steps in a migration guide and the site seems to be pulling the correct data from the database, however no style are brought in.

When i look at the source it appears to be pointing to incorrect css files: (they dont exist)

I suspect this has something to do with the encryption key in app/etc/local.xml ?? but im pretty sure that the key is identical to the one from the previous server.

The URL doesnt currently resolve, therefore to view the problem you would need to add this line to your HOST file: www.astridandmiyu.com

Any suggestions would be greatly appreciated
Dean OBrien
Dean OBrien
  • 4
  • 3
1 Solution
Chris StanyonCommented:
Hi Easynow,

It's not to do with the encryption key, but a setting that combines all your CSS files into 1 in order to add performance to the site. In the backend, go to System -> Configuration -> Developer and you'll see a section for CSS, and an option to combine them into one.

Untick that, save it, and reload your site (you may need to clear down your cache (System -> Cache Management).

Look at the source of your site once reloaded and you should see the individual stylesheets again.

If you want to recombine then, follow the above steps but tick the box and save. This will then generate the correct CSS file for you and put it in the media folder.

Dean OBrienAuthor Commented:
hey chris

I had come across a blog post which pretty mush said the same thing.

I accessed configuration -> developer via back end and i thought i changed the settings to no avail. But further to your post i have went back and they were still set to YES. The problem is there is also no style on the back end. I click "save config", but nothing appears to happen....

See attahed screen grab.

Any suggestions? can this setting be changed via the database?

Easynow astrid screen grab
Chris StanyonCommented:

That is a bit of a problem. When you combine the stylesheets, it also combines the admin ones. Basically it takes all your css stylesheets from your CSS folder within your theme and then creates and uses the weird named ones that you'll see in your source code. It puts them in the public_html/media/css folder.

I don't know where in the database these settings are stored.

Your best bet, if you still have access to the old server configuration is to grab the various css files contained in public_html/media/css and copy them to your new server (same location)

You may also need to do this with Javascript if you combined your JS files (which would explain why your submit button isn't working - it's coded to submit the form by Javascript!

Let me know if you still have problems and I'll see what else I can do.

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Chris StanyonCommented:
Found the setting in the database

The setting is in this table:


Look for a row that has a 'path' value of 'dev/css/merge_css_files' and change the setting to 0

You might want to run the usual precaution of backing up your database  :)

Clear down caches and reload your site

Dean OBrienAuthor Commented:
Hiya, I changed the settings -and that brought back the CSS and JavaScript files for default... But for so
E reason the theme ones are not loading.... Strange. I have changed the settings in conf -> designs but still not loading. Any ideas? Anyway u answered the first question thanks ;) will award the points in the morning. Easynpw
Chris StanyonCommented:
Not really sure...

When you load your site, and the css files don't show up, have a look at the source code and see what CSS files it's trying to load, and then check your filesystem to make sure they exist.

If you have Firefox installed as a browser, download the Firebug extension. This will give a whole host of tools that help you debug webpages (not just Magento ones). In Firebug there's a Console tab and this shows you a list of errors your site generated. If you look in there you may see a 404 error (page not found) and it'll tell you what it couldn't find i.e your stylesheets. That may give you some clue as to what Magento is looking for and where it's looking.

At least your site is partially up and running - no worse feeling than everything breaking and not having a clue why :(

Dean OBrienAuthor Commented:
Thanks again!

Another question coming if you got time :)

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now