Fixed WP 2.5 plugin auto upgrade

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.


相关日志

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>