doumei9589 2018-05-30 05:15
浏览 39
已采纳

Wordpress - 停止插件请求更新

I'm looking for a way to actually stop plugins from querying their developers sites to find out if there is a new version.

From running New Relic on a client site I'm working on I can see that outside calls to developer sites (such as WPMUdev) take a hell of a long time to complete, and must be tying up CPU time that would be much better utilised by actual processes that are needed.

Needless to say, there is no reason for a live site to ever be updated directly, so I'm looking for a way to stop these queries happening. Updates can then be done on a local copy and pushed via GIT.

TIA, Thall.

  • 写回答

2条回答 默认 最新

  • dopgv00024 2018-05-30 05:24
    关注

    Disable automatic WordPress plugin updates:

    add_filter( 'auto_update_plugin', '__return_false' );
    

    Put above code in functions.php

    Disable automatic WordPress theme updates:

     add_filter( 'auto_update_theme', '__return_false' );
    

    Disable automatic updates in WordPress by adding this line of code in your wp-config.php file:

    define( 'WP_AUTO_UPDATE_CORE', false );
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部