开发者

When automatically updating WordPress, how does it grab files from another server and store them on my server?

When I automatically update WordPress, how does it grab 开发者_如何学Cfiles from another server and store them on my server? It doesn't have ftp access rights. Does anyone know?


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.


It 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜