CSS does not load after migrating magento website

I moved my magento website to another server following the instructions here . Everything went smoothly, except for the fact that when the page loads, the CSS does not load, and I just get the page in plain text.

I used firebug and noticed that the path that the system uses to access the CSS file does not exist on the FTP server. It starts with the "minify" folder, which makes me think that something can be cached from the previous server.

Example:

my_site_url / downplay / 1281335374 / skin / interface / default /hellouno/CSS/styles.css

This path does not exist, even on the previous server, so I think maybe these files should be created on the fly? I am very confused, any help would be greatly appreciated!

+4
source share
11 answers

Sounds like a problem with your .htaccess file. Overwriting records are processed here. If you have not already done so, make sure your .htaccess file appears in the transfer and makes the appropriate changes if the directories or anything else has been changed.

+4
source

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

To get both strings, use the following:

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

Then update them manually and make sure that the domain has a final "/", otherwise it will combine the domain name with the next folder name.

You can check if this is your condition if during the check you see the wrong path to CSS and JS.

The correct configuration:

enter image description here

Invalid configuration options in:

enter image description here

  • Remember to clear the var / cache folder.
+7
source

I'm going to assume that you cleared your cache. If "don't have CSS" makes it hard to do with admin, just delete

 var/cache 

folder.

Sometimes, when CSS (or Javascript) merge options quickly switch from on, off to on again, Magento will recalculate the paths.

 System -> Developer -> CSS Settings 

If you cannot access this in Admin, manually change the value in the core_config_data database core_config_data (indicated by the path column with the value dev/css/merge_css_files ), clear your cache and reload the page

+5
source

Thanks, it helped me just forget to place / at the end of the path.

Before:

Base URL http://mywebsitename.com

After:

Base URL http://mywebsitename.com/

He solved all problems with skin / css and admin. Cheeers

+2
source

I solved the problem by changing the options for merging css into the backend to no. It was a bit difficult to navigate the backend without css, but I managed to get there!
System> Configuration> Developer> CSS Settings

+2
source

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

+1
source

Experienced one and the same problem. Solution: I forgot to put trailing braids at the end of my base_urls when I updated them.

System> Configuration> General> Web> Unsecured

 Base URL http://mybaseurl.com/ 

System> Configuration> General> Web> Unsecured

 Base URL https://mybaseurl.com/ 

If you are not available in the "Administrator" section, you can also set this value in the database in the table core_config_data strong>

Fields: web / unsecure / base_url and web / secure / base_url

Also: Remember to clear your cache after this.

+1
source

Check permissions for folders like app / etc, var, media folders. Try granting 755 permissions for these folders. I recently ran into the same problem and I tried to handle it. Then my site works fine.

+1
source

Change the resolution of the skin and media containing All folders to give a resolution of 755 AND TO 644 File

+1
source

Mina was also a slash (/) at the end of the url in the sql database. Cleared cache and it worked perfectly.

0
source

One answer that has not yet been given, which turned out to be the solution to my problem:

When moving Magento storage from one host to another, something that is not normally copied is a VirtualHost record. In my case, I had to manually recreate this and mistakenly add AllowOverride None . It must be AllowOverride All to read and process .htaccess .

0
source

All Articles