Wordpress Theme/Plugin Install/Update Failure

February 26, 2018 1.3k views
WordPress Nginx LEMP Ubuntu 16.04

I followed this tutorial on a Wordpress install I have at /var/www/html/wp. This WP install, perhaps should be noted, was installed via the Duplicator install.php process for moving WP blogs. Everything seems to be working, except I can't update themes/install plugins.

The tutorial touches on this in common issues, but offers nothing that has helped.

The main error I get is: Public and Private keys incorrect for user which supposedly indicates a permission error, but I have verified that all the permissions are as stated in the tutorial.

If I use the common FS_METHOD trick,, all that does is change my error into: Update Failed: Could not create directory.

I've also already tried to just go ahead and chown -R the whole directory structure back to the default www-data user/group but nothing changes (even after restart nginx).

I'm not sure what more to try at this point. There are no errors in the nginx error.log. I'll share the perms set in case something odd is spotted:

(The WP dir in /var/www/html)
drwxr-xr-x 7 wpuser  wpuser  4096 Feb 26 05:15 wp

(The SSH keys in the /home/wpuser)
-rw-r----- 1 wpuser www-data 3243 Feb 25 04:58 wp_rsa
-rw-r----- 1 wpuser www-data  744 Feb 25 04:58 wp_rsa.pub
1 Answer

You need to run sudo chown -R www-data /var/www/html, then do the install or any future updates.

Have another answer? Share your knowledge.