Droplet with ubuntu server + apache + Wordpress 4.8 fails to upgrade to 4.9

We’re experimenting problems trying to upgrade wp 4.8 to 4.9

It’s fails indicating there’s an issue with access permissions.

We have checked all around and we haven’t detected the problem, so far.

Anyone else experimenting this issue?

We cannot upgrade but we can see that the new version has been downloaded into a new folder into upgrade folder indicating Wordpress-4.9

Help, please.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Accepted Answer

In my experience, there are several things it could be. Either file/folder permissions are incorrect, or the file/folder ownership is incorrect.

Before I offer any advice, I must cover and emphasize the following: Step #1: ALWAYS make a backup of your site files, database, and any other important data. Step #2: NEVER skip step #1 Step #3: Verify you have a working backup and that you have it in several locations just in case one of the backups is compromised at some point in time.

Now that you have made backups…

The most common fix for me when I encounter this issue is file/folder ownership.

Apache has the user www-data for permissions to do things on the server. You may need to give this user ownership of your WordPress files.

To do this go to your server terminal and enter the comand:

sudo chown -R www-data:www-data /path/to/wordpress/

To explain a bit, “chown” is the command to change the ownership of the files… “-R” make the command recursive. Meaning… this will effect all files/folders inside the WordPress folder.

“www-data:www-data” this is a way of expressing USER:GROUP in the permissions. This gives user ownership to www-data and group ownership to www-data

“/path/to/wordpress” is the path from the root directory to get to your WordPress files. an example may be: “/var/www/html/wordpress/” you will need to verify this is the case for your setup to see if your files are here.

Once the command executes, this should change the ownership of the web files to www-data and would allow apache to make changes (such as update WordPress and plugins) to the web files.

Further reading on file permissions can be found:

Also, this guide seems helpful, though I have not tested the article myself:

Hope this helps!

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.