WordPress Plugin Automatic Upgrade Patch

Webmasters running WordPress on a UNIX flavor server running Apache2 may have noticed that when you attempt to use the automatic upgrade option on your plugins page of the Dashboard, that you are prompted for a FTP login.

Rather than conjour up a FTP account you can patch one of your WordPress administration files to get the upgrade option to work. The patch suggested by rootninja modifies the function get_filesystem_method() found in wp-admin/includes/file.php by replacing the call to mygetuid() with a call to posix_getuid().

if( ! $method && function_exists(‘getmyuid’) && function_exists(‘fileowner’) ){

if ( getmyuid() == fileowner($temp_file_name) )

becomes

if( ! $method && function_exists(‘posix_getuid’) && function_exists(‘fileowner’) ){

if ( posix_getuid() == fileowner($temp_file_name) )

Of course, your webserver will need rw permissions to your plugin directory.

Thank you rootninja, I was getting a bit tired of manual installations and I agree, FTP blah.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • MySpace
  • Propeller
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

0 Comments »

No comments yet.

Leave a comment

Spam Protection by WP-SpamFree

Copyright © 1994 - 2010 Gossamer Web Design Lake Tahoe
Gossamer Computer Services, LLC
(530) 583-7989
135 Alpine Meadows Road, #22
PO Box 3433
Olympic Valley, CA 96146