WordPress Update Failed: Warning: touch() [function.touch]: Unable to create file…
Recently, I reconfigured on of my WordPress installations to run as WordPress MU, instead of the standard, single site platform. This was perfect for me because now every time I create a new site, I don’t have to create a new database, install plugins, ect. It really gives me a head start with a basic template for every new site.
As awesome as this new setup is, I almost immediately ran into problems. I could not install any plugins via the web interface! I also couldn’t update WordPress! I am perfectly capable of doing things manually, but it was just so much quicker for me to do things from the web interface, but everytime I tried, I ran into this error:
Warning: touch() [function.touch]: Unable to create file…because Permission denied in \[mydomain]\wp-admin\includes\file.php on line 175
This was a problem. I first dove into file.php and looked for line 175, changed some permissions around, but no luck. That’s when I asked my close friend Google.
I read everything from server incompatibilities, to my host not allowing access to my server’s temp folders. I am sitting on a VPS, so i was just about to dive in and start making some changes, when I found my solution here. It turns out I needed 2 things.
First I added the following line to the bottom of my wp-config.php file:
define(‘WP_TEMP_DIR’,ABSPATH.’wp-content/uploads/’);
And then I made my “wp-content/uploads” folder writable.
It was a simple as that, problem solved.
Thanks! Saved my life.
Hey there, for my current install (WordPress 3.4.2) this fix does not work. The error is now also on line 177… :S
This fix likely just applied to an older version of wordpress. I haven’t had the issue since, but I suspect it is a permission issue.
You might try this plugin to verify everything is set the way it should be:
http://wordpress.org/extend/plugins/wp-file-permission-check/
The other thing you may try is contacting your host, as they may have more strict permissions in place.
Thanks.
that’s work on my website file. 😀
Thanks !
Moved a copy of my live site to a test environment and struggled to get a new plugin installed.
Your tip did the trick for me !