WP 免FTP和屏蔽更新的方法
1,免FTP安装插件和主题:
在wp-config.php中加入以下代码:
/* 免FTP /
define("FS_METHOD", "direct");
define("FS_CHMOD_DIR", 0777);
define("FS_CHMOD_FILE", 0777);
2,屏蔽更新:
在相应主题的functions.php后面加入以下代码:
function remove_core_updates(){
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates'); //WordPress核心
add_filter('pre_site_transient_update_plugins','remove_core_updates'); //WordPress插件
add_filter('pre_site_transient_update_themes','remove_core_updates'); //WordPress主题
作者: 牛仔抄
下一篇
发表评论: