WordPress Update Error: Download failed.: Failed to write request to temporary file

We currently manage around 35 WordPress installations and websites for a variety of clients and my own projects. I originally started using WordPress for my own websites around 10 years ago, and over time I’ve arranged a range of hosting, themes and plugins that I know I can trust.

When I recently updated to the latest version of WordPress, I received the following error message: WordPress Update Error: Download failed.: Failed to write request to temporary file.

Strangely it only occurred on one of my sites from the 35 I updated, and it’s a site which has run without issue for several years. It’s an error message I couldn’t remember seeing before, so it was time to do some investigating. And it’s why I’ve written this post as a reminder if it occurs again.



WordPress Update Error: Download failed.: Failed to write request to temporary file

The error message appears when you attempt to automatically the core WordPress files, plugins or themes on the affected website. There’s no other information to accompany the message, and it appears there are various ideas as to what may cause it. The most common reason given is that the WordPress update will place temporary files in a directory on your server which isn’t specific to WordPress. That’s normally limited in terms of space by your website host, and it appears that a full temporary file may trigger the error.

Generally old files should be cleared out of the folder automatically, but that doesn’t always happen. So over the course of time, it can become full.

However there are some questions about this – contacting my website host for that particular site via support indicated that the temporary folder was only 5% full. That may have been because I’d completed the required updates via a workaround (details below), but it may indicate there’s another issue.

The other suggestion is a server configuration issue which means it’s not set up to properly use a temporary folder, which also makes sense. It could occur on an existing site if something has been changed by your website hosting provider for that particular server.


Fixing Failed to write request to temporary file:

So there are several things you can try:

  • Check whether there is any issue with space on your server or via your cPanel account.
  • Clear out the temporary directory of any files you know are no longer required.
  • Check and alter the user permissions for the WP-Content folder via your cPanel to have chmod 755
  • Edit the wp-config file to add a new line of code.

It was editing the wp-config file that immediately solved my own issue.
Two important things to note:

  • Before you make any changes or delete anything, it’s best to back things up. Some of the files in your temporary directory may relate to website stats software or have other uses which means you’ll need to keep them.
  • If you’re adjusting user permissions or editing your wp-config file, it can be a security risk, so make sure you switch them back afterwards.


Server Space and Set-Up:

Even if you can access your temporary folder (e.g. /tmp) via ftp, you may not be able to actually edit or delete anything. Particularly if you’re on shared servers (the most common set-up for lower priced hosting, including for most blogs etc). So you’ll need to contact your website hosting provider or raise a support ticket.

I pick my hosting based on the speed and quality of their product and their customer support, so I had a reply within an hour on a Sunday morning. But as the WordPress update was security based (and I tend to be a curious fellow), I didn’t want to wait while they responded, so I moved onto the next step.


WP-Content chmod 755:

The chmod setting controls who can Read, Write (delete and add folders) and Execute (run scripts) to folders on your website. Generally by default you want to have access to change things without letting anyone else make edits. Which is why generally your WP-Content folder should be set to chmod 755

To check, log into your website hosting provider, and navigate to your File Manager. Generally you’ll be able to see your chmod settings there and change them if necessary. One suggested solution is to temporarily change the WP-Content folder to chmod 777 which allows anyone to upload to it – obviously this is a massive security risk, so if you try this, change it back afterwards immediately!


Edit WP-Config:

So, first you need to open up your File Manager in your web host cPanel, or get into your site via ftp.

Locate your wp-config.php file.


It should look something like the following, with the name of your Database in it:

* @package WordPress

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */ define( ‘DB_NAME’, ‘database_name_here’ );

/** MySQL database username */ define( ‘DB_USER’, ‘username_here’ );
/** MySQL database password */ define( ‘DB_PASSWORD’, ‘password_here’ );

/** MySQL hostname *
/ define( ‘DB_HOST’, ‘localhost’ );


All you then need to do is add the following, before the MySQL details:

define(‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/’);


So it will look something like:

* @package WordPress
define(‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/’);

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */ define( ‘DB_NAME’, ‘database_name_here’ );

/** MySQL database username */ define( ‘DB_USER’, ‘username_here’ );
/** MySQL database password */ define( ‘DB_PASSWORD’, ‘password_here’ );

/** MySQL hostname *
/ define( ‘DB_HOST’, ‘localhost’ );

Then just save, close, and try to run your updates again.


When it’s all fixed:

When all the required updates have run, make sure you reset any changes to your chmod permissions, and also remove the line of code from WP-Config.

Even if you’ve managed to solve the problem via those workarounds, it’s worth contacting your website hosting provider to see whether the /tmp file needs clearing, or if there’s a server configuration problem. Otherwise you’ll need to go through making the changes for every update in the future, and it’s very easy to accidentally leave your modified wp-config file live after the umpteenth update.


Snow hits UK, but train travel information arrives via Twitter

The best way to get reliable UK train travel updates during the current light covering of snow appears to be the excellent uktrains service, which publishes updates to Twitter for 25 rail companies. Especially when the official website for some companies appears to be as reliable as the trains themselves.

Once again Twitter is showing itself as an excellent mechanism for information, following on from the #uksnow mash-up in my last post.

But although it’s still new enough to get coverage on mainstream media such as the BBC, (@bensmith is talking about UKtrains at the BBC as I type), it’s not without precedent (Not to diminish the great work by Ben Smith (uktrains) and Ben Marsh (uksnow).

Back in October 2007, Twitter users @nateritter and @viss used the hashtag #sandiegofire to distribute information on fires in California.

And then there were the earthquakes. US, UK and China.

There was the tragedy in Mumbai, and the use of Twitter to start alerting people about the status of hospitals and need for blood donations.

And some emergency services have a Twitter account, such as the LA Fire Dept.

The interesting thing about #uksnow and uktrains is how the interpretation and use of data pulled from, and pushed into Twitter is evolving to make more effective services for information.

Plenty of people have talked about how Twitter is moving into the mainstream, or how Facebook made an offer to purchase the microblogging service – but in many ways the mainstream are being sucked into Twitter – exactly as happened with Facebook en route to 150 million+ global active users.

A personal tale of Twittering on the train

I was suffering a bit of blog writers block on the train home from London today, and worrying that although there’s plenty Twitter related in my RSS feed, there wasn’t anything I could add to without a fair bit of research.

And then the train stopped.

Handily I was on Twitter, and mentioned it. Seconds later:

Which coincided with the announcement by someone actually on the train.


Turns out fellow social media person Simon Collister was on the train in front. Sadly his offer of a beer in the buffet car wasn’t enough for me to try and get the driver of my train to catch his!

It also reminded me of other occasions when Twitter has been useful in answering other train-related queries, such as when @davidcushman was wondering why trains were delayed, and I happened to see his tweet and find the answer within a minute or two, so he could make alternative plans.

Sure, the use of Twitter at times of global-reaching events and tragedies gets justified coverage, such as Mumbai, or U.S earthquakes. But it’s also worth noting the difference it can make it personal instances – and if you’re only dealing with Tweeters you know, there’s already an implied reliability.

Twitter’s SMS service loses Canada. Now just U.S and India

It seems that Canada has joined the rest of the world in losing the ability to receive Twitter updates via SMS, as revealed on the Twitter Status Blog. As with the rest of the world, the blame is placed squarely at Mobile carriers:

‘We can’t afford to support this service given our current arrangement with our providers (where costs have been doubling for the past several months.)’

The post continues:

‘The ability to update Twitter over SMS will still be supported over 21212. But we know that this is only part of the experience and we want to make Twitter work in the way folks want … regardless of where they live.

There is a realistic, scalable SMS solution for Canada (and the rest of the world.) We’re working on that and will post more details on the Twitter blog as we make progress.’

It seems a little strange this appeared on the Status Blog, and not the Official Company Blog, which is what happened when we lost Twitter updates via SMS in the UK. And at the time, there was the promise of several new local SMS services across Europe – but I don’t think anything has been arranged yet, and to be fair, if you’re not being monetised or bought by Facebook, then the costs do start to add up:

‘Even with a limit of 250 messages received per week, it could cost Twitter about $1,000 per user, per year to send SMS outside of Canada, India, or the US.’

SMS is obviously a hugely profitable enterprise for mobile providers currently. And I doubt much will change on that front for some time – but hypothetically, with the rise of smart phones and access to social networks (and fortunately, Twitter and clients), could this a cause for even the start of a decline in SMS usage? Any mobile phone experts got any idea of the figures, and whether smart phone usage means less SMS?

Terrorist attacks in Mumbai – Twitter becomes source for updates

As the full horror of the ongoing terrorist attacks in Mumbai (Bombay) unfolds, Twitter has once again become the place to find first hand accounts and updates. So much so, that CNN is citing both Twitter and Flickr as the places to keep up with the latest updates, as updated by @Moto62 and many others.

Meanwhile @BreakingNewz is trying to raise awareness of a blood shortage at JJ Hospital due to the attacks. And @hemanshukumar provides a phone number to donate at St George’s hospital. And @Netra provided a direct contact for the blood bank at JJ Hospital.

Other reports on the role Twitter is playing in relaying first hand reports and reactions to the news include Techcrunch, and GigaOm.

Responses and reactions are flowing incredibly fast on Twitter, and you can follow the stream here. (Flickr results are here). Or you can follow a localised Twitter search updates.

It’s hard to find the right words to express the sympathy I have for everyone there right now, but seeing individuals sharing important information to help each other is a reminder of the good in the world. And also that in the debates about monetising microblogging, perhaps we’ve missed a far more important role and legacy we could be helping to develop further as a response tool to tragic situations.

140char quoted on BusinessWeek!

While it was an honour to be asked to contribute to an article which appeared on Businessweek.com recently, I was a bit reluctant to post a link until an error had been corrected, but seeing as it still hasn’t happened, I thought I might as well clear up the confusion here.

The article in question is ‘Building a Better Twitter‘, and to clarify – although I am indeed Community Marketing Manager at Bauer Media, and I may occasionally refer to some of the work I do for my day job involving microblogging, this blog is not owned by Bauer Media, or in any way endorsed by my employer – it’s something I do as a personal project in my spare time, and all views and opinions published are my own, and are not representative of my employer.

On a brighter note, Darren Rowse kindly commented on my last post – highlighting how much more responsive the blogging world in general is to monitoring what is going on and ensuring assuracy and dialogue!

And finally, while I continue to work out how 140char is going to continue to progress, I’m going to air a minor irritation I’ve encountered with some of my new followers – if you’re going to follow me, and you’ve got your Twitter updates protected, are you just looking for me to broadcast at you? Am I meant to guess whether to repripocate? Or wouldn’t it be helpful for you to maybe send me a message telling me who you are?…

Twitter trojan malware – and some site/tool updates

There’s been quite a lot of coverage over Malware arriving on Twitter, rather than just irritating spam. A link to a pornographic film prompts you to download a new version of Adobe Flash – which is actually a downloader containing 10 banking Trojans disguised as MP3s. There’s loads more details, here. So, as with any other email or weblink from someone you don’t know, treat links as suspicious – and downloads doubly so. If not more!

On a brighter note, I’ve made some updates to the Tools page to include some new additions, such as sites like Globme, Blippr and Beemood. Plus more tools like Phweet and Posty. There are loads more than need adding shortly, and we’re speaking with the creators of some of them to get more information on the how, why, and what next for the most popular, most interesting and most useful of the bunch.

Earthquake hits U.S – and Twitter

As with the earthquakes in the UK and China, the first I heard about the earthquake today in America was on Twitter. Whereas most news sources will be busy subbing their efforts, people are updating Twitter whilst events are going on around them.
Great for anyone who wants to find out about the news as it happens – worrying for the people who could end up in danger because they’re glued to their PC/mobile instead of finding a doorway!
July 29 US Earthquake on Twitter

More activity leads to more attention on Twitter

What I think is useful to know

I am a psychologist and I am mostly interested in why we use Twitter: what do we hope to achieve? But hope is a function of our ability to see a goal and road or pathway to the goal. So, I am also interested in how people use Twitter. A good set of numbers or metrics is always a good starting point for seeing what is possible and what is not.

Good reference site

I’ve discovered a blog that presents lots of numbers. A year old post on “types of Twitter users” is interesting.

The article begins with a 2×2 model beloved of management theorists. People with lots of followers and lots of updates are stars. People with lots of followers and few updates are influentials. People with lots of updates and few followers are bots. And finally, people who have few followers and few updates are lurkers. We all started there.

When I look at the scattergrams, I think this 2×2 is forced. It looks to me that there is a very strong correlation between activity and followers.

The more you talk, the more followers you have!

What does this mean for planning your usage?

Do you intend to get bigger and bigger? Do you have an intuitive sense of a good size for you?

This week I shall be….

Mostly on the move.

So for updates, I’ll be mainly relying on the speed of Twitter, although I will try and make sure there are regular updates throughout my time abroad/away from a computer.

If you want to keep up with my Twitters, you will mostly find me here: