WordPress Automatic Updates broken, asks for Connection Information – fixed!


Automatic updates of plugins and wordpress itself does not work with lighttpd out of the box. No matter how much I searched for an answer to why this was happening, I couldn’t seem to find anyone that addressed the problem and came up with a solution. I wanted to fix the WordPress plugin Automatic Updates asking for Connection Information problem, but most people are using generic shared hosting with no real access to their server. And a large chunk of those users are on windows or using apache so that’s no help to me. Some people are doing more harm than good telling everyone to go change their file permissions to 777 or chown all the files to the web server user. But… I… finally… figured… it… out! To start with, here are some dead-end answers that you will find searching out there in the wastelands:

====Things that are not the problem====

The real problem is a php function called getmyuid() which “Gets PHP script owner’s UID”. Ok, so permissions and ownership may still be an issue for you, and you may not even have the right temp directory set up that file.php is looking for, but if everything else is correct, go edit wp-admin/includes/file.php and change the getmyuid() call to posix_getuid() instead. You can expect to have access to the functions, but to avoid any warnings or errors it checks if the functions are callable first, so you may as well change that one too. See below for the detailed change:

After that simple change, my updates starting working just fine.

Ahhhh much better. No more asking me to fill in Connection Information for some silly ftp manual update blah.



5 thoughts on “WordPress Automatic Updates broken, asks for Connection Information – fixed!

  1. Brilliant. I’ve been trying to figure that out on my dev machine for ages. Thanks.

  2. Link exchange is nothing else however it is only placing the other person’s webpage link on your page at appropriate place and other person will also do similar in support of you.