admin管理员组文章数量:1404352
When WordPress does plugin/theme/core updates, it creates a .maintenance
file which temporarily puts the site in maintenance mode. Sometimes this file does not get deleted and users are locked out of their site (until they search and find that they have to delete that file).
As plugin developer it's frustrating because I regularly get blamed for breaking their site.
My question: Under which circumstances is the file not deleted? Is there anything I, as a plugin developer, can do to avoid it?
When WordPress does plugin/theme/core updates, it creates a .maintenance
file which temporarily puts the site in maintenance mode. Sometimes this file does not get deleted and users are locked out of their site (until they search and find that they have to delete that file).
As plugin developer it's frustrating because I regularly get blamed for breaking their site.
My question: Under which circumstances is the file not deleted? Is there anything I, as a plugin developer, can do to avoid it?
Share Improve this question asked Dec 8, 2015 at 13:03 eteuberteteubert 1564 bronze badges 1- It's a good question. I too have recently had an update which never finished for some reason. – Admiral Noisy Bottom Commented Jan 28, 2020 at 10:08
1 Answer
Reset to default 0If you look inside of /wp-admin/includes/update-core.php
there is some good info within a comment around line 826.
Here are the steps the upgrader should take...
- Test unzipped location for select files to ensure that unzipped worked.
- Create the .maintenance file in current WordPress base.
- Copy new WordPress directory over old WordPress files.
- Upgrade WordPress to new version.
- Copy all files/folders other than wp-content
- Copy any language files to WP_LANG_DIR (which may differ from WP_CONTENT_DIR
- Copy any new bundled themes/plugins to their respective locations
- Delete new WordPress directory path.
- Delete .maintenance file.
- Remove old files.
- Delete 'update_core' option.
And to answer your question "Under which circumstances is the file not deleted?"
There are several areas of failure. For instance if PHP times out before step 6, then you will not be able to access any portion of your site. Also, since the upgrade will not continue where it left off, you will not be able to automatically remove old files and remove the 'update_core' option.
If the copy of the new WordPress over the old fails, then the worse is that the new WordPress directory will remain.
本文标签: pluginsUnder which circumstances is the maintenance file not deleted
版权声明:本文标题:plugins - Under which circumstances is the .maintenance file not deleted? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744796899a2625630.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论