Support » Fixing WordPress » WP asking for my FTP credentials to install plugins

  • Claire

    (@clairewickenden)


    WordPress is asking me for my SFTP credentials in order to install any plugins. I’m entering all the login information correctly, but it keeps on giving me a message reading:

    “Failed to connect to FTP server winnerswin.com:21”

    I also can’t upload ANY pictures or media whatsoever. I’m not sure what the problem is and any help here would be very much appreciated!

    (This is my first time dealing with SFTP… I’ve always dealt with FTP in the past. I think maybe the Secure aspect of it might have something to do with the prompts asking for my FTP credentials. But not sure if that is also why media won’t upload? And why it keeps failing when I’m entering the correct credentials?)

Viewing 15 replies - 1 through 15 (of 18 total)
  • Josh

    (@josh401)

    Moderator and Editor Customizer

    You should never have to enter any FTP information when adding plugins or working on your website.

    Are you using a plugin which forces this behavior?

    Claire

    (@clairewickenden)

    That’s what I thought too. I’ve never heard of this happening before. I have no plugins installed currently. So I’m really not sure why it’s doing this…

    Josh

    (@josh401)

    Moderator and Editor Customizer

    1. Deactivate ALL plugins.
    2. Switch to the default twentyeleven theme.
    3. Log out, close your browser.

    Now, open your browser and log back in. With NO plugins activated, go ahead and try to install a new plugin. Just pick one randomly. NOT one of your existing ones… but a new one from the search. Make sure it’s current and highly ranked.

    What happens?

    Claire

    (@clairewickenden)

    I did all 3 steps but I’m prompted with the same thing. It asks for my FTP information…see here:

    http://tinypic.com/r/2q9gp34/6

    Moderator cubecolour

    (@numeeja)

    ɹoʇɐɹǝpoɯ

    WordPress asks for your FTP credentials when it can’t access the files directly. This is usually caused by PHP running as the apache user (mod_php or CGI) rather than the user that owns your WordPress files.

    As a workaround you can put your FTP credentials directly in wp-config.php

    define( 'FTP_USER', 'username' );
    define( 'FTP_PASS', 'password' );
    define( 'FTP_HOST', 'ftp.example.org:21' );

    http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants

    Moderator Mark Ratledge

    (@songdogtech)

    Forum Moderator

    If you’re being asked for FTP info and can’t upload media, it’s a host permissions problem. What’s the site URL and who is the web host?

    I know it sounds silly, and I’m sure it’s probably just for the sake of the example in the image, but… I noticed the username “admin” in your ftps dialog. You aren’t by any chance using your WordPress admin login credentials in the ftp dialog fields by accident are you, instead of your ftp account credentials?

    Claire

    (@clairewickenden)

    @cubecolour: Tried that… it didn’t work unfortunately.

    @songdogtech: It’s http://www.winnerswin.com and the web host is Softlayer

    @claytonjames: That’s actually just what was there by default. I wasn’t using the WP admin credentials, but thanks for pointing that out. Probably something I would’ve done if I had less sleep, ha.

    Just checking to be sure. You may want to remove your real ftp login from your comments above while you can still edit it, though – don’t want to give too much away! 🙂

    Moderator Mark Ratledge

    (@songdogtech)

    Forum Moderator

    @clairewickenden: cubecolor is right and that’s a good suggestion to put FTP creds in wp-config.php as a workaround to the problem. And @claytonjames makes a good point: your FTP creds are not the same as your WP login.

    If you don’t have FTP info, you need to set up an FTP account in Cpanel or other system that softlayer uses, or look in the emails you got from softlayer for FTP creds.

    But if you also can’t upload images, that points to needing to make permission changes at the host with FTP.

    See Filezilla and FTP Clients « WordPress Codex.

    Max

    (@clementsm)

    @cubecolour is correct, that is WordPress programmed behaviour to ask for FTP credentials if it cannot write to the file system, usually for the reasons he mentioned, however, his scenario should not really be happening in shared hosting (which you most likely are using?) – unless you have really bad hosting, where they run the PHP process usually using suPHP, therefore

    @songdogtech is also correct, in that is most likely a host file permissions error, so try to reset the permissions on your WordPress install.

    Directories should be mode 755 and files 644.

    Claire

    (@clairewickenden)

    @claytonjames: Oops.. Thanks!

    @songdogtech: cubecolour’s suggestion was smart, but for some reason that didn’t help the problem. I already have an FTP account which I have been using for Filezilla. Which is weird to me that I can use the FTP login information on Filezilla without any issues, but WordPress doesn’t seem to recognize it as correct… Or maybe there is a problem with the permissions.. (I figured out I can upload Plugins manually into Filezilla (plugin folder), but images won’t upload manually… well they do (and I had to create an “uploads” folder), but they don’t appear on the media section of WP. The images are nowhere to be found.

    Claire

    (@clairewickenden)

    @max: thanks! I’ll try that.

    Moderator Mark Ratledge

    (@songdogtech)

    Forum Moderator

    Claire

    (@clairewickenden)

    Hmm… All directories are already 755 and files are already 644…

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘WP asking for my FTP credentials to install plugins’ is closed to new replies.