Wordpress 2.5 has a great new feature called automatic plugin upgrade which basically upgrades your plugins automatically with a single click without needing to do it manually via ftp. For some reason i keep having to input my FTP details just before it’s about to upgrade. I’ve found a fix for this and i will tell you how to fix it below.

All you need to do is add the following code to your wp_config.php file:

define(’FTP_HOST’, ‘ftp://example.com/’);
define(’FTP_USER’, ‘example_user’);
define(’FTP_PASS’, ‘example_pass’);
//Set to true if your host uses SSL connections
define(’FTP_SSL’, false);

I got the above code from this site, but there is a mistake in the code the author put…

define(’FTP_HOST’, ‘ftp://example.com/’)
define(’FTP_USER’, ‘example_user’);
define(’FTP_PASS’, ‘example_pass’);
//Set to true if your host uses SSL connections
define(’FTP_SSL’, false);

Spot the difference? There is a missing colon at the end of line 1. I hope this helps some of you that are having trouble with having to enter your ftp details everytime you go to automatically upgrade your plugins.