WordPress FTP Connection Information

Have you been working with the latest version of WordPress – 2.8 through 2.8.2 – and found you can’t update a plugin or in some cases update WordPress using the “Update Automatically” functionality? This easy or auto upgrade functionality is a great addition to WordPress and it was a little disappointing to encounter this issue.

In this instance, I was doing a fresh install of WordPress for a client – WordPress version 2.8.2 – and I was at the stage of the process where I was installing the plugins. Every time I tried to upgrade a plugin I got the “FTP Connection Information” request screen. With a little research and knowing the FTP connection information I worked out what it needed in terms of username and password and I installed 1 or 2 plugins successfully. But it got me thinking that there must be an issue perhaps with file permissions or some other WordPress configuration issue.

First, I tried file permissions and working with the client’s hosting company I made some changes according to this page: http://codex.wordpress.org/Changing_File_Permissions. None of those settings actually fixed the issue but with the aid of the useful WP-Security Scan Plugin http://wordpress.org/extend/plugins/wp-security-scan/ I had the permissions set to the suggested settings on key files / folders identified by the plugin.

But, it’s still not working as seamlessly as one would expect. In fact I was still getting the “FTP Connection Information” error.

I performed some more searching and finally stumbled upon this idea that required adding a line of code into wp-config.php. The code is:

define('FS_METHOD', 'direct');

I can’t find any documentation related directly to this particular define code but it resolved the issue and as a by product of researching this issue I also felt that I had improved the security of the site using the security plugin. However, after further investigation I did find this “define” in the following document in the WordPress Codex : http://codex.wordpress.org/Editing_wp-config.php. Suffice to say you’d have to be happy editing wp-config.php anyway to be comfortable with this fix.

UPDATE: I’ve recently encountered this issue again and I stumbled on the fact that the “..” folder must also be owned by the webserver user id. In the case of my hosting service the user id Apache runs as is “www-data” so I ran “chown sean:www-data”. This time I didn’t receive the dreaded FTP Connection Information message.

Did you find this article helped you or perhaps you found another way around it? If so please comment.

With thanks to this article:

http://www.kgarner.com/blog/archives/2009/06/13/direct-auto-update-on-wordpress-2-8/

[ad#Google Adsense 468×60]

Leave a Reply

Your email address will not be published. Required fields are marked *