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.
🙂 🙂
February 23, 2010 at 12:15 am
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
August 4, 2010 at 12:28 pm
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
August 13, 2010 at 9:01 am
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!
September 10, 2010 at 10:22 pm
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?
December 21, 2010 at 11:13 am
thanks. its works. just replace ” with ‘ everywhere in given code. it acts like a magic. thanks again……..
February 6, 2011 at 9:53 am
just add the line:
define(‘FS_METHOD’,’direct’);
to your wp-config.php to comepletely disable the ftp while making an upgrade…
March 7, 2012 at 1:52 am
this worked perfectly, thanks a lot.
February 12, 2011 at 7:43 pm
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.
March 9, 2011 at 11:20 am
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.
June 8, 2011 at 7:15 pm
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’) ;
March 2, 2012 at 6:09 pm
You saved my day, been looking for a solution for hours, thank you very much!!
February 22, 2012 at 9:14 am
How safe is this method? Giving a file on my site the FTP login details seems risky?
March 12, 2012 at 6:31 pm
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