2

When a plugin, theme, or even WordPress itself are updated, it downloads and saves the files (.zip, extracted files, etc.) to wp-content\upgrade. This is not always desirable.

For example, I run a portable version of WordPress from a flash-drive, so I don’t want it using the flash-drive for temp files. I would prefer it to put temporary files in the system’s temporary directory.

I already changed the temporary (upload) directory in php.ini as so:

upload_tmp_dir = ${Temp}

This works for regular PHP scripts, and while I’ve seen a couple of pages which seem to indicate that WordPress (3.0+) should use the default (upload? download?) temporary directory, it is ignoring it and still putting the temporary files in wp-content\upgrade.

How can this be changed?

1 Answer 1

2

Impossible. The path is hard coded in many places (wp-admin/includes/update-core.php for example).

I think this is worth a Trac ticket, if there isn’t one already. We can move the directories for plugins, themes and mu-plugins. This is the last thing why we need a wp-content directory at all.

Update

There was a short discussion in ticket #25153. The result is a wontfix, because the upgrade directory enforces the existence of a wp-content directory (whatever its name is in your setup), and that should be kept in case the core needs to add further directories here later, for example wp-content/libraries/.

You can set the upload directory and the wp-content directory to the same physical directory via wp-config.php constants. This should be clean enough for time being.

3
  • 1
    Thanks for the suggestion, I checked and could not find anything about it in either Trac or WordPress Ideas, so I submitted the ticket.
    – Synetech
    Commented Aug 26, 2013 at 20:53
  • @Synetech I made an update to my answer and summarized the discussion from your ticket.
    – fuxia
    Commented Aug 27, 2013 at 11:43
  • Argh. They sound a lot like the Chrome developers; too narrow-minded about different configurations and uses and too obstinate to make any changes they don’t consider useful for themselves. I’m currently weaning off of Chrome, but I think I can continue with WordPress—though this is the sort of thing that leads to modifying core or forking altogether. I looked at your suggestion, but wp-content contains a lot of necessary files, and I don’t know what uploads is for but upgrade is the one where it puts the temporary files (besides, it has to be relative, so it must be on the same drive).
    – Synetech
    Commented Aug 27, 2013 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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