Download failed. Could not create Temporary file

Last week I posted that I was having problems upgrading or updating WordPress core and plugins.  Every attempt resulted in the message – “Download failed. Could not create Temporary file”.  The only solution at the time was to change permissions on wp-content to 0777 and then to revert to 0755 after.

I have finally found a definitive answer that does not require changing permissions or ownerships.  or does it compromise the security of the server.

The solution is quite simple.  All that is required is to add the following two lines to the wp-config.php file.

define('WP_TEMP_DIR', ini_get('upload_tmp_dir'));
putenv('TMPDIR=' . ini_get('upload_tmp_dir'));

As I said, I run several sites, so it was a matter of updating each config file.  I then attempted a core upgrade and a plugin upgrade on each.  Success!  No more meddling with directory permissions.

So, if anyone out there is having the same problem – there is the answer.

Upgrade permissions

I have a wee problem that I find quite irritating.

I look after a number of blogs, all running WordPress, and running on a mix of servers.  On a fairly regular basis, plugins, or even the core code needs to be updated and that is fine.

My problem arises with the plugins.  In order to do an automatic upgrade, I have to go into each server in turn and change permissions on the “wp-content” directory, from 755 to 777.  After the upgrade, I have to remember to revert to 755 again.  Failure to do this results in a message telling me that the update could not download to the temporary directory.

Is there a way around all this faffing with permissions?  Is there a plugin or something that will automate the process?

It’s not exactly a critical problem, but a resolution would make life a little easier!

To sleep

One of the many symptoms of CFS is the ability to have a nights sleep and to wake completely unrefreshed!

For two nights on the trot, I went to sleep at my normal time, which is usually around one or two in the morning (I’m a night owl).  Each morning I woke at around seven with the knowledge that I wouldn’t get back to sleep.  I also felt like I hadn’t slept at all.

Yesterday was the day after the second night, and was therefore a “lost day”.  I have them quite often.

A lost day is a day where I am fit for nothing.  I was desperately sleepy all day, yet couldn’t have a nap because of Restless Legs – Yes, I’m a wreck!!  Every time I relaxed to the point where I felt I could doze, the legs started kicking and became extremely painful.  The only cure for that was to walk around for a bit, which isn’t a good way to sleep.

I had a great night last night.  I went to sleep at two, and didn’t wake until midday – ten hours!  Yet even now I feel a bit sleepy. 

Of course, apart from the physical tiredness, there is the accompanying mental fatigue.  This is the bit I find very hard to live with, as I enjoy my writing and meditating.  I tend to be a thinker and dreamer, and when the though process shuts down I am at a bit of a loss.

I meant to write a piece for this yesterday, but the thoughts I did have made no coherent sense.  It was like trying to write in porridge.

Even today, it ain’t so easy!!!