WordPress asking for FTP info when trying to install plugins, themes, updates, etc.

I was having this issue with a site and the fix was to add the FTP info to the wp-config.php file. Keep in mind that I had FTP info that worked using an FTP client, but that same info did not work in WordPress when trying to install a plugin, theme, updates, etc.

The info on this page fixed it for me:


I tried first to just add the host, un, and pw info, but that didn’t work.

define( ‘FTP_USER’, ‘myun’ );
define( ‘FTP_PASS’, ‘mypw’ );
define( ‘FTP_HOST’, ‘ftp.mysite.com’ );

I then tried adding a bunch of other stuff:

define( ‘FS_METHOD’, ‘ftpext’ );
define( ‘FTP_BASE’, ‘/var/www/html/’ );
define( ‘FTP_CONTENT_DIR’, ‘/var/www/html/wp-content/’ );
define( ‘FTP_PLUGIN_DIR ‘, ‘/var/www/html/wp-content/plugins/’ );

This didn’t work either. It wasn’t until I changed the host to “localhost” that it worked.




Thank you for reading!

It's only fair to share...Tweet about this on Twitter
Share on Facebook
Email this to someone