wordpress
发布时间:2022-05-06 发布网站:大佬教程 code.js-code.com
大佬教程收集整理的这篇文章主要介绍了WordPress建站教程:关闭自动更新功能,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
使用wordpress建站完成以后,打开后台经常会提示插件或wordpress版本需要更新,甚至会自定更新。wordpress自3.7版本以后推出了后台自动更新,定期更新wordpress的核心、主题和插件,来提高网站的安全性。有些时候,我们对wordpress或者插件的文件进行了一些修改,我们不希望自动更新,而且自动更新会占用服务器的资源。下面我们就介绍一下wordpress中关闭自动更新功能的方法。
1. 关闭后台更新提示
切换到主题目录,打开functions.PHP文件,加入以下代码:
Crayon-5c891d0a30f36523478798" class="
Crayon-
Syntax Crayon-theme-classic
Crayon-font-monaco
Crayon-os-pc print-yes notranslate" data-set
Tings=" minimize scroll-mou
SEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-set
Tings=" mou
SEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
Crayon-title">functions.PHPCrayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
Crayon-button
Crayon-nums-button"
title="Toggle Line
numbers">
Crayon-button-icon">
Crayon-button
Crayon-plain-button"
title="Toggle Plain Code">
Crayon-button-icon">
Crayon-button
Crayon-wrap-button"
title="Toggle Line Wrap">
Crayon-button-icon">
Crayon-button
Crayon-expand-button"
title="Expand Code">
Crayon-button-icon">
Crayon-button
Crayon-copy-button"
title="Copy">
Crayon-button-icon">
Crayon-button
Crayon-popup-button"
title="Open Code In New Window">
Crayon-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-main" style="">
Crayon-table">Crayon-row">Crayon-nums " data-setTings="show">Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"> Crayon-num" data-line=" Crayon-5c891d0a30f36523478798-1">1 Crayon-num" data-line=" Crayon-5c891d0a30f36523478798-3">3 Crayon-num" data-line=" Crayon-5c891d0a30f36523478798-5">5 Crayon-num" data-line=" Crayon-5c891d0a30f36523478798-7">7 | Crayon-code">Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size :4; -o-tab-size :4; -webkit-tab-size :4; tab-size :4;"> Crayon-line" id=" Crayon-5c891d0a30f36523478798-1"> Crayon-c">//移除更新提示Crayon-line Crayon- Striped-line" id=" Crayon-5c891d0a30f36523478798-2"> Crayon-t">functionCrayon-h"> Crayon-e">remove_core_updatesCrayon-sy">(Crayon-sy">)Crayon-sy">{Crayon-line" id=" Crayon-5c891d0a30f36523478798-3"> Crayon-h"> Crayon-m">globalCrayon-h"> Crayon-sy">$Crayon-v">wp_versionCrayon-sy">;Crayon-st">returnCrayon-sy">(Crayon-t">objectCrayon-sy">)Crayon-h"> Crayon-t">arrayCrayon-sy">(Crayon-s">'last_checked'Crayon-o">=Crayon-h"> Crayon-e">timeCrayon-sy">(Crayon-sy">)Crayon-sy">,Crayon-s">'version_checked'Crayon-o">=Crayon-h"> Crayon-sy">$Crayon-v">wp_versionCrayon-sy">,Crayon-sy">)Crayon-sy">;Crayon-line Crayon- Striped-line" id=" Crayon-5c891d0a30f36523478798-4"> Crayon-sy">}Crayon-line" id=" Crayon-5c891d0a30f36523478798-5"> Crayon-e">add_filterCrayon-sy">(Crayon-s">'pre_site_transient_update_core'Crayon-sy">,Crayon-s">'remove_core_updates'Crayon-sy">)Crayon-sy">;Crayon-line Crayon- Striped-line" id=" Crayon-5c891d0a30f36523478798-6"> Crayon-e">add_filterCrayon-sy">(Crayon-s">'pre_site_transient_update_plugins'Crayon-sy">,Crayon-s">'remove_core_updates'Crayon-sy">)Crayon-sy">;Crayon-line" id=" Crayon-5c891d0a30f36523478798-7"> Crayon-e">add_filterCrayon-sy">(Crayon-s">'pre_site_transient_update_themes'Crayon-sy">,Crayon-s">'remove_core_updates'Crayon-sy">)Crayon-sy">; |
2. 关闭自动更新功能
切换到网站根目录,打开config.PHP文件,加入以下代码:
Crayon-5c891d0a30f3f574377447" class="
Crayon-
Syntax Crayon-theme-classic
Crayon-font-monaco
Crayon-os-pc print-yes notranslate" data-set
Tings=" minimize scroll-mou
SEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-set
Tings=" mou
SEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
Crayon-title">wp-config.phpCrayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
Crayon-button
Crayon-nums-button"
title="Toggle Line
numbers">
Crayon-button-icon">
Crayon-button
Crayon-plain-button"
title="Toggle Plain Code">
Crayon-button-icon">
Crayon-button
Crayon-wrap-button"
title="Toggle Line Wrap">
Crayon-button-icon">
Crayon-button
Crayon-expand-button"
title="Expand Code">
Crayon-button-icon">
Crayon-button
Crayon-copy-button"
title="Copy">
Crayon-button-icon">
Crayon-button
Crayon-popup-button"
title="Open Code In New Window">
Crayon-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-main" style="">
Crayon-table">Crayon-row">Crayon-nums " data-setTings="show">Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"> Crayon-num" data-line=" Crayon-5c891d0a30f3f574377447-1">1 | Crayon-code">Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size :4; -o-tab-size :4; -webkit-tab-size :4; tab-size :4;"> Crayon-line" id=" Crayon-5c891d0a30f3f574377447-1"> Crayon-e">defineCrayon-sy">(Crayon-h"> Crayon-s">'AUTOMATIC_updatER_DISABLED'Crayon-sy">,Crayon-h"> Crayon-t">trueCrayon-h"> Crayon-sy">)Crayon-sy">; |
大佬总结
以上是大佬教程为你收集整理的WordPress建站教程:关闭自动更新功能全部内容,希望文章能够帮你解决WordPress建站教程:关闭自动更新功能所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。