patrickfitzg's picture

I am having trouble with FTP on Wordpress with Turnkey: I cannot update Wordpress or install new themes. It seems to boil down to FTP. I just cannot get it working.

I have read:

This is partially helpful, in that it is telling me the nature of the problem, but nothing I try on this page seems to work. As well, there is lots of conflicting advice in the comments. One can never tell whether wrong step has ruined right step's ability to work.

Steps to reproduce:

1. Log into WordPress

2. Navigate to Appearance>>Install Themes

3. Open a Theme demo

4. Click on Install

5. Get FTP page and try many variations on the Ip address with protocols and ports. (see image)

I do think that I have not sorted out the permissions issue highlighted in the article above. I am lost.

Can you help?

Jeremy Davis's picture

chown -R www-data:www-data /var/www

Theregied's picture

This post is really very helpful for me. Thanks for sharing it. You have solved my problem.

patrickfitzg's picture

Jeremy, thanks. I had already tried that and it did not work.

I typed and ran the command. There was no feedback at the prompt, which I am led to believe is the *nix way of saying "done".

Tried the update later and I got 



Downloading update from

Unpacking the update…

Could not copy files.

Installation Failed


I tried the FTP connection through FileZilla Client and I got:

Connection attempt failed with "EAI_NODATA - No address associated with nodename".


any suggestions? I am sure I am missing something fundamental that a non-noob knows instinctively.



Jeremy Davis's picture

Sorry that didn't work, I was pretty sure it would... :(

I don't use WordPress, but from my reading I'm sure that it's a permission issue (like noted in the article). Perhaps the directory that the installs need to go in is read only (even when owned by www-data)?

AFAIK the FTP request is aimed at WordPress users on shared hosting, not on dedicated servers (like TKL is). TKL does not have a stadard FTP server installed (only SFTP via OpenSSH - and as www-data is not allowed to login as a normal user SFTP won't work).

Acording to the article you link to WP only needs write access to the wp-content/plugins folder (which I assume is probably at /var/www/wordpress/wp-content/plugins) so try

chmod -R 655 /var/www/wordpress/wp-content/plugins

and check ownership and permissions

cd /var/www/wordpress/wp-content/plugins
ls -la

If that doesn't work, then I'm not sure sorry...

Brent Quick's picture

I did the "chown" part but not the "I also had to make the FS_Method,direct update in wp-config.php" part and it is now working.


Used turnkey-wordpress-13.0-wheezy-amd64.iso

Jeremy Davis's picture

There is also a workaround that means you don't need to use the plugin. From Issue #173:

1. Give the webserver ownership of the /var/www/wordpress/wp-content/ folder tree.

chown -R www-data:www-data /var/www/wordpress/wp-content

2. Add an entry to the wp-config.php file. Open it for editing:

nano /var/www/wordpress/wp-config.php

And add this:

define('FS_METHOD', 'direct');

Make sure it goes ABOVE this line:

/* That's all, stop editing! Happy blogging. */

3. Restart Apache:

service apache2 restart
Jeremy Davis's picture

Thanks for posting.

Jon's picture

I followed the above solution that David Taylor posted and was then able to update my plugins and themes through the Wordpress GUI. However when I go to update wordpress itself via the GUI I get the following.


Downloading update from…

Unpacking the update…

Could not copy files.

Installation Failed

Jeremy Davis's picture

My guess is that it is a permissions issue. Either the files downloaded belong to root (so www-data can't unpack them) or perhaps it's because root owns most of the WP files so www-data can't overwrite what it needs to...

Add new comment