The auto-upgrade function in wordpress 2.5 is very useful. However, by default it does not runs on my installation. After spending some time reading its code, the fix it relatively easy.
Error: “Unable to locate WordPress directory”
Fix: modify file $WP_BASE/wp-admin/includes/file.php. Change function ” get_filesystem_method” at the bottom of this file to return “direct” without doing any check. Note, this may not work for other installation, but works fine for me.
Error: “Could not create directory”
Fix: create a folder inside $WP_BASE/wp-content/upgrade, and change the mode to 777.
Error: “Could not remove the old plugin”
Fix: change the mode of $WP_BASE/wp-content/plugins to 777.