When I automatically update WordPress, how does it grab files from another server and store them on my server? It doesn't have ftp access rights. Does anyone know?
views:
58answers:
3It can use PHP's fopen function, if Wordpress's directory is writable. Otherwise it will ask for the FTP username and password.
As for actually fetching the file from a remote server I believe it uses curl
According to this thread on the Wordpress forums auto-update works in a variety of ways to try and update itself:
On some hosts (notably ones that run "suPHP", allowing the software to run with the file owner's credentials instead of with the webserver credentials), the software has access to modify its own files directly. In those cases, update simply happens using the 'direct' mode.
On other hosts, it doesn't have the access to modify its own files and maintain the same ownership and permissions and and such. Those latter hosts give the FTP login credentials, and WordPress attempts to log in to itself via FTP, in order to be able to change the files using the proper user credentials.
On a technical level, I believe the actual fetching of files is done through cURL.