Wordpress auto upgrade can't connect

Hi,

I've followed the Linode articles and set up my Ubuntu 12.04 server. Everything is working fine so far.

I have installed Wordpress and I can see my basic Wordpress installation working ok in my browser. However, when I try to upgrade something (a plugin, a theme, etc), I get sent to a page requesting my Connection Information:

Hostname - localhost

FTP username - username I use in Filezilla (SFTP mode)

FTP password - password I use in Filezilla (SFTP mode)

Connection Type - FTP or FTPS (SSL), I choose FTPS (SSL)

All my development so far has been on a local WAMP server so I never got sent to this page before.

When I fill out my connection information details, I get the following error:

Failed to connect to FTP Server localhost:21

Any ideas? Considering how popular Wordpress is, I'm hoping someone has had the same problem as me.

I'm a novice at servers and linux, but I'm learning as I go along.

Thanks :D

2 Replies

You probably haven't got a FTP server installed. The best way to install plugins/do upgrades is to temporarily change the wordpress file ownership to that of the PHP user which is normally www-data.

So something like chown -R www-data /path/to/wordpress

Then to put it back chown -R youruser /path/to/wordpress; chown -R www-data /path/to/wordpress/wp-content/uploads

(Note the uploads directory always needs to be writable by the PHP user if you support file uploads).

Thanks obs. That works :-)

I was hoping there was a more permanent solution, but I can live with this.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct