WordPress asking for FTP username/password while installing plugin


Does your WordPress site ask you for FTP login information every time you want to add, delete or upgrade a plugin? So now don’t worry there’s a simple solution which will save the FTP login (username/password/server) so WordPress will stop asking you for FTP details Here’s how you can do it :

1.  Locate your WordPress root diectory and find the “wp-config.php” file.

2.  Edit the file and insert this somewhere in the middle as it’s own block, we normally put it after the mysql username/password block.
====================================
/*** FTP login settings ***/
define(“FTP_HOST”, “localhost”);
define(“FTP_USER”, “yourftpusername”);
define(“FTP_PASS”, “yourftppassword”);
====================================
Of course you’ll need to change “yourftpusername” and “yourftppassword” to the actual FTP usernames/passwords for your site. Once you’ve made that edit, save the file. Now it won’t ask you your ftp username and password all the time.
🙂🙂

13 Responses to “WordPress asking for FTP username/password while installing plugin”

  1. This actually does work, however you will need to remove all the ” marks and replace them with ‘ instead, this is what php understands. I have tested this one on a new server of mine and it works like a charm.

    Thanks,

    Nick

  2. Great bit of code, needs the ” replaced with ‘ like Nick Simpson said above but apart from that seems to work a treat with 3.0.1

  3. Thanks for this – I do however get this message when I do this:

    Plugin could not be deleted due to an error: Unable to locate WordPress Plugin directory.

    Whether I add this to wp-config or enter it when it comes up. I am running WP locally.

    Thanks!

  4. I there another option for configuring my wordpress install so it won’t ask for Connection Information? I’ve installed many wp sites before now this is causing my theme to malfunction on a new site I’m setting up.

    Is this something new with 3.0.1 or something else?

  5. thanks. its works. just replace ” with ‘ everywhere in given code. it acts like a magic. thanks again……..

  6. just add the line:
    define(‘FS_METHOD’,’direct’);
    to your wp-config.php to comepletely disable the ftp while making an upgrade…

  7. This is a problem with the host, namely Apache running as a user that wordpress cannot acess permissions to create directories, it is a problem that should be solved by editing the appropriate file in Apache.

    • Kerron Parchment Says:

      I am having this problem. Do you know which Apache file i need to edit? This tutorial didnt work for me. Been having this problem for days.

  8. Just add this single line in wp-config.php file and You are done !
    You don’t need to know you FTP username and password🙂
    define(‘FS_METHOD’,’direct’) ;

  9. How safe is this method? Giving a file on my site the FTP login details seems risky?

  10. I found final solution on following blog. If you use the code which is giving in following URL. You dont need to put ftp username and password details.
    http://wordpressapi.com/2012/03/12/install-and-update-wordpress-plugins-without-providing-ftp-access/#comment-28800

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: