romerornd
By:
romerornd

Wordpress 3.6 auto update failed

August 5, 2013 9.8k views
"Downloading update from http://wordpress.org/wordpress-3.6-new-bundled.zip… Unpacking the update… Could not copy files. Installation Failed" Not sure what setting needs to change to allow auto-updates tot take place. Is it file permissions?
20 Answers
Can't upload plugins through WordPress, or insert images either. What am I missing?
Did you follow an article on installing Wordpress? If so, can you please link it?

Also, where are your files stored?
I installed WordPress on Ubuntu 12.10 through the applications tab when creating my droplet. The files for the install are stored in: /home/wordpress/public_html
Can navigate to your public_html directory and execute:
ls -l


What's the owner:group of the various files?
Run the following command:

usermod -a -G www-data wordpress


Does that fix it?
Here's what I did to get updates working, fix permalinks, and allow plugins & themes to be installed from the dashboard. These came from the user comments in this post: https://www.digitalocean.com/community/articles/one-click-install-wordpress-on-ubuntu-12-10-with-digitalocean

To fix auto-updates:
chown -R www-data:www-data /home/wordpress

To fix permalinks:
1) Enable Mod Rewrite : sudo a2enmod rewrite
2) Change AllowOverride None to AllowOverride All : sudo nano /etc/apache2/sites-enabled/000-default
3) Restart Apache : service apache2 restart
romerornd just saved me a lot more annoyance than I was already. chown -R www-data:www-data /home/wordpress was enough to get me going again. Thanks again!
Thank you so much guys. The following commands has now allowed me to update my wordpress!

chown -R www-data:www-data /home/wordpress

Thanks again!
thanks guys it works for me but i want to know that what "chown -R www-data:www-data /home/wordpress" exactly does ? is there any requirements of undo this or is it secure.? plz guide me.

thanks.
@Nishant: It changes the ownership of all the files and directories in /home/wordpress to the www-data user so that wordpress can overwrite its files when updating.
@Kamal, yes it seems that the command is changing the file owner "chown" used for that but i want to know who is "www-data" ?
www-data is the user apache and php run as.
Hi

I'm having the same problem with FTP versus uploading through WordPress (image upload and updates). If chown -R 33:33 public_html is used then updates and uploads work but FTP fails. If I change chown -R 1000:1000 public_html then FTP works but WP updates and uploads fail.

I hope that is clear.

So, using groups command

groups wordpress
wordpress: wordpress www-data

groups www-data
www-data: www-data wordpress

Obviously I'm not getting something correct here. I want to be able to upload through FTP and have upload images and WP updates working without having to chown each time ...
@layne.heiny: Try running these commands:

chown -R wordpress:wordpress /home/wordpress/public_html

chmod -R g+w /home/wordpress/public_html
In CentOS I needed to use the "apache" user and the path to my wordpress files like this:

sudo chmod -R apache:apache /var/www/mydomain.com/public_html

This post resolved my situation with some intuition ;). Hope this helps!

Cheers
Just wanted to chime in that romerornd's solution worked perfectly to update to WordPress 3.7!
CentOS 6.4 command line
chmod -R g+w /var/www/Your-install-location
chown -R youruser:youruser /var/www/Your-install-location
Romerornd's solution worked for me too.

Can you fix the permissions at droplet creation time for the wordpress app?

Apart from that the wordpress app works beautifully.
Have another answer? Share your knowledge.