doumei9589 2018-05-30 13: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 13: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条)

报告相同问题?