1

I have moved a drupal website from live server to localhost.

But the problem I am facing is that everything is broken. no css, no images only text is visible on pages.

On my live website when I click on login button a popup for login appears. But on local host its not working. I have tried using different login URLs but non of them worked for me.

Here is a URL of one image : localhost/sites/default/files/Screen%20Shot%202015-02-24%20at%206.08.54%20PM_0.png

Similarly I have viewed source code of page and here are URLs of CSS and JavaScript files

localhost/sites/default/files/css/css_UCtZrZRD9npGm4D7o8VXPkl5qDJq-m8IlhuR9ccf_tY.css

localhost/sites/default/files/js/js_0gj6QcpfRH2jzTbCQqf7kEkm4MXY0UA_sRhwPc8jC1o.js

These images and files are not found in this location, is this a cache problem ? All these files and images are missing from this location : localhost/sites/default/files

Note : Most of you are pointing me to following Path :

admin/config/media/file-system

Here is what I have

Public file system path : sites/default/files
Temporary directory : /mnt/tmp/test

Now should I make both these paths empty ? or change the path ?

  • are you on windows? what is your OS? – Yusef Aug 30 '15 at 11:13
  • Welcome to Drupal Answers! Please notice you are using two different accounts. That is why it seems to you you cannot edit your own posts. – kiamlaluno Aug 31 '15 at 19:49
  • kiamlaluno♦ This is only account I have, found this website on google few days ago and registered. I think now my post is edited ? – Malik Mati Sep 1 '15 at 6:09
0

It seems that drupal can't process your files due to not writeable file system paths. Go to admin/config/media/file-system and specify public and temporary directories. After that clear all cache here admin/config/development/performance.

|improve this answer|||||
0

It's definitely the tmp directory issue. Try configuring tmp directory or just remove /tmp in admin->Configuration->media->file-system-> Temporary Directory and save.

Also, the css and Js files you're pointing are caused because the site has Aggregate css and Javascript option enabled. You need to disable Aggregate CSS and JS, then do backup. To disable it, admin->config->performance

|improve this answer|||||
0

I gust it is because you test it on windows, in windows the directory of temp file is different form Linux so you just need go to

admin/config/media/file-system end empty "Temporary directory " field then save form , and finally clear the cache

|improve this answer|||||
  • Did you mean on live website I should empty the field of Temporary directory and then take backup of files ? – Malik Mati Sep 1 '15 at 8:33
  • no no, just go to admin/config/media/file-system and empty "Temporary directory " field and save form – Yusef Sep 1 '15 at 13:29
  • As I asked in my question, on local host I can't login. I have tried using different login URLs but non of them worked for me. – Malik Mati Sep 2 '15 at 7:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.