17

I've moved my live Drupal website to Windows localhost (XAMPP), but I'm getting lots of "The file could not be created" errors. If I log in to the site as an administrator, it fails to return any more pages at all. I can view it with errors if I don't log in.

Is there a way to change the temporary file location without logging in through the interface, or using any administrative page?

  • 1
    From the problem description, it doesn't really sound like the temporary file path is the problem, but I answered that question below, since that's the title. Please re-phrase the question text so that it goes more in line with the title. – Letharion Nov 18 '12 at 14:08
27

In Drupal 7 the temporary path is stored in the variable file_temporary_path, so you can either update the entry in the variables table with a SQL-query. Or you can use Drush:

drush vset file_temporary_path [some_new_path].

7

Variables can be overwritten within settings.php. An entry like the following will do it in D7:

$conf['file_temporary_path'] = '/tmp';

Replace '/tmp' with your specific path. You might also need to set the variable file_private_path.

6

For Drupal 8 using Drush it's:

drush config-set system.file path.temporary /tmp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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