Support » Fixing WordPress » “Failed to connect to FTP Server…”

  • Hi!

    I’ve finally been able to setup WP on my Ubuntu 9.10 machine for local development only.

    I access WP via http://localhost/blog

    The issue that I am running into now is whenever I attempt to download a theme, or plugin, I receive the error, “Failed to connect to FTP Server localhost:21”

    I’ve been reading up on this, and it seems that some people are arguing ( that this has to do with improperly set permissions, so the installations via the WP web interface aborts and resorts to FTP (which ALSO doesn’t work for me).

    Ideally, I would just like the installation of themes/plugins to occur within the WP web interface, not through an FTP.

    Just a reminder that I am only using WP right now for local development on my home desktop machine.

    Anyway, if anyone can help me with this problem, it would be more than appreciated!

    P.S. I have also tried this guide here: but i dont believe it was meant for an Ubuntu localhost setup of WP. When i attempt the command “/usr/sbin/setsebool -P httpd_can_network_connect=1” that is located at the proposed solution about halfway down the webpage (after “What To Do To Fix the Permission and Upgrade Problem”), my terminal outputs: “-bash: /usr/sbin/sestatus: No such file or directory”. But anyway, i’m not sure if this is the right direction for a solution to this problem on my local setup.

Viewing 8 replies - 1 through 8 (of 8 total)
  • If you’re using WP locally, why not just download the plugins/themes to your local machine, unpack the archive and crop the files, or folders, into their relevant places within wp-content?

    hi esmi!

    i heard that this may be possible, but i was really looking to be able to have all the content installed through the WP interface. i’d like to know that there is no solution to my problem before i have to manually install every plugin/theme, etc.

    thanks for your suggestion,

    1) perform steps to confirm that your ftp server is actually running and accessible to the account credentials you are providing. The yes or no results can take a lot of heartache out of diagnosis.

    2) I think that the solution you tried above; “/usr/sbin/setsebool -P httpd_can_network_connect=1” might imply that you would be using SELinux security features, and I think that one might be intended to give scripts permission to access the network via httpd(apache). I can’t remember SELinux being a default feature in Ubuntu servers (although I have not set one up in a while). But that may be irrelevant.

    3) A and B proven true, try for the hostname when you try to upload via the dashboard.

    Hi Clayton! Thanks for the reply.

    Shouldn’t there be a way to make the WP interface do all the work without an FTP? It appears as though the FTP is actually just a secondary and external method to downloading files to the WP interface, where the primary option takes place all through the WP web interface (which is failing)?

    Thanks in advance for any help!

    chafic2783, I hope I’m not hijacking your thread here, but I have a similar setup — WP on Ubuntu 9.10 for local development — and am having similar problems.

    It’s my (still new) understanding that the WP interface uses FTP. I’m trying to install the syntaxhighlighter plugin and kept getting a message about not being able to ftp.

    I installed the vsftpd Ubuntu package. That took care of the ftp problem, but now it tells me that the /usr/share/wordpress/wp-content/ directory does not exist. It does, but has group permissions for www-data instead of root. Do I need to add myself to this group?

    I also have a account. My goal is to write my blogs locally where it is easier to play with the formatting, then upload them to my account. So I want my local account to behave like the account.

    Don’t confuse this process with your wordpress media uploader.

    It’s my (still new) understanding that the WP interface uses FTP

    Not quite a definable statement. FTP is a vital part of transferring files to and from any web site (server), but in this context, it’s use is pretty much limited to doing just that – Installing themes or plugins to your wordpress blog from within the admin interface via an existing FTP service and account on your server.

    I don’t believe that allows any ftp access on their blogs at all anyhow, and with, we should probably limit the idea of ftp to thinking about installing plugins or themes from within the dashboard, or as used above with an ftp client to access any part of your web space uninhibited. Anything beyond that is all server configuration issues. I will say that for a home network, with no real need to access the server from the WAN, an ssh server is a heck of a lot of fun ( and probably already installed by default on Ubuntu ) and very easy to set up and transfer files in and out of your development server from any other machine on your internal network. But you don’t need ftp or ssh to work locally. Like esmi said, download with your browser, un-zip or un-tar the file, and place the contents in the directory it belongs in.

    Good luck to you both.

    Hey ClaytonJames, I was having the same problem and tried the numeric host name and it worked! Thanks so much!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘“Failed to connect to FTP Server…”’ is closed to new replies.