• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
TheWayoftheWeb

TheWayoftheWeb

Content and Digital Marketing Specialists

  • Blog
  • The Cipher
  • About Us
    • Useful Resources For Businesses In Peterborough, UK
  • Contact Us
  • Show Search
Hide Search

updates

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

May 8, 2016 By Dan Thornton

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.

Fixing_Wordpress_Error_Failed_Temporary_File

 

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

February 2, 2009 By Dan Thornton

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

December 8, 2008 By Dan Thornton

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.

Then:

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

November 27, 2008 By Dan Thornton

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?

Twitter trojan malware – and some site/tool updates

August 7, 2008 By Dan Thornton

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.

  • Page 1
  • Page 2
  • Go to Next Page »

Primary Sidebar

Join us…

  • Facebook
  • Instagram
  • LinkedIn
  • RSS
  • Twitter

We only exist to deliver results for your business. So you get fresh Content, expert SEO, engaging Social Media, or a new Website which is right for you – and your customers.

We help you build your brand, reach more customers and increase your revenue

Search

Categories

Creative Commons License
This work by TheWayoftheWeb is provided under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Start growing your business today Contact Us

TheWayoftheWeb

Copyright © 2026· TheWayoftheWeb Ltd. Company Number 08038527. ICO registration: ZB397650