How To Fix Css And Js Code Does Not Work On Localhost Copy Of Live Site?

Dear all,

I have set up my live site on localhost while store front is closed. I set up exact copy of my db of live into development db.

I'm able to login to admin panel and browse through the navigation and all

But the problem is all my site styles are lost and no java script is running.

I tried clearing cache manually but still the same.

However on my live websit,e I'v set up CDN enabled. I doubt that each time when my local host tries to get CSS&JS from CDN, it does not allow to fetch data due to domain missmath

(I use virtual host domain ) . I guess this could be the reason.

Please advice me on how to resolve this on my localhost.

Thanks in advance.

Did you try to disable CDN on the localhost? I think, this is the only possible solution

Thanks for your suggestion,

I thought the same, But the problem is when I navigate to CDN settings page, I see the check box 'Enable CDN' being checked.

After I un-check it, am unable to save settings due to JS not working to submit the form.

Log in the phpMyAdmin., find the cscart_settings_objects table and search by 'cdn' name. You should change value from Y to N and clear cache


I found the record as per your instructions. And found a serialised array string instead of 'Y' in value.

I replaced that string with 'N'. Then cleared the cache.

Thanks to you, its now rendering the styles and JS functions.

There are few JS errors I see on console when I go to orders page such as,

Uncaught ReferenceError: jQuery is not defined,

Uncaught TypeError: $ is not a function,

Uncaught TypeError: Cannot read property 'fn' of undefined,

Uncaught TypeError: Tygh.$ is not a function

Again, thanks for your suggestions.

Try do delete the var/cache directory manually



it works like a charm after deleting the cache by manually.

Thank you eComLabs! appreciated your time.

You are welcome! :)