使用wordpress建站完成以后,打开后台经常会提示插件或wordpress版本需要更新,甚至会自定更新。wordpress自3.7版本以后推出了后台自动更新,定期更新wordpress的核心、主题和插件,来提高网站的安全性。有些时候,我们对wordpress或者插件的文件进行了一些修改,我们不希望自动更新,而且自动更新会占用服务器的资源。下面我们就介绍一下wordpress中关闭自动更新功能的方法。
切换到主题目录,打开functions.PHP文件,加入以下代码:
Crayon-5c891d0a30f36523478798" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">functions.PHP
Crayon-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-plain-wrap">
Crayon-main" style="">Crayon-table">
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-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">