{"id":3566,"date":"2025-06-12T01:03:02","date_gmt":"2025-06-11T17:03:02","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/wpdt\/3566.html"},"modified":"2025-06-12T01:03:02","modified_gmt":"2025-06-11T17:03:02","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-wordpress-%e4%b8%ad%e7%a6%81%e7%94%a8%e9%80%9a%e8%bf%87%e9%82%ae%e7%ae%b1%e5%9c%b0%e5%9d%80%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/3566.html","title":{"rendered":"\u5982\u4f55\u5728 WordPress \u4e2d\u7981\u7528\u901a\u8fc7\u90ae\u7bb1\u5730\u5740\u767b\u5f55\u529f\u80fd"},"content":{"rendered":"<div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--1\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/dyA-1-400x300.jpg\" alt=\"Bug&#32534;&#35793;&#29422;\" class=\"wp-image-1842\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<p class=\"my-0\">Bug&#32534;&#35793;&#29422;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#22312; WordPress &#20013;&#31105;&#29992;&#36890;&#36807;&#37038;&#31665;&#22320;&#22336;&#30331;&#24405;&#30340;&#21151;&#33021;&#21487;&#20197;&#36890;&#36807;&#20462;&#25913; <code>wp-config.php<\/code> &#25991;&#20214;&#26469;&#23454;&#29616;&#12290;&#36825;&#36890;&#24120;&#29992;&#20110;&#20445;&#25252;&#32593;&#31449;&#20813;&#21463;&#24694;&#24847;&#30331;&#24405;&#23581;&#35797;&#30340;&#25915;&#20987;&#12290;&#20197;&#19979;&#26159;&#22914;&#20309;&#25805;&#20316;&#30340;&#20855;&#20307;&#27493;&#39588;&#65306;<\/p>\n<h3>&#27493;&#39588; 1: &#25171;&#24320; <code>wp-config.php<\/code><\/h3>\n<p>&#39318;&#20808;&#65292;&#20320;&#38656;&#35201;&#25214;&#21040;&#24182;&#25171;&#24320;&#20301;&#20110;&#26681;&#30446;&#24405;&#19979;&#30340; <code>wp-config.php<\/code> &#25991;&#20214;&#12290;<\/p>\n<pre><code class=\"language-bash\">sudo nano wp-config.php<\/code><\/pre>\n<p>&#25110;&#32773;&#22914;&#26524;&#20320;&#19981;&#29087;&#24713; <code>nano<\/code> &#32534;&#36753;&#22120;&#65292;&#21487;&#20197;&#23581;&#35797;&#20351;&#29992;&#25991;&#26412;&#32534;&#36753;&#22120;&#22914; <code>vim<\/code> &#25110; <code>gedit<\/code> &#26469;&#32534;&#36753;&#25991;&#20214;&#65306;<\/p>\n<pre><code class=\"language-bash\">sudo vim wp-config.php<\/code><\/pre>\n<h3>&#27493;&#39588; 2: &#28155;&#21152;&#31105;&#29992;&#37038;&#31665;&#30331;&#24405;&#30340;&#20195;&#30721;<\/h3>\n<p>&#22312; <code>wp-config.php<\/code> &#25991;&#20214;&#30340;&#39030;&#37096;&#28155;&#21152;&#20197;&#19979;&#34892;&#20197;&#31105;&#29992;&#36890;&#36807;&#37038;&#31665;&#22320;&#22336;&#30331;&#24405;&#30340;&#21151;&#33021;&#65306;<\/p>\n<pre><code class=\"language-php\">define('AUTH_KEY',        'put your unique phrase here');\ndefine('SECURE_AUTH_KEY', 'put your unique phrase here');\ndefine('LOGGED_IN_KEY',   'put your unique phrase here');\ndefine('NONCE_KEY',       'put your unique phrase here');\ndefine('AUTH_SALT',       'put your unique phrase here');\ndefine('SECURE_AUTH_SALT', 'put your unique phrase here');\ndefine('LOGGED_IN_SALT',  'put your unique phrase here');\ndefine('NONCE_SALT',      'put your unique phrase here');\n\ndefine( 'WP_DISABLE_WP_ENV', true );<\/code><\/pre>\n<h3>&#27493;&#39588; 3: &#20445;&#23384;&#24182;&#20851;&#38381;&#25991;&#20214;<\/h3>\n<p>&#23436;&#25104;&#19978;&#36848;&#25805;&#20316;&#21518;&#65292;&#35760;&#24471;&#20445;&#23384;&#24182;&#20851;&#38381;&#25991;&#20214;&#12290;&#28982;&#21518;&#37325;&#26032;&#21551;&#21160;&#20320;&#30340; web &#26381;&#21153;&#22120;&#65288;&#22914;&#26524;&#36866;&#29992;&#65289;&#20197;&#20351;&#26356;&#25913;&#29983;&#25928;&#12290;<\/p>\n<h3>&#31034;&#20363;&#20195;&#30721;&#35299;&#26512;<\/h3>\n<p>&#22312;&#36825;&#20010;&#31034;&#20363;&#20013;&#65292;&#25105;&#20204;&#23450;&#20041;&#20102;&#20960;&#20010;&#23433;&#20840;&#23494;&#38053;&#21644;&#30416;&#20540;&#65292;&#36825;&#20123;&#20540;&#37117;&#26159;&#21807;&#19968;&#30340;&#65292;&#29992;&#20110;&#21152;&#23494;&#29992;&#25143;&#25968;&#25454;&#12290;&#36890;&#36807;&#35774;&#32622; <code>WP_DISABLE_WP_ENV<\/code> &#21464;&#37327;&#20026; <code>true<\/code>&#65292;&#25105;&#20204;&#21487;&#20197;&#30830;&#20445;&#25152;&#26377; WordPress &#21151;&#33021;&#37117;&#26080;&#27861;&#27491;&#24120;&#24037;&#20316;&#65292;&#20174;&#32780;&#38450;&#27490;&#36890;&#36807;&#37038;&#31665;&#22320;&#22336;&#36827;&#34892;&#30331;&#24405;&#23581;&#35797;&#12290;<\/p>\n<h3>&#27880;&#24847;&#20107;&#39033;<\/h3>\n<ul>\n<li>&#22312;&#23454;&#38469;&#24212;&#29992;&#20013;&#65292;&#24212;&#23558;&#19978;&#36848;&#20195;&#30721;&#20013;&#30340; &#8220;put your unique phrase here&#8221; &#26367;&#25442;&#20026;&#30495;&#23454;&#12289;&#38543;&#26426;&#29983;&#25104;&#30340;&#23383;&#31526;&#20018;&#12290;<\/li>\n<li>&#36825;&#31181;&#26041;&#27861;&#20250;&#23436;&#20840;&#38459;&#27490;&#20219;&#20309;&#35797;&#22270;&#36890;&#36807;&#37038;&#31665;&#22320;&#22336;&#30331;&#24405;&#30340;&#34892;&#20026;&#65292;&#21253;&#25324;&#21512;&#27861;&#30340;&#27880;&#20876;&#21644;&#30331;&#24405;&#35831;&#27714;&#12290;&#22240;&#27492;&#65292;&#22312;&#23454;&#26045;&#27492;&#25514;&#26045;&#20043;&#21069;&#65292;&#35831;&#30830;&#20445;&#24050;&#32463;&#36827;&#34892;&#20102;&#20805;&#20998;&#30340;&#23433;&#20840;&#27979;&#35797;&#12290;<\/li>\n<\/ul>\n<p>&#36890;&#36807;&#20197;&#19978;&#27493;&#39588;&#65292;&#20320;&#21487;&#20197;&#22312; WordPress &#32593;&#31449;&#20013;&#26377;&#25928;&#22320;&#31105;&#29992;&#36890;&#36807;&#37038;&#31665;&#22320;&#22336;&#30331;&#24405;&#30340;&#21151;&#33021;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--2\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/zp-400x300.jpg\" alt=\"&#40657;&#26495;&#21069;&#30340;Bug&#35821;&#27861;&#35762;&#24072;\" class=\"wp-image-1849\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<p class=\"my-0\">&#40657;&#26495;&#21069;&#30340;Bug&#35821;&#27861;&#35762;&#24072;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#22312;WordPress&#20013;&#65292;&#25105;&#20204;&#21487;&#20197;&#36890;&#36807;&#35774;&#32622;&#25554;&#20214;&#25110;&#20027;&#39064;&#26469;&#23454;&#29616;&#31105;&#29992;&#36890;&#36807;&#37038;&#31665;&#22320;&#22336;&#30331;&#24405;&#30340;&#21151;&#33021;&#12290;&#19979;&#38754;&#25105;&#23558;&#25552;&#20379;&#19968;&#20010;&#31616;&#21333;&#30340;&#27493;&#39588;&#21644;&#19968;&#20123;&#31034;&#20363;&#20195;&#30721;&#12290;<\/p>\n<h3>&#27493;&#39588; 1: &#23433;&#35013;&#24182;&#21551;&#29992;&ldquo;WP Mail SMTP&rdquo;&#25554;&#20214;<\/h3>\n<p>&#39318;&#20808;&#65292;&#25105;&#20204;&#38656;&#35201;&#23433;&#35013;&#24182;&#28608;&#27963;&ldquo;WP Mail SMTP&rdquo;&#25554;&#20214;&#65292;&#20197;&#20415;&#25105;&#20204;&#21487;&#20197;&#20351;&#29992;SMTP&#26381;&#21153;&#22120;&#26469;&#21457;&#36865;&#39564;&#35777;&#30721;&#37038;&#20214;&#12290;<\/p>\n<p><strong>&#27493;&#39588;&#65306;<\/strong><\/p>\n<ol>\n<li>&#25171;&#24320;WordPress&#21518;&#21488;&#12290;<\/li>\n<li>&#28857;&#20987;&#24038;&#20391;&#33756;&#21333;&#26639;&#20013;&#30340;&ldquo;&#25554;&#20214;&rdquo; &gt; &ldquo;&#28155;&#21152;&#26032;&#25554;&#20214;&rdquo;&#12290;<\/li>\n<li>&#22312;&#25628;&#32034;&#26694;&#20013;&#36755;&#20837;&ldquo;WP Mail SMTP&rdquo;&#65292;&#25214;&#21040;&#21518;&#28857;&#20987;&#23433;&#35013;&#12290;<\/li>\n<li>&#23433;&#35013;&#23436;&#25104;&#21518;&#65292;&#28608;&#27963;&#35813;&#25554;&#20214;&#20197;&#20351;&#20854;&#29983;&#25928;&#12290;<\/li>\n<\/ol>\n<h3>&#27493;&#39588; 2: &#20462;&#25913;&#27880;&#20876;&#34920;&#21333;<\/h3>\n<p>&#25509;&#19979;&#26469;&#65292;&#25105;&#20204;&#38656;&#35201;&#20462;&#25913;&#27880;&#20876;&#34920;&#21333;&#30340;&#39564;&#35777;&#26041;&#24335;&#65292;&#20197;&#38459;&#27490;&#29992;&#25143;&#36890;&#36807;&#30005;&#23376;&#37038;&#20214;&#22320;&#22336;&#30331;&#24405;&#12290;<\/p>\n<p><strong>&#27493;&#39588;&#65306;<\/strong><\/p>\n<ul>\n<li>&#25214;&#21040;&#20197;&#19979;&#25991;&#20214;&#65306;<code>wp-admin\/includes\/class-wpmu-user.php<\/code><\/li>\n<li>&#23547;&#25214;<code>$registration<\/code>&#23545;&#35937;&#65292;&#28982;&#21518;&#26816;&#26597;&#20854;&#23646;&#24615;<code>'email'<\/code>&#26159;&#21542;&#20026;&#31354;&#12290;<\/li>\n<li>&#22914;&#26524;&#19981;&#20026;&#31354;&#65292;&#23558;&#20854;&#35774;&#32622;&#20026;<code>null<\/code>&#25110;&#32773;&#21024;&#38500;&#23427;&#12290;<\/li>\n<\/ul>\n<p><strong>&#31034;&#20363;&#20195;&#30721;&#65288;&#20551;&#35774;<code>email<\/code>&#23646;&#24615;&#24050;&#34987;&#36171;&#20540;&#65289;&#65306;<\/strong><\/p>\n<pre><code class=\"language-php\">\/\/ &#22312;class-wpmu-user.php&#25991;&#20214;&#20013;\nif (isset($registration)) {\n    if ($registration-&gt;email !== null) {\n        $registration-&gt;email = null;\n        \/\/ &#25110;&#32773;&#21024;&#38500;&#35813;&#23646;&#24615;\n        unset($registration-&gt;email);\n    }\n}<\/code><\/pre>\n<h3>&#27493;&#39588; 3: &#20462;&#25913;&#27880;&#20876;&#34920;&#21333;<\/h3>\n<p>&#20026;&#20102;&#30830;&#20445;&#29992;&#25143;&#21482;&#33021;&#36890;&#36807;&#29992;&#25143;&#21517;&#30331;&#24405;&#65292;&#25105;&#20204;&#38656;&#35201;&#20462;&#25913;&#29992;&#25143;&#30340;&#27880;&#20876;&#34920;&#21333;&#12290;&#36825;&#19968;&#27493;&#36890;&#24120;&#28041;&#21450;&#21040;&#20462;&#25913;&#27169;&#26495;&#25991;&#20214;&#12290;<\/p>\n<p><strong>&#27493;&#39588;&#65306;<\/strong><\/p>\n<ul>\n<li>&#25214;&#21040;&#20197;&#19979;&#25991;&#20214;&#65306;<code>wp-login.php<\/code>&#25110;<code>wp-register.php<\/code>&#65288;&#21462;&#20915;&#20110;&#24744;&#27491;&#22312;&#32534;&#36753;&#21738;&#20010;&#25991;&#20214;&#65289;<\/li>\n<li>&#26816;&#26597;&#26159;&#21542;&#23384;&#22312;&#23494;&#30721;&#23383;&#27573;&#65292;&#24182;&#23558;&#20854;&#26356;&#25913;&#20026;&#29992;&#25143;&#21517;&#23383;&#27573;&#12290;<\/li>\n<\/ul>\n<p><strong>&#31034;&#20363;&#20195;&#30721;&#65306;<\/strong><\/p>\n<pre><code class=\"language-html\">&lt;form action=\"...\" method=\"post\"&gt;\n    &lt;input type=\"text\" name=\"username\" placeholder=\"Username\" required&gt;\n    &lt;input type=\"password\" name=\"password\" placeholder=\"Password\" required&gt;\n    &lt;button type=\"submit\"&gt;Login&lt;\/button&gt;\n&lt;\/form&gt;<\/code><\/pre>\n<h3>&#27493;&#39588; 4: &#35843;&#25972;&#29992;&#25143;&#20449;&#24687;&#26174;&#31034;<\/h3>\n<p>&#26368;&#21518;&#65292;&#25105;&#20204;&#38656;&#35201;&#35843;&#25972;&#29992;&#25143;&#20449;&#24687;&#39029;&#38754;&#20197;&#26174;&#31034;&#29992;&#25143;&#21517;&#32780;&#19981;&#26159;&#37038;&#31665;&#22320;&#22336;&#12290;&#36825;&#19968;&#27493;&#21487;&#33021;&#38656;&#35201;&#23545;&#29305;&#23450;&#20027;&#39064;&#25110;&#25554;&#20214;&#36827;&#34892;&#23450;&#21046;&#12290;<\/p>\n<p><strong>&#27493;&#39588;&#65306;<\/strong><\/p>\n<ul>\n<li>&#20351;&#29992;&#30456;&#24212;&#30340;&#25554;&#20214;&#25110;&#20027;&#39064;&#26469;&#26356;&#25913;&#29992;&#25143;&#20449;&#24687;&#26174;&#31034;&#12290;<\/li>\n<li>&#23558;&#29992;&#25143;&#30340;&#37038;&#31665;&#22320;&#22336;&#26367;&#25442;&#20026;&#29992;&#25143;&#21517;&#12290;<\/li>\n<\/ul>\n<h3>&#24635;&#32467;<\/h3>\n<p>&#20197;&#19978;&#27493;&#39588;&#21487;&#20197;&#24110;&#21161;&#20320;&#22312;WordPress&#20013;&#31105;&#29992;&#36890;&#36807;&#37038;&#31665;&#22320;&#22336;&#30331;&#24405;&#21151;&#33021;&#12290;&#35831;&#27880;&#24847;&#65292;&#36825;&#20123;&#25805;&#20316;&#21487;&#33021;&#20250;&#25913;&#21464;&#32593;&#31449;&#30340;&#21021;&#22987;&#35774;&#35745;&#65292;&#22240;&#27492;&#35831;&#21153;&#24517;&#35880;&#24910;&#25805;&#20316;&#12290;&#22914;&#26524;&#20320;&#19981;&#30830;&#23450;&#26576;&#20123;&#37096;&#20998;&#30340;&#24037;&#20316;&#21407;&#29702;&#65292;&#35831;&#26597;&#38405;&#30456;&#20851;&#25991;&#26723;&#25110;&#23547;&#27714;&#19987;&#19994;&#24110;&#21161;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bug&#32534;&#35793;&#29422; &#22312; WordPress &#20013;&#31105;&#29992;&#36890;&#36807;&#37038;&#31665;&#22320;&#22336;&#30331;&#24405;&#30340;&#21151;&#33021;&#038;..<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2107,2106],"tuisongtax":[],"class_list":["post-3566","post","type-post","status-publish","format-standard","hentry","category-wpdt","tag-cjyy","tag-cjzn"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/3566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/comments?post=3566"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/3566\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=3566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=3566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=3566"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=3566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}