{"id":1846,"date":"2024-06-05T20:19:59","date_gmt":"2024-06-05T12:19:59","guid":{"rendered":"https:\/\/cn.raksmart.com\/blog\/host\/3861.html"},"modified":"2024-06-05T20:19:59","modified_gmt":"2024-06-05T12:19:59","slug":"%e5%a6%82%e4%bd%95%e7%a6%81%e6%ad%a2%e5%ae%a2%e6%88%b7%e5%81%9c%e7%94%a8%e5%bf%85%e8%a6%81%e7%9a%84wordpress%e6%8f%92%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/cn.raksmart.com\/blog\/website\/wordpress\/1846.html","title":{"rendered":"\u5982\u4f55\u7981\u6b62\u5ba2\u6237\u505c\u7528\u5fc5\u8981\u7684WordPress\u63d2\u4ef6"},"content":{"rendered":"<div class=\"entry-content e-content\" itemprop=\"description articleBody\">\n<p>\u65b9\u6cd51\u3001\u4f7f\u7528\u63d2\u4ef6\u7981\u7528WordPress\u7684\u63d2\u4ef6\u505c\u7528\u529f\u80fd<\/p>\n<p>\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u4e2a\u540d\u4e3a Disable Plugin Deactivation \u7684\u63d2\u4ef6\uff0c\u8be5\u63d2\u4ef6\u5c06\u4ece\u6240\u6709\u63d2\u4ef6\u4e2d\u5220\u9664\u201c\u505c\u7528\u201d\u94fe\u63a5\u3002\u7528\u6237\u4ecd\u7136\u53ef\u4ee5\u5b89\u88c5\u65b0\u63d2\u4ef6\uff0c\u5e76\u4e14\u53ef\u4ee5\u968f\u65f6\u81ea\u884c\u627f\u62c5\u7981\u7528\u6b64\u9884\u9632\u63aa\u65bd\u7684\u98ce\u9669\u3002<\/p>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u6700\u7b80\u5355\uff0c\u5b83\u8fd8\u4e3a\u5177\u6709\u7ba1\u7406\u5458\u89d2\u8272\u7684\u6240\u6709\u7528\u6237\u63d0\u4f9b\u5b8c\u5168\u63a7\u5236\u6743\uff0c\u4ed6\u4eec\u53ef\u4ee5\u968f\u65f6\u5173\u95ed\u5b83\u3002\u4f60\u9700\u8981\u505a\u7684\u5c31\u662f\u5b89\u88c5\u5e76\u542f\u7528\u8fd9\u4e2a\u63d2\u4ef6\uff0c\u7136\u540e\u5728 \u63d2\u4ef6 \u2013 Plugin Deactivation Settins \u9875\u9762\u8fdb\u884c\u8bbe\u7f6e\u3002\u53ea\u9700\u9009\u62e9\u201c\u7981\u7528\u63d2\u4ef6\u505c\u7528\u201d\u9009\u9879\u65c1\u8fb9\u7684\u201cEnable\u201d\u5373\u53ef\u5173\u95ed\u6240\u6709\u63d2\u4ef6\u7684\u201c\u505c\u7528\u201d\u94fe\u63a5\u3002\u60a8\u4e5f\u53ef\u4ee5\u7981\u7528\u63d2\u4ef6\u6fc0\u6d3b\uff0c\u8fd9\u5c06\u963b\u6b62\u7528\u6237\u6fc0\u6d3b\u4efb\u4f55\u5176\u4ed6\u63d2\u4ef6\u3002\u60a8\u8fd8\u53ef\u4ee5\u5173\u95ed\u63d2\u4ef6\u5220\u9664\u529f\u80fd\uff0c\u5e76\u9632\u6b62\u7528\u6237\u5b89\u88c5\u63d2\u4ef6\u66f4\u65b0\u3002\u6ce8\u610f\uff1a\u5207\u52ff\u5728\u5ba2\u6237\u7ad9\u70b9\u4e0a\u7981\u7528\u63d2\u4ef6\u66f4\u65b0\u3002\u8fd9\u4f1a\u635f\u5bb3WordPress\u7684\u5b89\u5168\u6027\uff0c\u5e76\u4f7f\u60a8\u7684\u5ba2\u6237\u7aef\u5bb9\u6613\u53d7\u5230\u5b89\u5168\u5a01\u80c1\u3002\u63a8\u8350\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/website\/wordpress\/1804.html\" target=\"_blank\" rel=\"noopener\">\u300a\u4f17\u591a\u535a\u5ba2\u7f51\u7ad9\u4e3a\u4ec0\u4e48\u9009\u62e9WordPress?\u300b<\/a><\/p>\n<p>\u65b9\u6cd52\u3001\u7981\u6b62\u505c\u7528\u7279\u5b9a\u7684WordPress\u63d2\u4ef6<\/p>\n<p>\u5982\u679c\u6d89\u53ca\u5230\u7f51\u7ad9\u6838\u5fc3\u529f\u80fd\u7684\u63d2\u4ef6\u53ea\u6709\u51e0\u4e2a\uff0c\u6211\u4eec\u5e76\u4e0d\u60f3\u5b8c\u5168\u7981\u6b62\u7528\u6237\u505c\u7528\u5176\u4ed6\u975e\u5fc5\u8981\u7684\u63d2\u4ef6\uff0c\u90a3\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee3\u7801\u6765\u5b9e\u73b0\u4ec5\u9650\u5236\u505c\u7528\u7279\u5b9a\u7684WordPress\u63d2\u4ef6\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u627e\u5230\u8981\u7981\u7528\u7684\u63d2\u4ef6\u4f4d\u7f6e\u3002WordPress\u63d2\u4ef6\u5b58\u50a8\u5728\u60a8\u7f51\u7ad9\u4e0a\u7684 wp-content\/plugins \u6587\u4ef6\u5939\u4e2d\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528FTP\u5ba2\u6237\u7aef\u8fde\u63a5\u5230<a href=\"https:\/\/cn.raksmart.com\/HK#VPS\" target=\"_blank\" rel=\"noopener\">\u9999\u6e2fVPS\u4e3b\u673a<\/a>\u6765\u67e5\u770b\u6b64\u6587\u4ef6\u5939\u3002\u5728plugins\u6587\u4ef6\u5939\u5185\uff0c\u60a8\u5c06\u770b\u5230\u8be5\u7f51\u7ad9\u4e0a\u5b89\u88c5\u7684\u6bcf\u4e2a\u63d2\u4ef6\u7684\u4e0d\u540c\u6587\u4ef6\u5939\u3002\u5728\u6bcf\u4e2a\u6587\u4ef6\u5939\u5185\uff0c\u60a8\u8fd8\u5c06\u627e\u5230\u4e00\u4e2a\u63d2\u4ef6\u6587\u4ef6\uff0c\u8be5\u6587\u4ef6\u901a\u5e38\u4ee5\u8be5\u63d2\u4ef6\u547d\u540d\uff0c\u5e76\u4ee5.php\u6269\u5c55\u540d\u7ed3\u5c3e\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u60a8\u9700\u8981\u5c06\u4ee5\u4e0b\u4ee3\u7801\u6dfb\u52a0\u5230\u4e3b\u9898\u7684functions.php\u6587\u4ef6\u3002\u63a8\u8350\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/website\/wordpress\/1815.html\" target=\"_blank\" rel=\"noopener\">\u300a\u5982\u4f55\u81ea\u5b9a\u4e49WordPress \u91cd\u7f6e\u5bc6\u7801\u9875\u9762\u300b<\/a><\/p>\n<p>add_filter( \u2018plugin_action_links\u2019, \u2018wpkj_disable_plugin_deactivation\u2019, 10, 4 );<\/p>\n<p>function wpkj_disable_plugin_deactivation( $actions, $plugin_file, $plugin_data, $context ) {<\/p>\n<p>if ( array_key_exists( \u2018deactivate\u2019, $actions ) &amp;&amp; in_array( $plugin_file, array(<\/p>\n<p>\u2018wpforms\/wpforms.php\u2019,<\/p>\n<p>\u2018woocommerce\/woocommerce.php\u2019<\/p>\n<p>)))<\/p>\n<p>unset( $actions[\u2018deactivate\u2019] );<\/p>\n<p>return $actions;}<\/p>\n<p>\u6ce8\u610f\u770b\u4e0b\u4e0a\u9762\u4ee3\u7801\u7684\u7b2c 6 \u548c \u7b2c 7 \u884c\uff0c\u6211\u4eec\u5206\u522b\u7981\u7528\u4e86 wpforms \u548c WooCommerce \u4e24\u4e2a\u63d2\u4ef6\u7684\u505c\u7528\u529f\u80fd\uff0c\u8fd9\u6837\u4e00\u6765\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728\u63d2\u4ef6\u5217\u8868\u9875\u9762\u770b\u4e0d\u5230\u5b83\u4eec\u7684\u505c\u7528\u94fe\u63a5\uff1a<\/p>\n<p>\u5982\u679c\u4f60\u8981\u7981\u7528\u5176\u4ed6\u63d2\u4ef6\uff0c\u5c31\u53c2\u8003\u7b2c6\/7\u884c\u7684\u4ee3\u7801\u6765\u6dfb\u52a0\u81ea\u5df1\u7684\u63d2\u4ef6\u4fe1\u606f\u5373\u53ef\u3002<\/p>\n<p>\u65b9\u6cd53\u3001\u901a\u8fc7\u7528\u6237\u89d2\u8272\u9650\u5236\u540e\u53f0\u529f\u80fd<\/p>\n<p>\u4ee5\u4e0a\u4e24\u79cd\u65b9\u6cd5\u90fd\u662f\u76f8\u5bf9\u7b80\u5355\u5730\u7981\u7528\u4e86\u63d2\u4ef6\u7684\u505c\u7528\u529f\u80fd\uff0c\u4f46\u662f\u5982\u679c\u6211\u4eec\u60f3\u5bf9\u5ba2\u6237\u7f51\u7ad9\u540e\u53f0\u9650\u5236\u66f4\u591a\u7684\u529f\u80fd\uff0c\u6211\u4eec\u5c31\u9700\u8981\u6839\u636e\u7528\u6237\u89d2\u8272\u6765\u505a\u66f4\u591a\u7684\u64cd\u4f5c\u3002\u5982\u679c\u60a8\u5bf9WordPress\u7684\u7528\u6237\u89d2\u8272\u65b9\u9762\u7684\u77e5\u8bc6\u8fd8\u4e0d\u662f\u5f88\u4e86\u89e3\u3002WordPress\u7528\u6237\u89d2\u8272\u4e0e\u7528\u6237\u80fd\u529b\/\u6743\u9650\u3002\u901a\u5e38\uff0c\u6211\u4eec\u5efa\u8bae\u521b\u5efa\u4e00\u4e2a\u201c\u7f16\u8f91\u201d\u89d2\u8272\u7684\u7528\u6237\u8d26\u53f7\u7ed9\u5ba2\u6237\uff0c\u7136\u540e\u4f7f\u7528 Adminimize \u63d2\u4ef6\u6765\u8bbe\u7f6e\u4ec5\u4f9b\u201c\u7f16\u8f91\u201d\u4f7f\u7528\u7684\u529f\u80fd\u3002\u4f46\u662f\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cAdminimize \u63d2\u4ef6\u7684\u8bbe\u7f6e\u9009\u9879\u975e\u5e38\u591a\uff0c\u9700\u8981\u5bf9WordPress\u5404\u9879\u529f\u80fd\u90fd\u6bd4\u8f83\u719f\u6089\u624d\u53ef\u4ee5\u8fdb\u884c\u8bbe\u7f6e\uff0c\u4e0d\u8fc7\u65e2\u7136\u6709\u80fd\u529b\u4e3a\u5ba2\u6237\u642d\u5efa\u7f51\u7ad9\uff0c\u5e94\u8be5\u8fd9\u4e2a\u8bbe\u7f6e\u4e5f\u4e0d\u5728\u8bdd\u4e0b\u4e86\u3002\u63a8\u8350\u76f8\u5173\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/website\/wordpress\/1842.html\">\u300a\u5982\u4f55\u5141\u8bb8\u535a\u5ba2\u7528\u6237\u5728WordPress \u4e2d\u5ba1\u6838\u8bc4\u8bba\u300b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b9\u6cd51\u3001\u4f7f\u7528\u63d2\u4ef6\u7981\u7528WordPress\u7684\u63d2\u4ef6\u505c\u7528\u529f\u80fd \u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u4e2a\u540d\u4e3a Disable Plug\u2026 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[672],"class_list":["post-1846","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/1846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/comments?post=1846"}],"version-history":[{"count":1,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/1846\/revisions"}],"predecessor-version":[{"id":1847,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/1846\/revisions\/1847"}],"wp:attachment":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/media?parent=1846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/categories?post=1846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/tags?post=1846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}