Report this

What is the reason for this report?

Updating Wordpress on LEMP 16.04 failed - problem with permissions?

Posted on August 21, 2016

I’m new to VPS and Wordpress, and I’m trying to learn more about while I set up my website.

I tried to update to WP 4.6 through my Wordpress backend via the one-click process, but it failed and I got this error.

Downloading update from https://downloads.wordpress.org/release/wordpress-4.6-no-content.zip…

Unpacking the update…

The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

Installation Failed

I followed the following tutorials for the initial setup:

https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04 https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04 https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-04

Do I need to do something else with permissions that these tutorials didn’t cover? Should I try to upgrade through SSH instead of the WP backend?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi,

This usually has to do with the user that PHP processes run as. Not sure what yours is but if you put this in a small php page you can see:

<?php phpinfo(); ?>

Which you most likely have already done from this guide you listed: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04

As a quick rule I make the document root and all files/subdirectories owned by the php process executing user. I made the directories 755 and the files 644:

cd document_root find . -type d -exec chmod 755 {} ; find . -type f -exec chmod 644 {} ;

There may be some other web server (apache / nginx) related configuration issues, but this should give you a good start.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.