{"id":6236,"date":"2020-02-26T23:55:15","date_gmt":"2020-02-26T15:55:15","guid":{"rendered":"http:\/\/www.brofive.org\/?p=6236"},"modified":"2020-02-29T10:15:36","modified_gmt":"2020-02-29T02:15:36","slug":"%e8%a7%a3%e5%86%b3wordpress%e6%89%98%e7%ae%a1%e7%ab%99%e7%9a%84%e5%af%86%e7%a0%81%e6%8f%90%e7%a4%ba%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/www.brofive.net\/?p=6236","title":{"rendered":"\u89e3\u51b3WordPress\u6258\u7ba1\u7ad9\u7684\u5bc6\u7801\u63d0\u793a\u95ee\u9898"},"content":{"rendered":"<p>\u6b64\u524d\u603b\u6709\u63d0\u793a\u8f93\u5165\u5bc6\u7801\uff0c\u867d\u7136\u4e0d\u723d\u4e5f\u6ca1\u5de5\u592b\u89e3\u51b3\uff0c\u540e\u6765\u7814\u7a76\u4e86\u4e00\u4e0b\uff0c\u4e5f\u5c31\u51e0\u5206\u949f\u7684\u4e8b\u60c5\uff0c\u73b0\u5728\u597d\u7528\u4e86\uff0c\u5927\u5bb6\u53ef\u4ee5\u8bd5\u8bd5\u3002<\/p>\n<h6><font face=\"Arial\" size=\"4\">Removing <code>wp-admin<\/code> Login Prompt<\/font><\/h6>\n<p><font face=\"Arial\" size=\"4\">For security purposes, your WordPress app has an initial login prompt that opens when accessing the <code>\/wp-admin\/<\/code> page. To remove this prompt, follow these steps.<\/font><\/p>\n<p><font face=\"Arial\" size=\"4\">If your instance was deployed after December 1st 2019 we have included a script for your convenience to do this for you.<\/font><\/p>\n<ol>\n<li><font face=\"Arial\" size=\"4\">Login to your server using <code>ssh<\/code> as root.<br \/>\n<\/font><\/li>\n<li><font face=\"Arial\"><font size=\"4\">Run the command <code>\/opt\/vultr\/remove-htaccess.sh<\/code><\/font><\/font><\/li>\n<\/ol>\n<p><font face=\"Arial\" size=\"4\">If your instance was deployed before that date it will need to be done manually.<\/font><\/p>\n<ol>\n<li><font face=\"Arial\" size=\"4\">Login to your server using <code>ssh<\/code> as root.<br \/>\n<\/font><\/li>\n<li><font face=\"Arial\"><font size=\"4\">Create a backup of your vhost files: <code>cp \/etc\/nginx\/conf.d\/*.conf \/root\/<\/code><\/font><\/font><\/li>\n<li><font face=\"Arial\" size=\"4\">Edit both vhost files in <code>\/etc\/nginx\/conf.d\/<\/code>. You need to remove the block of code that starts with <code>location ^~ \/wp-admin\/<\/code>. It is about 15 lines long.<br \/>\n<\/font><\/li>\n<li><font face=\"Arial\" size=\"4\">Save your changes, and restart the web server: <code>systemctl restart nginx.service &amp;&amp; systemctl restart php7.2-fpm.service<\/code> ( PHP version may vary )<\/font><\/li>\n<\/ol>\n<h6><\/h6>\n<p><a href=\"http:\/\/www.brofive.net\/wp-content\/uploads\/2020\/02\/image-30.png\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"369\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"http:\/\/www.brofive.net\/wp-content\/uploads\/2020\/02\/image_thumb-29.png\" border=\"0\"><\/a><\/p>\n<p>\u76f8\u5173\u4fe1\u606f: <a href=\"https:\/\/www.vultr.com\/docs\/one-click-wordpress\">https:\/\/www.vultr.com\/docs\/one-click-wordpress<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6b64\u524d\u603b\u6709\u63d0\u793a\u8f93\u5165\u5bc6\u7801\uff0c\u867d\u7136\u4e0d\u723d\u4e5f\u6ca1\u5de5\u592b\u89e3\u51b3\uff0c\u540e\u6765\u7814\u7a76\u4e86\u4e00\u4e0b\uff0c\u4e5f\u5c31\u51e0\u5206\u949f\u7684\u4e8b\u60c5\uff0c\u73b0\u5728\u597d\u7528\u4e86\uff0c\u5927\u5bb6\u53ef\u4ee5\u8bd5\u8bd5\u3002 Re&#8230;<\/p>\n","protected":false},"author":1,"featured_media":6234,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[284,149,279,308],"tags":[24],"views":3157,"_links":{"self":[{"href":"http:\/\/www.brofive.net\/index.php?rest_route=\/wp\/v2\/posts\/6236"}],"collection":[{"href":"http:\/\/www.brofive.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.brofive.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.brofive.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.brofive.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6236"}],"version-history":[{"count":2,"href":"http:\/\/www.brofive.net\/index.php?rest_route=\/wp\/v2\/posts\/6236\/revisions"}],"predecessor-version":[{"id":6239,"href":"http:\/\/www.brofive.net\/index.php?rest_route=\/wp\/v2\/posts\/6236\/revisions\/6239"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.brofive.net\/index.php?rest_route=\/wp\/v2\/media\/6234"}],"wp:attachment":[{"href":"http:\/\/www.brofive.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.brofive.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6236"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.brofive.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}