{"id":88601,"date":"2026-08-01T13:33:38","date_gmt":"2026-08-01T05:33:38","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/88601.html"},"modified":"2026-08-01T13:33:38","modified_gmt":"2026-08-01T05:33:38","slug":"%e4%bb%8e%e4%b8%80%e5%8f%b0%e7%a9%ba%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%88%b0-wordpress-%e4%b8%8a%e7%ba%bf%ef%bc%9a%e5%85%a8%e7%a8%8b%e6%95%b2%e5%91%bd%e4%bb%a4%ef%bc%8c%e4%b8%8d%e7%94%a8%e4%bb%bb%e4%bd%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/88601.html","title":{"rendered":"\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f"},"content":{"rendered":"<p>\u672c\u6587\u6765\u81ea\u6211\u7684\u4e2a\u4eba\u535a\u5ba2&#xff1a;\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf&#xff1a;\u5168\u7a0b\u6572\u547d\u4ee4&#xff0c;\u4e0d\u7528\u4efb\u4f55\u9762\u677f &#8211; \u53f9\u60cb\u535a\u5ba2<\/p>\n<\/p>\n<p>\u5168\u7a0b\u547d\u4ee4\u884c\u64cd\u4f5c&#xff0c;\u4e0d\u9760\u4efb\u4f55\u9762\u677f&#xff0c;\u4f7f\u6027\u80fd\u5229\u7528\u6700\u5927\u5316<\/p>\n<h3 id=\"toc_2\">\u5199\u5728\u524d\u9762<\/h3>\n<p>\u524d\u4e24\u5929\u5199\u4e86\u4e00\u4e2a\u642d\u5efatypecho\u7684\u6587\u7ae0&#xff0c;\u6709\u670b\u53cb\u770b\u4e86\u95ee\u6211\u4f60\u81ea\u5df1\u535a\u5ba2\u90fd\u662f\u7528wordpress\u7684&#xff0c;\u548b\u5148\u5199\u4e86\u4e2a\u642d\u5efatypecho\u7684\u6559\u7a0b&#xff0c;\u54c8\u54c8\u54c8\u54c8\u54c8\u54c8&#xff0c;\u90a3\u6211\u73b0\u5728\u6765\u5199\u4e00\u4e0b\u642d\u5efawordpress\u6559\u7a0b\u3002<\/p>\n<p>\u6211\u81ea\u5df1\u7684\u535a\u5ba2\u662f\u5728\u4e00\u4e2a\u6709\u5b9d\u5854\u9762\u677f\u7684\u670d\u52a1\u5668\u4e0a\u7684&#xff0c;\u4e0d\u8fc7\u6211\u80af\u5b9a\u4e0d\u80fd\u628a\u8fd9\u4e2a\u670d\u52a1\u5668\u62ff\u6765\u5199\u6559\u7a0b&#xff0c;\u6240\u4ee5\u6211\u8981\u62ff\u6211\u5728\u96e8\u4e91\u4e70\u7684\u53e6\u5916\u4e00\u4e2a\u914d\u7f6e\u8f83\u5dee\u670d\u52a1\u5668&#xff0c;\u9274\u4e8e\u5b9d\u5854\u9762\u677f\u6709\u989d\u5916\u5360\u7528&#xff0c;\u6211\u5c31\u9009\u62e9\u4e86\u629b\u5f03\u9762\u677f&#xff0c;\u8f6c\u7528\u7eaf\u547d\u4ee4\u884c\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u4f1a\u5e26\u4f60\u4e00\u6b65\u6b65\u5b8c\u6210\u5168\u90e8\u64cd\u4f5c\u3002\u5168\u7a0b\u7528\u547d\u4ee4\u884c&#xff0c;\u4f46\u6bcf\u4e00\u6761\u547d\u4ee4\u7684\u610f\u601d\u6211\u90fd\u4f1a\u8bf4\u6e05\u695a&#xff0c;\u7167\u7740\u6572\u5c31\u884c\u3002<\/p>\n<p>\u4f60\u9700\u8981\u51c6\u5907&#xff1a;<\/p>\n<p>1.\u4e00\u53f0 Linux \u670d\u52a1\u5668&#xff08;\u6211\u8fd9\u91cc\u7528Ubuntu 24.04&#xff09;&#xff0c;\u6211\u662f\u7528\u7684\u96e8\u4e91\u670d\u52a1\u5668<\/p>\n<p>2.\u4e00\u4e2a\u5df2\u7ecf\u6ce8\u518c\u597d\u7684\u57df\u540d<\/p>\n<p>3.\u80fd SSH \u8fde\u63a5\u670d\u52a1\u5668\u7684\u7ec8\u7aef\u5de5\u5177<\/p>\n<p>4.\u5927\u6982 30-60 \u5206\u949f\u7684\u65f6\u95f4&#xff08;\u6bd4\u641etypecho\u957f\u591a\u4e86\u55ef\u3002&#xff09;<\/p>\n<h3 id=\"toc_7\">\u7b2c\u4e00\u6b65&#xff1a;\u8fde\u63a5\u670d\u52a1\u5668<\/h3>\n<p>\u62ff\u5230\u670d\u52a1\u5668\u4e4b\u540e&#xff0c;\u4f60\u4f1a\u6709\u4e00\u4e2a\u00a0IP \u5730\u5740\u3001\u4e00\u4e2a\u00a0\u7528\u6237\u540d&#xff08;\u901a\u5e38\u662f\u00a0root&#xff09;\u548c\u4e00\u4e2a\u5bc6\u7801\u3002<\/p>\n<p>\u6253\u5f00\u7ec8\u7aef&#xff08;Mac&#xff09;\u6216 PowerShell&#xff08;Windows&#xff09;&#xff0c;\u8f93\u5165&#xff1a;<\/p>\n<p>ssh root&#064;\u4f60\u7684\u670d\u52a1\u5668IP <\/p>\n<p>\u5982\u679c\u4f60\u662f\u7b2c\u4e00\u6b21\u4ece\u8fd9\u53f0\u7535\u8111\u8fde\u63a5\u8fd9\u4e2a\u670d\u52a1\u5668&#xff0c;\u4f1a\u770b\u5230\u4e00\u4e2a\u63d0\u793a&#xff1a;<\/p>\n<p>The authenticity of host &#039;\u4f60\u7684\u670d\u52a1\u5668IP&#039; can&#039;t be established.<br \/>\nAre you sure you want to continue connecting (yes\/no)? <\/p>\n<p>\u8f93\u5165\u00a0yes\u00a0\u5e76\u56de\u8f66\u5c31\u884c\u3002\u8fd9\u662f SSH \u5728\u786e\u8ba4\u670d\u52a1\u5668\u7684\u8eab\u4efd&#xff0c;\u53ea\u6709\u7b2c\u4e00\u6b21\u8fde\u63a5\u4f1a\u51fa\u73b0\u3002<\/p>\n<p>\u7136\u540e\u8f93\u5165\u5bc6\u7801&#xff08;\u8f93\u5165\u7684\u65f6\u5019\u5c4f\u5e55\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u5b57\u7b26&#xff0c;\u8fd9\u662f\u6b63\u5e38\u7684&#xff09;&#xff0c;\u56de\u8f66\u3002\u5982\u679c\u770b\u5230\u7c7b\u4f3c\u00a0root&#064;\u4f60\u7684\u4e3b\u673a\u540d:~#\u00a0\u8fd9\u6837\u7684\u63d0\u793a\u7b26&#xff0c;\u8bf4\u660e\u8fde\u63a5\u6210\u529f\u4e86\u3002<\/p>\n<h3 id=\"toc_12\">\u7b2c\u4e8c\u6b65&#xff1a;\u66f4\u65b0\u7cfb\u7edf\u8f6f\u4ef6\u5305<\/h3>\n<p>\u521a\u62ff\u5230\u7684\u670d\u52a1\u5668&#xff0c;\u8f6f\u4ef6\u5305\u5217\u8868\u53ef\u80fd\u662f\u65e7\u7684\u3002\u5148\u66f4\u65b0\u4e00\u4e0b&#xff0c;\u4fdd\u8bc1\u540e\u9762\u88c5\u7684\u90fd\u662f\u6700\u65b0\u7248\u672c\u3002<\/p>\n<p>apt update <\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u4ece\u8f6f\u4ef6\u6e90\u62c9\u53d6\u6700\u65b0\u7684\u8f6f\u4ef6\u5305\u5217\u8868\u3002\u6267\u884c\u5b8c\u4e4b\u540e\u518d\u8dd1\u4e00\u4e2a\u5347\u7ea7\u547d\u4ee4&#xff1a;<\/p>\n<p>apt upgrade -y <\/p>\n<p>-y\u00a0\u7684\u610f\u601d\u662f\u201c\u6240\u6709\u8be2\u95ee\u90fd\u56de\u7b54 yes\u201d&#xff0c;\u7701\u5f97\u4f60\u4e00\u4e2a\u4e2a\u786e\u8ba4\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u597d\u591a\u5206\u949f&#xff0c;\u8010\u5fc3\u7b49\u5b83\u8dd1\u5b8c\u3002<\/p>\n<h3 id=\"toc_17\">\u7b2c\u4e09\u6b65&#xff1a;\u5b89\u88c5 Nginx&#xff08;Web \u670d\u52a1\u5668&#xff09;<\/h3>\n<p>Nginx \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u3001\u9ad8\u6027\u80fd\u7684 Web \u670d\u52a1\u5668&#xff0c;\u5b83\u7684\u5de5\u4f5c\u5c31\u662f\u201c\u63a5\u5f85\u8bbf\u5ba2\u201d\u2014\u2014\u5f53\u6709\u4eba\u5728\u6d4f\u89c8\u5668\u91cc\u8f93\u5165\u4f60\u7684\u7f51\u7ad9\u5730\u5740&#xff0c;Nginx \u8d1f\u8d23\u63a5\u6536\u8fd9\u4e2a\u8bf7\u6c42&#xff0c;\u7136\u540e\u628a\u5bf9\u5e94\u7684\u7f51\u9875\u5185\u5bb9\u8fd4\u56de\u7ed9\u8bbf\u5ba2\u3002<\/p>\n<p>\u5b89\u88c5\u547d\u4ee4&#xff1a;<\/p>\n<p>apt install nginx -y <\/p>\n<p>\u88c5\u5b8c\u4e4b\u540e&#xff0c;Nginx \u4f1a\u81ea\u52a8\u542f\u52a8\u3002\u9a8c\u8bc1\u4e00\u4e0b&#xff1a;<\/p>\n<p>systemctl status nginx <\/p>\n<p>\u5982\u679c\u770b\u5230\u00a0active (running)\u00a0\u7684\u5b57\u6837&#xff0c;\u8bf4\u660e Nginx \u5df2\u7ecf\u5728\u8dd1\u4e86\u3002<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"291\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053336-6a6d8530bd869.png\" width=\"883\" \/><\/p>\n<p>\u73b0\u5728\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u8f93\u5165\u4f60\u7684\u670d\u52a1\u5668 IP \u5730\u5740&#xff0c;\u5e94\u8be5\u80fd\u770b\u5230\u4e00\u4e2a\u201cWelcome to nginx\u201d\u7684\u9875\u9762\u3002\u8fd9\u8bf4\u660e Nginx \u5de5\u4f5c\u6b63\u5e38\u3002<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"522\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053336-6a6d8530e408a.png\" width=\"1024\" \/><\/p>\n<p>\u8bbe\u7f6e Nginx \u5f00\u673a\u81ea\u542f&#xff08;\u8fd9\u6837\u670d\u52a1\u5668\u91cd\u542f\u540e\u7f51\u7ad9\u8fd8\u80fd\u81ea\u52a8\u6062\u590d&#xff09;&#xff1a;<\/p>\n<p>systemctl enable nginx <\/p>\n<h3 id=\"toc_22\">\u7b2c\u56db\u6b65&#xff1a;\u5b89\u88c5 MySQL&#xff08;\u6570\u636e\u5e93&#xff09;<\/h3>\n<p>MySQL \u662f\u7528\u6765\u5b58\u6570\u636e\u7684\u2014\u2014\u4f60\u7684\u6587\u7ae0\u3001\u9875\u9762\u3001\u7528\u6237\u8bc4\u8bba\u3001\u7f51\u7ad9\u8bbe\u7f6e&#xff0c;\u5168\u90fd\u653e\u5728\u6570\u636e\u5e93\u91cc\u3002<\/p>\n<p>apt install mysql-server -y <\/p>\n<p>\u88c5\u5b8c\u4e4b\u540e&#xff0c;MySQL \u4e5f\u4f1a\u81ea\u52a8\u542f\u52a8\u3002\u9a8c\u8bc1\u4e00\u4e0b&#xff1a;<\/p>\n<p>systemctl status mysql <\/p>\n<p>\u770b\u5230\u00a0active (running)\u00a0\u5c31\u5bf9\u4e86\u3002<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"250\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d85311189f.png\" width=\"744\" \/><\/p>\n<p>\u8bbe\u7f6e MySQL \u5f00\u673a\u81ea\u542f&#xff1a;<\/p>\n<p>systemctl enable mysql <\/p>\n<p>\u8bbe\u7f6e root \u5bc6\u7801&#xff1a;<\/p>\n<p>Ubuntu \u65b0\u7248\u672c\u7684 MySQL \u9ed8\u8ba4\u4f7f\u7528\u00a0auth_socket\u00a0\u8ba4\u8bc1\u65b9\u5f0f&#xff0c;\u4e5f\u5c31\u662f\u8bf4\u7cfb\u7edf root \u7528\u6237\u53ef\u4ee5\u76f4\u63a5\u514d\u5bc6\u7801\u767b\u5f55 MySQL&#xff0c;\u4e0d\u9700\u8981\u5bc6\u7801\u3002\u8fd9\u672c\u8eab\u662f\u5b89\u5168\u7684&#xff0c;\u4f46\u4f1a\u5bfc\u81f4\u00a0mysql_secure_installation\u00a0\u8fd9\u4e2a\u5b89\u5168\u914d\u7f6e\u5de5\u5177\u8df3\u8fc7\u8bbe\u7f6e\u5bc6\u7801\u7684\u6b65\u9aa4&#xff0c;\u8ba9\u4f60\u6ca1\u529e\u6cd5\u6b63\u5e38\u7528\u5bc6\u7801\u767b\u5f55\u3002<\/p>\n<p>\u6240\u4ee5\u6211\u4eec\u8981\u5148\u624b\u52a8\u8bbe\u7f6e root \u5bc6\u7801&#xff0c;\u518d\u6267\u884c\u5b89\u5168\u914d\u7f6e\u3002<\/p>\n<p>\u7528\u7cfb\u7edf root \u6743\u9650\u76f4\u63a5\u767b\u5f55 MySQL&#xff08;\u4e0d\u9700\u8981\u8f93\u5bc6\u7801&#xff09;&#xff1a;<\/p>\n<p>sudo mysql <\/p>\n<p>\u8fdb\u53bb\u4e4b\u540e\u63d0\u793a\u7b26\u4f1a\u53d8\u6210\u00a0mysql&gt;&#xff0c;\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u8bbe\u7f6e\u5bc6\u7801&#xff08;\u628a\u00a0\u4f60\u7684\u5bc6\u7801\u00a0\u6362\u6210\u4f60\u81ea\u5df1\u8981\u8bbe\u7684\u5bc6\u7801&#xff09;&#xff1a;<\/p>\n<p>&#xff08;mysql_native_password\u00a0\u662f MySQL \u4f20\u7edf\u7684\u5bc6\u7801\u8ba4\u8bc1\u65b9\u5f0f&#xff0c;\u8bbe\u5b8c\u4e4b\u540e\u4f60\u5c31\u53ef\u4ee5\u7528\u5bc6\u7801\u767b\u5f55\u4e86\u3002&#xff09;<\/p>\n<p>ALTER USER &#039;root&#039;&#064;&#039;localhost&#039; IDENTIFIED WITH mysql_native_password BY &#039;\u4f60\u7684\u5bc6\u7801&#039;; <\/p>\n<p>\u6ce8\u610f&#xff1a;\u8981\u662f\u63d0\u793aYour password does not satisfy the current policy requirements\u00a0&#xff0c;\u90a3\u5c31\u751f\u6210\u4e00\u4e2a\u6709\u5927\u5c0f\u5199\u5b57\u6bcd&#xff0c;\u6570\u5b57&#xff0c;\u7279\u6b8a\u5b57\u7b26\u768416\u4f4d\u5bc6\u7801&#xff0c;\u8fd9\u6837\u80af\u5b9a\u7b26\u5408\u8981\u6c42&#xff08;\u5077\u61d2\u4e86\u7b97\u662f&#xff09;\u3002<\/p>\n<p>\u5237\u65b0\u6743\u9650\u8ba9\u8bbe\u7f6e\u751f\u6548&#xff1a;<\/p>\n<p>FLUSH PRIVILEGES; <\/p>\n<p>\u9000\u51fa MySQL&#xff1a;<\/p>\n<p>EXIT; <\/p>\n<p>\u73b0\u5728\u9a8c\u8bc1\u4e00\u4e0b\u5bc6\u7801\u662f\u5426\u8bbe\u7f6e\u6210\u529f&#xff1a;<\/p>\n<p>mysql -u root -p <\/p>\n<p>\u8f93\u5165\u521a\u624d\u8bbe\u7684\u5bc6\u7801&#xff0c;\u80fd\u6b63\u5e38\u767b\u5f55\u5c31\u8bf4\u660e\u6210\u529f\u4e86\u3002\u8f93\u5165\u00a0EXIT;\u00a0\u9000\u51fa\u3002<\/p>\n<h3 id=\"toc_27\">\u8fd0\u884c\u5b89\u5168\u914d\u7f6e<\/h3>\n<p>mysql_secure_installation <\/p>\n<p>\u8fd0\u884c\u540e\u4f1a\u6709\u4e00\u7cfb\u5217\u95ee\u7b54&#xff0c;\u6309\u4e0b\u9762\u8fd9\u6837\u56de\u7b54\u5c31\u884c&#xff1a;<\/p>\n<li>\u662f\u5426\u9a8c\u8bc1\u5bc6\u7801\u63d2\u4ef6&#xff1f;\u00a0\u8f93\u5165\u00a0y\u00a0\u5efa\u8bae\u542f\u7528&#xff0c;\u5b83\u53ef\u4ee5\u5e2e\u4f60\u68c0\u67e5\u5bc6\u7801\u5f3a\u5ea6\u3002\u5982\u679c\u9009\u00a0y&#xff0c;\u540e\u9762\u8bbe\u7f6e\u5bc6\u7801\u65f6\u5982\u679c\u5bc6\u7801\u592a\u7b80\u5355&#xff08;\u6bd4\u5982\u7eaf\u6570\u5b57\u3001\u592a\u77ed&#xff09;&#xff0c;MySQL \u4f1a\u62d2\u7edd\u3002\u5efa\u8bae\u7528\u5927\u5c0f\u5199\u5b57\u6bcd &#043; \u6570\u5b57 &#043; \u7279\u6b8a\u5b57\u7b26\u7684\u7ec4\u5408\u5bc6\u7801\u3002&#xff08;\u4f60\u8981\u662f\u4e0d\u60f3\u88ab\u7ea6\u675f&#xff0c;\u90a3\u5c31\u8f93\u5165n&#xff09;<\/li>\n<li>\u662f\u5426\u79fb\u9664\u533f\u540d\u7528\u6237&#xff1f;\u00a0\u8f93\u5165\u00a0Y<\/li>\n<li>\u662f\u5426\u7981\u6b62 root \u8fdc\u7a0b\u767b\u5f55&#xff1f;\u00a0\u8f93\u5165\u00a0Y<\/li>\n<li>\u662f\u5426\u79fb\u9664\u6d4b\u8bd5\u6570\u636e\u5e93&#xff1f;\u00a0\u8f93\u5165\u00a0Y<\/li>\n<li>\u662f\u5426\u91cd\u65b0\u52a0\u8f7d\u6743\u9650\u8868&#xff1f;\u00a0\u8f93\u5165\u00a0Y<\/li>\n<p>\u8bb0\u4f4f\u4f60\u8bbe\u7684 root \u5bc6\u7801&#xff0c;\u540e\u9762\u914d\u7f6e WordPress \u7684\u6570\u636e\u5e93\u7528\u6237\u65f6\u8981\u7528\u5230\u3002\u4f46\u6ce8\u610f&#xff0c;WordPress \u8fde\u63a5\u6570\u636e\u5e93\u7528\u7684\u4e0d\u662f\u8fd9\u4e2a root \u8d26\u53f7&#xff0c;\u800c\u662f\u6211\u4eec\u4e0b\u4e00\u6b65\u8981\u4e13\u95e8\u521b\u5efa\u7684\u00a0wpuser\u00a0\u8d26\u53f7\u2014\u2014root \u8d26\u53f7\u6743\u9650\u592a\u5927&#xff0c;\u76f4\u63a5\u7ed9\u7f51\u7ad9\u7528\u4e0d\u5b89\u5168\u3002<\/p>\n<h3 id=\"toc_32\">\u60c5\u51b5\u8bf4\u660e&#xff1a;\u4e3a\u4ec0\u4e48 Ubuntu \u65b0\u7248 MySQL \u8ddf\u4ee5\u524d\u4e0d\u4e00\u6837&#xff1f;<\/h3>\n<p>\u8001\u7248\u672c\u7684 MySQL \u5b89\u88c5\u5b8c\u540e&#xff0c;mysql_secure_installation\u00a0\u4f1a\u76f4\u63a5\u8ba9\u4f60\u8bbe\u7f6e root \u5bc6\u7801\u3002\u4f46\u4ece Ubuntu 20.04 \u5f00\u59cb&#xff0c;MySQL \u9ed8\u8ba4\u6539\u7528\u00a0auth_socket\u00a0\u63d2\u4ef6\u8ba4\u8bc1 root \u7528\u6237\u2014\u2014\u8fd9\u4e2a\u63d2\u4ef6\u7684\u903b\u8f91\u662f\u201c\u53ea\u6709\u7cfb\u7edf\u7528\u6237 root \u624d\u80fd\u767b\u5f55 MySQL&#xff0c;\u4e0d\u9700\u8981\u5bc6\u7801\u201d\u3002\u597d\u5904\u662f\u66f4\u5b89\u5168&#xff08;\u6ca1\u6709\u5bc6\u7801\u6cc4\u9732\u7684\u98ce\u9669&#xff09;&#xff0c;\u574f\u5904\u662f\u5982\u679c\u4f60\u60f3\u50cf\u4f20\u7edf\u65b9\u5f0f\u90a3\u6837\u7528\u00a0mysql -u root -p\u00a0\u52a0\u5bc6\u7801\u767b\u5f55&#xff0c;\u5c31\u5f97\u50cf\u4e0a\u9762\u8fd9\u6837\u624b\u52a8\u6539\u8ba4\u8bc1\u65b9\u5f0f\u3002<\/p>\n<p>\u5982\u679c\u4f60\u540e\u7eed\u53ea\u60f3\u7528\u00a0sudo mysql\u00a0\u514d\u5bc6\u767b\u5f55&#xff0c;\u4e5f\u53ef\u4ee5\u4e0d\u6539\u3002\u4f46\u8fd8\u662f\u5efa\u8bae\u6309\u4e0a\u9762\u7684\u6b65\u9aa4\u6539\u6210\u5bc6\u7801\u8ba4\u8bc1&#xff0c;\u8ddf\u7edd\u5927\u591a\u6570\u6559\u7a0b\u4fdd\u6301\u4e00\u81f4&#xff0c;\u540e\u7eed\u64cd\u4f5c\u4e5f\u66f4\u987a\u7545\u3002<\/p>\n<h3 id=\"toc_37\">\u7b2c\u4e94\u6b65&#xff1a;\u5b89\u88c5 PHP&#xff08;\u8fd0\u884c\u73af\u5883&#xff09;<\/h3>\n<p>PHP \u662f\u4e00\u79cd\u670d\u52a1\u5668\u7aef\u811a\u672c\u8bed\u8a00&#xff0c;WordPress \u5c31\u662f\u7528 PHP \u5199\u7684\u3002\u6211\u4eec\u9700\u8981\u5b89\u88c5 PHP \u4ee5\u53ca WordPress \u9700\u8981\u7684\u5404\u79cd\u6269\u5c55\u3002<\/p>\n<p>apt install php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-zip php-intl php-exif php-fileinfo php-bcmath php-soap -y<\/p>\n<p>\u8fd9\u6761\u547d\u4ee4\u88c5\u4e86\u4e0d\u5c11\u4e1c\u897f&#xff0c;\u4e00\u8d77\u5b89\u88c5\u4e86WordPress \u5b98\u65b9\u63a8\u8350\u548c\u5fc5\u9700\u7684 PHP \u6269\u5c55&#xff1a;<\/p>\n<table>\n<tr>\u6269\u5c55\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>curl<\/td>\n<td>\u53d1\u8d77 HTTP \u8bf7\u6c42&#xff0c;\u7528\u4e8e\u83b7\u53d6\u66f4\u65b0\u3001\u8c03\u7528\u5916\u90e8 API<\/td>\n<\/tr>\n<tr>\n<td>fileinfo<\/td>\n<td>\u68c0\u6d4b\u4e0a\u4f20\u6587\u4ef6\u7684 MIME \u7c7b\u578b&#xff0c;\u9632\u6b62\u6076\u610f\u4e0a\u4f20<\/td>\n<\/tr>\n<tr>\n<td>json<\/td>\n<td>\u5904\u7406 JSON \u6570\u636e&#xff0c;WordPress REST API \u4f9d\u8d56\u5b83<\/td>\n<\/tr>\n<tr>\n<td>mbstring<\/td>\n<td>\u5904\u7406\u591a\u5b57\u8282\u5b57\u7b26&#xff08;\u4e2d\u6587\u3001\u65e5\u6587\u7b49&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>mysqli\u00a0\u6216\u00a0pdo_mysql<\/td>\n<td>\u8fde\u63a5 MySQL \u6570\u636e\u5e93<\/td>\n<\/tr>\n<tr>\n<td>SimpleXML\u00a0\/\u00a0xml<\/td>\n<td>\u89e3\u6790 XML \u6570\u636e&#xff08;RSS \u8ba2\u9605\u7b49&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>zip<\/td>\n<td>\u5904\u7406\u538b\u7f29\u5305&#xff0c;\u5b89\u88c5\u4e3b\u9898\u548c\u63d2\u4ef6\u65f6\u5fc5\u987b<\/td>\n<\/tr>\n<tr>\n<td>gd\u00a0\u6216\u00a0imagick<\/td>\n<td>\u56fe\u7247\u5904\u7406&#xff08;\u7f29\u7565\u56fe\u3001\u88c1\u526a&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>exif<\/td>\n<td>\u8bfb\u53d6\u56fe\u7247\u5143\u6570\u636e&#xff08;\u7528\u4e8e\u4fee\u6b63\u624b\u673a\u7167\u7247\u65b9\u5411&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>intl<\/td>\n<td>\u56fd\u9645\u5316\u652f\u6301&#xff08;\u591a\u8bed\u8a00\u7f51\u7ad9\u3001WooCommerce \u7b49\u4f1a\u7528&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>OPcache<\/td>\n<td>\u7f13\u5b58 PHP \u5b57\u8282\u7801&#xff0c;\u5927\u5e45\u63d0\u5347\u6027\u80fd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u88c5\u5b8c\u4e4b\u540e\u68c0\u67e5\u4e00\u4e0b PHP-FPM \u662f\u5426\u5728\u8fd0\u884c&#xff1a;<\/p>\n<p>systemctl status php8.3-fpm <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"270\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d85311f54a.png\" width=\"1024\" \/><\/p>\n<p>\u6ce8\u610f&#xff1a;\u5177\u4f53\u7248\u672c\u53f7\u53ef\u80fd\u4e0d\u540c\u3002Ubuntu 22.04 \u9ed8\u8ba4\u88c5\u7684\u662f PHP 8.1&#xff0c;Ubuntu 24.04 \u9ed8\u8ba4\u88c5\u7684\u662f PHP 8.3\u3002&#xff08;\u6211\u5199\u6559\u7a0b\u7528\u7684\u662fUbuntu 24.04&#xff0c;\u6240\u4ee5\u6211\u5c31\u4ee58.3\u4e3a\u4f8b&#xff09;\u3002\u5982\u679c\u4e0d\u786e\u5b9a\u81ea\u5df1\u88c5\u7684\u662f\u54ea\u4e2a\u7248\u672c&#xff0c;\u53ef\u4ee5\u7528\u00a0systemctl status php\u00a0\u7136\u540e\u6309 Tab \u952e\u81ea\u52a8\u8865\u5168\u770b\u770b&#xff0c;\u6216\u8005\u7528\u00a0php -v\u00a0\u547d\u4ee4\u67e5\u770b\u7248\u672c\u53f7\u3002\u540e\u9762\u7684 Nginx \u914d\u7f6e\u6587\u4ef6\u4e2d\u9700\u8981\u586b\u8fd9\u4e2a\u7248\u672c\u53f7&#xff0c;\u52a1\u5fc5\u4fdd\u6301\u4e00\u81f4\u3002<\/p>\n<h3 id=\"toc_42\">\u7b2c\u516d\u6b65&#xff1a;\u4e3a WordPress \u521b\u5efa\u6570\u636e\u5e93<\/h3>\n<p>\u88c5\u597d\u4e86 MySQL&#xff0c;\u73b0\u5728\u8981\u4e3a WordPress \u521b\u5efa\u4e00\u4e2a\u4e13\u7528\u7684\u6570\u636e\u5e93\u548c\u4e00\u4e2a\u4e13\u7528\u7684\u6570\u636e\u5e93\u7528\u6237\u3002\u4e0d\u5efa\u8bae\u7528 root \u8d26\u53f7\u76f4\u63a5\u8dd1\u7f51\u7ad9&#xff0c;\u4e0d\u5b89\u5168\u3002<\/p>\n<p>\u5148\u767b\u5f55 MySQL&#xff1a;<\/p>\n<p>mysql -u root -p <\/p>\n<p>\u8f93\u5165\u521a\u624d\u8bbe\u7f6e\u7684 root \u5bc6\u7801&#xff0c;\u8fdb\u5165 MySQL \u547d\u4ee4\u884c\u754c\u9762&#xff08;\u63d0\u793a\u7b26\u4f1a\u53d8\u6210\u00a0mysql&gt;&#xff09;\u3002<\/p>\n<p>\u4f9d\u6b21\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff08;\u628a\u00a0your_password\u00a0\u6362\u6210\u4f60\u81ea\u5df1\u8bbe\u7684\u5bc6\u7801&#xff09;&#xff1a;<\/p>\n<p>CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; <\/p>\n<p>\u8fd9\u6761\u547d\u4ee4\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u53eb\u00a0wordpress\u00a0\u7684\u6570\u636e\u5e93&#xff0c;\u5b57\u7b26\u96c6\u8bbe\u4e3a\u00a0utf8mb4&#xff08;\u652f\u6301 emoji \u548c\u6240\u6709\u751f\u50fb\u5b57&#xff09;\u3002COLLATE utf8mb4_unicode_ci\u00a0\u6307\u5b9a\u4e86\u6392\u5e8f\u89c4\u5219&#xff0c;ci\u00a0\u8868\u793a case-insensitive&#xff08;\u4e0d\u533a\u5206\u5927\u5c0f\u5199&#xff09;\u3002<\/p>\n<p>CREATE USER &#039;wpuser&#039;&#064;&#039;localhost&#039; IDENTIFIED BY &#039;your_password&#039;; <\/p>\n<p>\u521b\u5efa\u4e86\u4e00\u4e2a\u53eb\u00a0wpuser\u00a0\u7684\u6570\u636e\u5e93\u7528\u6237&#xff0c;\u5bc6\u7801\u7531\u4f60\u8bbe\u5b9a\u3002&#039;wpuser&#039;&#064;&#039;localhost&#039;\u00a0\u8868\u793a\u8fd9\u4e2a\u7528\u6237\u53ea\u80fd\u4ece\u672c\u5730&#xff08;\u4e5f\u5c31\u662f\u670d\u52a1\u5668\u672c\u673a&#xff09;\u8fde\u63a5\u6570\u636e\u5e93&#xff0c;\u8fd9\u662f\u6700\u5b89\u5168\u7684\u505a\u6cd5&#xff0c;\u56e0\u4e3a WordPress \u548c MySQL \u5728\u540c\u4e00\u53f0\u670d\u52a1\u5668\u4e0a&#xff0c;\u6839\u672c\u4e0d\u9700\u8981\u8fdc\u7a0b\u8fde\u63a5\u3002<\/p>\n<p>GRANT ALL PRIVILEGES ON wordpress.* TO &#039;wpuser&#039;&#064;&#039;localhost&#039;; <\/p>\n<p>\u7ed9\u8fd9\u4e2a\u7528\u6237\u8d4b\u4e88\u00a0wordpress\u00a0\u6570\u636e\u5e93\u7684\u5168\u90e8\u6743\u9650\u3002wordpress.*\u00a0\u8868\u793a\u6570\u636e\u5e93\u00a0wordpress\u00a0\u91cc\u7684\u6240\u6709\u8868\u3002<\/p>\n<p>FLUSH PRIVILEGES; <\/p>\n<p>\u8ba9\u6743\u9650\u8bbe\u7f6e\u7acb\u5373\u751f\u6548\u3002<\/p>\n<p>EXIT; <\/p>\n<p>\u9000\u51fa MySQL\u3002<\/p>\n<p>\u8bb0\u4e0b\u6765&#xff1a;\u6570\u636e\u5e93\u540d\u662f\u00a0wordpress&#xff0c;\u7528\u6237\u540d\u662f\u00a0wpuser&#xff0c;\u5bc6\u7801\u662f\u4f60\u521a\u624d\u8bbe\u7684\u90a3\u4e2a\u2014\u2014\u540e\u9762\u914d\u7f6e WordPress \u7684\u65f6\u5019\u8981\u7528\u3002<\/p>\n<h3 id=\"toc_47\">\u7b2c\u4e03\u6b65&#xff1a;\u57df\u540d\u89e3\u6790&#xff08;\u628a\u57df\u540d\u6307\u5411\u670d\u52a1\u5668&#xff09;<\/h3>\n<p>\u5728\u7ee7\u7eed\u4e4b\u524d&#xff0c;\u9700\u8981\u5148\u628a\u4f60\u7684\u57df\u540d\u6307\u5411\u670d\u52a1\u5668\u7684 IP \u5730\u5740\u3002\u8fd9\u4e00\u6b65\u662f\u5728\u57df\u540d\u6ce8\u518c\u5546\u7684\u540e\u53f0\u64cd\u4f5c\u7684&#xff08;\u6bd4\u5982\u4f60\u5728\u963f\u91cc\u4e91\u3001\u817e\u8baf\u4e91\u3001Namesilo\u3001Cloudflare \u7b49\u5730\u65b9\u4e70\u7684\u57df\u540d&#xff09;\u3002<\/p>\n<p>\u767b\u5f55\u4f60\u7684\u57df\u540d\u6ce8\u518c\u5546\u7f51\u7ad9&#xff0c;\u627e\u5230\u00a0DNS \u89e3\u6790\u6216\u57df\u540d\u89e3\u6790\u7ba1\u7406\u9875\u9762\u3002\u6dfb\u52a0\u4e24\u6761\u00a0A \u8bb0\u5f55&#xff1a;<\/p>\n<table>\n<tr>\u4e3b\u673a\u8bb0\u5f55\u8bb0\u5f55\u7c7b\u578b\u8bb0\u5f55\u503c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>&#064;<\/td>\n<td>A<\/td>\n<td>\u4f60\u7684\u670d\u52a1\u5668 IP<\/td>\n<td>&#064;\u00a0\u4ee3\u8868\u4e3b\u57df\u540d\u672c\u8eab&#xff0c;\u6bd4\u5982\u00a0example.com<\/td>\n<\/tr>\n<tr>\n<td>www<\/td>\n<td>A<\/td>\n<td>\u4f60\u7684\u670d\u52a1\u5668 IP<\/td>\n<td>\u8ba9\u00a0www.example.com\u00a0\u4e5f\u80fd\u8bbf\u95ee<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4ec0\u4e48\u662f A \u8bb0\u5f55&#xff1f;\u00a0A \u8bb0\u5f55\u7684\u5168\u79f0\u662f Address Record&#xff0c;\u5b83\u7684\u4f5c\u7528\u5c31\u662f\u544a\u8bc9\u5168\u4e16\u754c&#xff1a;\u201c\u8bbf\u95ee\u8fd9\u4e2a\u57df\u540d\u7684\u65f6\u5019&#xff0c;\u53bb\u8fd9\u4e2a IP \u5730\u5740\u201d\u3002<\/p>\n<p>\u6dfb\u52a0\u5b8c\u4e4b\u540e&#xff0c;DNS \u89e3\u6790\u9700\u8981\u4e00\u6bb5\u65f6\u95f4\u624d\u80fd\u751f\u6548\u3002\u5feb\u7684\u8bdd\u51e0\u5206\u949f&#xff0c;\u6162\u7684\u8bdd\u53ef\u80fd\u8981\u51e0\u4e2a\u5c0f\u65f6&#xff08;\u53d6\u51b3\u4e8e\u4f60\u7684\u57df\u540d\u6ce8\u518c\u5546\u548c TTL \u8bbe\u7f6e&#xff0c;TTL \u5373 Time To Live&#xff0c;\u662f DNS \u8bb0\u5f55\u5728\u5404\u5730 DNS \u670d\u52a1\u5668\u4e0a\u7684\u7f13\u5b58\u65f6\u95f4&#xff09;\u3002\u4f60\u53ef\u4ee5\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u6d4b\u8bd5\u57df\u540d\u662f\u5426\u5df2\u7ecf\u6307\u5411\u4e86\u4f60\u7684\u670d\u52a1\u5668&#xff1a;<\/p>\n<p>ping \u4f60\u7684\u57df\u540d <\/p>\n<p>\u5982\u679c\u8fd4\u56de\u7684 IP \u5730\u5740\u662f\u4f60\u7684\u670d\u52a1\u5668 IP&#xff0c;\u8bf4\u660e\u89e3\u6790\u5df2\u7ecf\u751f\u6548\u4e86\u3002<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"250\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d85313666c.png\" width=\"611\" \/><\/p>\n<p>\u65b0\u624b\u63d0\u793a&#xff1a;\u5982\u679c\u4f60\u6025\u7740\u6d4b\u8bd5&#xff0c;\u53ef\u4ee5\u5148\u5728\u672c\u5730\u7535\u8111\u4e0a\u4fee\u6539 hosts \u6587\u4ef6\u4e34\u65f6\u5c06\u57df\u540d\u6307\u5411\u670d\u52a1\u5668&#xff08;Windows \u4e0b\u662f\u00a0C:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts&#xff0c;Mac\/Linux \u4e0b\u662f\u00a0\/etc\/hosts&#xff09;&#xff0c;\u4f46\u8fd9\u4e2a\u65b9\u6cd5\u53ea\u5bf9\u4f60\u81ea\u5df1\u7684\u7535\u8111\u6709\u6548&#xff0c;\u6b63\u5f0f\u4e0a\u7ebf\u8fd8\u662f\u8981\u7b49 DNS \u89e3\u6790\u751f\u6548\u3002<\/p>\n<h3 id=\"toc_52\">\u7b2c\u516b\u6b65&#xff1a;\u5f00\u653e\u9632\u706b\u5899\u7aef\u53e3<\/h3>\n<p>\u5982\u679c\u4f60\u7684\u670d\u52a1\u5668\u5f00\u542f\u4e86\u9632\u706b\u5899&#xff08;Ubuntu \u9ed8\u8ba4\u6ca1\u6709\u5b89\u88c5 UFW&#xff0c;\u4f46\u6709\u4e9b\u4e91\u670d\u52a1\u5546\u9ed8\u8ba4\u4f1a\u5f00\u542f&#xff09;&#xff0c;\u9700\u8981\u786e\u4fdd 80 \u7aef\u53e3&#xff08;HTTP&#xff09;\u548c 443 \u7aef\u53e3&#xff08;HTTPS&#xff09;\u662f\u5f00\u653e\u7684\u3002<\/p>\n<p>\u68c0\u67e5 UFW \u72b6\u6001&#xff1a;<\/p>\n<p>ufw status <\/p>\n<p>\u5982\u679c\u663e\u793a\u00a0Status: inactive&#xff0c;\u8bf4\u660e\u9632\u706b\u5899\u6ca1\u5f00&#xff0c;\u53ef\u4ee5\u8df3\u8fc7\u8fd9\u4e00\u6b65\u3002<\/p>\n<p>\u5982\u679c\u663e\u793a\u00a0Status: active&#xff0c;\u9700\u8981\u5f00\u653e\u7aef\u53e3&#xff1a;<\/p>\n<p>ufw allow 80\/tcp<br \/>\nufw allow 443\/tcp<br \/>\nufw reload <\/p>\n<p>\u4e3a\u4ec0\u4e48\u8981\u5f00\u653e\u8fd9\u4e24\u4e2a\u7aef\u53e3&#xff1f;\u00a080 \u7aef\u53e3\u662f HTTP \u534f\u8bae\u7684\u9ed8\u8ba4\u7aef\u53e3&#xff0c;443 \u7aef\u53e3\u662f HTTPS \u534f\u8bae\u7684\u9ed8\u8ba4\u7aef\u53e3\u3002\u5982\u679c\u8fd9\u4e24\u4e2a\u7aef\u53e3\u88ab\u9632\u706b\u5899\u6321\u4f4f\u4e86&#xff0c;\u5916\u90e8\u7528\u6237\u5c31\u6839\u672c\u6253\u4e0d\u5f00\u4f60\u7684\u7f51\u7ad9\u3002<\/p>\n<p>\u53e6\u5916&#xff0c;\u6709\u4e9b\u4e91\u670d\u52a1\u5546&#xff0c;\u8981\u53bb\u540e\u53f0\u9632\u706b\u5899\u6216\u5b89\u5168\u7ec4\u91cc\u653e\u884c 80 \u548c 443 \u7aef\u53e3\u3002\u8fd9\u4e00\u70b9\u5f88\u5bb9\u6613\u88ab\u5ffd\u7565\u2014\u2014\u670d\u52a1\u5668\u5185\u90e8\u7684\u9632\u706b\u5899\u6253\u5f00\u4e86&#xff0c;\u4f46\u4e91\u670d\u52a1\u5546\u5916\u56f4\u7684\u5b89\u5168\u7ec4\u8fd8\u6321\u7740&#xff0c;\u7f51\u7ad9\u7167\u6837\u8bbf\u95ee\u4e0d\u4e86\u3002<\/p>\n<h3 id=\"toc_57\">\u7b2c\u4e5d\u6b65&#xff1a;\u4e0b\u8f7d WordPress<\/h3>\n<p>\u51c6\u5907\u5de5\u4f5c\u90fd\u505a\u5b8c\u4e86&#xff0c;\u73b0\u5728\u628a WordPress \u7684\u7a0b\u5e8f\u6587\u4ef6\u4e0b\u8f7d\u5230\u670d\u52a1\u5668\u4e0a\u3002<\/p>\n<p>\u5148\u8fdb\u5165 Nginx \u7684\u7f51\u7ad9\u6839\u76ee\u5f55&#xff08;\/var\/www\/html\u00a0\u662f Nginx \u9ed8\u8ba4\u7684\u7f51\u7ad9\u6839\u76ee\u5f55&#xff09;&#xff1a;<\/p>\n<p>cd \/var\/www\/html <\/p>\n<p>\u8865\u5145\u8bf4\u660e&#xff1a;\/var\/www\/html\u00a0\u8fd9\u4e2a\u8def\u5f84\u662f\u6709\u5386\u53f2\u6e0a\u6e90\u7684\u3002\/var\u00a0\u76ee\u5f55\u5b58\u653e\u7684\u662f\u201c\u53ef\u53d8\u6570\u636e\u201d&#xff08;variable data&#xff09;&#xff0c;\u6bd4\u5982\u65e5\u5fd7\u3001\u7f13\u5b58\u3001\u7f51\u7ad9\u6587\u4ef6\u7b49&#xff1b;\/www\u00a0\u662f web \u76f8\u5173\u6587\u4ef6\u7684\u5e38\u89c1\u5b58\u653e\u4f4d\u7f6e&#xff1b;html\u00a0\u662f\u5b58\u653e HTML \u6587\u4ef6\u7684\u76ee\u5f55\u3002\u4e0d\u8fc7\u8fd9\u4e2a\u8def\u5f84\u662f\u53ef\u4ee5\u81ea\u5b9a\u4e49\u7684&#xff0c;\u53ea\u662f Nginx \u9ed8\u8ba4\u914d\u7f6e\u91cc\u7528\u7684\u662f\u8fd9\u4e2a\u3002<\/p>\n<p>\u7136\u540e\u7528\u00a0wget\u00a0\u4e0b\u8f7d WordPress \u4e2d\u6587\u7248\u7684\u6700\u65b0\u538b\u7f29\u5305&#xff1a;<\/p>\n<p>wget https:\/\/cn.wordpress.org\/latest-zh_CN.tar.gz <\/p>\n<p>\u89e3\u538b&#xff1a;<\/p>\n<p>tar -xzf latest-zh_CN.tar.gz <\/p>\n<p>tar -xzf\u00a0\u7684\u53c2\u6570\u542b\u4e49&#xff1a;-x\u00a0\u8868\u793a\u89e3\u538b&#xff0c;-z\u00a0\u8868\u793a\u901a\u8fc7 gzip \u89e3\u538b&#xff0c;-f\u00a0\u8868\u793a\u6307\u5b9a\u6587\u4ef6\u540d\u3002<\/p>\n<p>\u89e3\u538b\u4e4b\u540e\u4f1a\u770b\u5230\u4e00\u4e2a\u00a0wordpress\u00a0\u6587\u4ef6\u5939&#xff0c;\u91cc\u9762\u5c31\u662f WordPress \u7684\u5168\u90e8\u7a0b\u5e8f\u6587\u4ef6\u3002<\/p>\n<p>\u628a\u00a0wordpress\u00a0\u6587\u4ef6\u5939\u91cc\u7684\u6240\u6709\u6587\u4ef6\u79fb\u52a8\u5230\u5f53\u524d\u76ee\u5f55&#xff08;\u4e5f\u5c31\u662f\u00a0\/var\/www\/html&#xff09;&#xff1a;<\/p>\n<p>mv wordpress\/* . <\/p>\n<p>\u5220\u6389\u7a7a\u7684\u00a0wordpress\u00a0\u6587\u4ef6\u5939\u548c\u4e0b\u8f7d\u7684\u538b\u7f29\u5305&#xff1a;<\/p>\n<p>rmdir wordpress<br \/>\nrm latest-zh_CN.tar.gz <\/p>\n<h3 id=\"toc_62\">\u7b2c\u5341\u6b65&#xff1a;\u914d\u7f6e WordPress \u6570\u636e\u5e93\u8fde\u63a5<\/h3>\n<p>WordPress \u9700\u8981\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u6765\u544a\u8bc9\u5b83\u6570\u636e\u5e93\u5728\u54ea\u3001\u8d26\u53f7\u5bc6\u7801\u662f\u4ec0\u4e48\u3002<\/p>\n<p>\u5148\u590d\u5236\u4e00\u4efd\u793a\u4f8b\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>cp wp-config-sample.php wp-config.php <\/p>\n<p>\u7136\u540e\u7528\u00a0nano\u00a0\u7f16\u8f91\u5668\u6253\u5f00\u914d\u7f6e\u6587\u4ef6&#xff08;nano\u00a0\u6bd4\u00a0vim\u00a0\u53cb\u597d\u5f97\u591a&#xff0c;\u9002\u5408\u65b0\u624b&#xff09;&#xff1a;<\/p>\n<p>nano wp-config.php <\/p>\n<p>\u5728\u6587\u4ef6\u91cc\u627e\u5230\u8fd9\u51e0\u884c&#xff08;\u5927\u6982\u5728\u6587\u4ef6\u4e2d\u95f4\u504f\u4e0b\u7684\u4f4d\u7f6e&#xff09;&#xff1a;<\/p>\n<p>define( &#039;DB_NAME&#039;, &#039;database_name_here&#039; );<br \/>\ndefine( &#039;DB_USER&#039;, &#039;username_here&#039; );<br \/>\ndefine( &#039;DB_PASSWORD&#039;, &#039;password_here&#039; );<br \/>\ndefine( &#039;DB_HOST&#039;, &#039;localhost&#039; ); <\/p>\n<p>\u628a\u5b83\u4eec\u6539\u6210\u4f60\u521a\u624d\u521b\u5efa\u7684\u6570\u636e\u5e93\u4fe1\u606f&#xff1a;<\/p>\n<p>define( &#039;DB_NAME&#039;, &#039;wordpress&#039; );<br \/>\ndefine( &#039;DB_USER&#039;, &#039;wpuser&#039; );<br \/>\ndefine( &#039;DB_PASSWORD&#039;, &#039;\u4f60\u7684\u5bc6\u7801&#039; );<br \/>\ndefine( &#039;DB_HOST&#039;, &#039;localhost&#039; ); <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"617\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d853143aea.png\" width=\"1024\" \/><\/p>\n<p>\u6539\u5b8c\u4e4b\u540e&#xff0c;\u6309\u00a0Ctrl &#043; X&#xff0c;\u7136\u540e\u6309\u00a0Y\u00a0\u786e\u8ba4\u4fdd\u5b58&#xff0c;\u518d\u6309\u56de\u8f66\u9000\u51fa\u3002<\/p>\n<p>\u989d\u5916\u5b89\u5168\u6b65\u9aa4\u4e00&#xff1a;\u6dfb\u52a0 Salt \u5bc6\u94a5<\/p>\n<p>WordPress \u5b98\u65b9\u5efa\u8bae\u5728\u914d\u7f6e\u6587\u4ef6\u91cc\u52a0\u4e00\u7ec4\u968f\u673a\u5bc6\u94a5&#xff0c;\u7528\u6765\u52a0\u5bc6\u7528\u6237\u4f1a\u8bdd\u3001Cookie \u7b49\u4fe1\u606f\u3002\u4f60\u53ef\u4ee5\u8bbf\u95ee\u00a0https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/\u00a0\u8fd9\u4e2a\u5730\u5740&#xff0c;\u4f1a\u751f\u6210\u4e00\u4e32\u968f\u673a\u5b57\u7b26&#xff0c;\u628a\u5b83\u4eec\u5b8c\u6574\u590d\u5236\u5230\u00a0wp-config.php\u00a0\u6587\u4ef6\u4e2d\u00a0Authentication Unique Keys and Salts\u00a0\u90a3\u51e0\u884c\u7684\u4f4d\u7f6e&#xff0c;\u66ff\u6362\u6389\u539f\u6765\u90a3\u4e9b\u5360\u4f4d\u5185\u5bb9\u3002<\/p>\n<p>\u989d\u5916\u5b89\u5168\u6b65\u9aa4\u4e8c&#xff1a;\u8bbe\u7f6e\u7f51\u7ad9\u57df\u540d<\/p>\n<p>\u5728\u00a0wp-config.php\u00a0\u6587\u4ef6\u4e2d\u627e\u5230\u00a0\/* That&#039;s all, stop editing! Happy publishing. *\/\u00a0\u8fd9\u884c\u6ce8\u91ca&#xff0c;\u5728\u5b83\u4e4b\u524d\u52a0\u4e0a\u4e0b\u9762\u4e24\u884c&#xff08;\u628a\u00a0example.com\u00a0\u6362\u6210\u4f60\u81ea\u5df1\u7684\u57df\u540d&#xff09;&#xff1a;<\/p>\n<p>define(&#039;WP_HOME&#039;, &#039;https:\/\/example.com&#039;);<br \/>\ndefine(&#039;WP_SITEURL&#039;, &#039;https:\/\/example.com&#039;); <\/p>\n<p>\u4e3a\u4ec0\u4e48\u73b0\u5728\u5c31\u8981\u5199\u6210 https&#xff1f;\u00a0\u56e0\u4e3a\u6211\u4eec\u5728\u540e\u7eed\u6b65\u9aa4\u4f1a\u914d\u7f6e HTTPS&#xff0c;\u5982\u679c\u8fd9\u91cc\u5199\u7684\u662f\u00a0http:\/\/&#xff0c;\u5230\u65f6\u5019\u8fd8\u8981\u56de\u5934\u6539&#xff0c;\u5bb9\u6613\u9057\u6f0f\u3002\u76f4\u63a5\u5199\u6210\u00a0https:\/\/\u00a0\u4e00\u6b65\u5230\u4f4d\u3002\u800c\u4e14 WordPress \u540e\u53f0\u7684\u201c\u8bbe\u7f6e \u2192 \u5e38\u89c4\u201d\u91cc\u4e5f\u6709\u7ad9\u70b9\u5730\u5740&#xff08;Site URL&#xff09;\u548c\u9996\u9875\u5730\u5740&#xff08;Home URL&#xff09;\u4e24\u4e2a\u9009\u9879&#xff0c;\u4f46\u5728\u914d\u7f6e\u6587\u4ef6\u91cc\u5b9a\u4e49\u4f18\u5148\u7ea7\u66f4\u9ad8&#xff0c;\u4f1a\u8986\u76d6\u540e\u53f0\u7684\u8bbe\u7f6e\u3002<\/p>\n<h3 id=\"toc_67\">\u7b2c\u5341\u4e00\u6b65&#xff1a;\u914d\u7f6e Nginx&#xff08;\u7ed1\u5b9a\u57df\u540d &#043; \u51c6\u5907 HTTPS&#xff09;<\/h3>\n<p>\u8fd9\u4e00\u6b65\u6bd4\u8f83\u5173\u952e&#xff0c;\u6211\u4eec\u8981\u914d\u7f6e Nginx \u8ba9\u5b83\u77e5\u9053&#xff1a;<\/p>\n<li>\u4f60\u7684\u7f51\u7ad9\u6587\u4ef6\u5728\u54ea\u4e2a\u76ee\u5f55<\/li>\n<li>\u4f60\u7684\u57df\u540d\u662f\u4ec0\u4e48<\/li>\n<li>\u5982\u4f55\u5904\u7406 PHP \u6587\u4ef6<\/li>\n<p>\u9996\u5148&#xff0c;\u4e3a\u4f60\u7684\u7f51\u7ad9\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684 Nginx \u914d\u7f6e\u6587\u4ef6&#xff0c;\u800c\u4e0d\u662f\u76f4\u63a5\u6539\u9ed8\u8ba4\u914d\u7f6e\u3002\u8fd9\u6837\u66f4\u5e72\u51c0&#xff0c;\u4ee5\u540e\u4e5f\u597d\u7ba1\u7406\u3002<\/p>\n<p>nano \/etc\/nginx\/sites-available\/\u4f60\u7684\u57df\u540d.conf <\/p>\n<p>\u6bd4\u5982\u4f60\u7684\u57df\u540d\u662f\u00a0example.com&#xff0c;\u5c31\u8f93\u5165&#xff1a;<\/p>\n<p>nano \/etc\/nginx\/sites-available\/example.com.conf <\/p>\n<p>\u7136\u540e\u628a\u4e0b\u9762\u7684\u5185\u5bb9\u7c98\u8d34\u8fdb\u53bb&#xff08;\u628a\u6240\u6709\u7684\u00a0example.com\u00a0\u6362\u6210\u4f60\u81ea\u5df1\u7684\u57df\u540d&#xff0c;\u628a\u00a0php8.3\u00a0\u6362\u6210\u4f60\u5b9e\u9645\u7684 PHP \u7248\u672c&#xff09;&#xff1a;<\/p>\n<p>server {<br \/>\n    listen 80;<br \/>\n    listen [::]:80;<br \/>\n    server_name example.com www.example.com;<br \/>\n    root \/var\/www\/html;<br \/>\n    index index.php index.html index.htm;<\/p>\n<p>    location \/ {<br \/>\n        try_files $uri $uri\/ \/index.php?$args;<br \/>\n    }<\/p>\n<p>    location ~ \\\\.php$ {<br \/>\n        include snippets\/fastcgi-php.conf;<br \/>\n        fastcgi_pass unix:\/var\/run\/php\/php8.3-fpm.sock;<br \/>\n    }<\/p>\n<p>    location ~ \/\\\\.ht {<br \/>\n        deny all;<br \/>\n    }<br \/>\n} <\/p>\n<p>\u9010\u884c\u89e3\u91ca\u4e00\u4e0b&#xff1a;<\/p>\n<ul>\n<li>listen 80\u00a0\u548c\u00a0listen [::]:80&#xff1a;\u76d1\u542c 80 \u7aef\u53e3&#xff08;HTTP \u7684\u9ed8\u8ba4\u7aef\u53e3&#xff09;&#xff0c;\u524d\u8005\u76d1\u542c IPv4&#xff0c;\u540e\u8005\u76d1\u542c IPv6<\/li>\n<li>server_name&#xff1a;\u544a\u8bc9 Nginx&#xff0c;\u5f53\u7528\u6237\u8bbf\u95ee\u00a0example.com\u00a0\u6216\u00a0www.example.com\u00a0\u65f6&#xff0c;\u4f7f\u7528\u8fd9\u4e2a\u914d\u7f6e\u3002Nginx \u652f\u6301\u591a\u4e2a\u57df\u540d\u6307\u5411\u540c\u4e00\u4e2a\u7ad9\u70b9&#xff0c;\u7528\u7a7a\u683c\u5206\u9694\u5c31\u884c&#xff0c;\u5982\u679c\u4f60\u4e0d\u9700\u8981www.\u4f60\u7684\u57df\u540d&#xff0c;\u90a3\u53ea\u4fdd\u7559\u524d\u9762\u90a3\u4e2a\u5373\u53ef\u3002<\/li>\n<li>root&#xff1a;\u7f51\u7ad9\u6587\u4ef6\u5b58\u653e\u5728\u54ea\u4e2a\u76ee\u5f55<\/li>\n<li>index&#xff1a;\u5f53\u7528\u6237\u8bbf\u95ee\u4e00\u4e2a\u76ee\u5f55\u65f6&#xff0c;\u9ed8\u8ba4\u52a0\u8f7d\u54ea\u4e2a\u6587\u4ef6&#xff08;\u4f18\u5148\u627e\u00a0index.php&#xff0c;\u7136\u540e\u662f\u00a0index.html&#xff0c;\u518d\u662f\u00a0index.htm&#xff09;<\/li>\n<li>location \/ { try_files &#8230; }&#xff1a;\u8fd9\u662f WordPress \u7684\u201c\u4f2a\u9759\u6001\u201d\u89c4\u5219\u3002\u5b83\u7684\u610f\u601d\u662f&#xff1a;\u5982\u679c\u7528\u6237\u8bf7\u6c42\u7684\u662f\u4e00\u4e2a\u5b9e\u9645\u5b58\u5728\u7684\u6587\u4ef6\u6216\u76ee\u5f55&#xff0c;\u5c31\u76f4\u63a5\u8fd4\u56de&#xff1b;\u5426\u5219\u628a\u6240\u6709\u8bf7\u6c42\u4ea4\u7ed9\u00a0\/index.php\u00a0\u5904\u7406&#xff0c;\u5e76\u628a\u539f\u59cb\u7684\u67e5\u8be2\u53c2\u6570&#xff08;$args&#xff09;\u5e26\u8fc7\u53bb\u3002\u8fd9\u6837 WordPress \u624d\u80fd\u5904\u7406\u50cf\u00a0\/about\u00a0\u8fd9\u6837\u7684\u201c\u53cb\u597d URL\u201d<\/li>\n<li>location ~ \\\\.php$&#xff1a;\u6240\u6709\u4ee5\u00a0.php\u00a0\u7ed3\u5c3e\u7684\u8bf7\u6c42&#xff0c;\u4ea4\u7ed9 PHP-FPM \u5904\u7406\u3002~\u00a0\u8868\u793a\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d<\/li>\n<li>fastcgi_pass&#xff1a;PHP-FPM \u7684\u901a\u4fe1\u5730\u5740\u3002\u8fd9\u91cc\u7528\u7684\u662f Unix socket \u65b9\u5f0f&#xff08;unix:\/var\/run\/php\/php8.1-fpm.sock&#xff09;&#xff0c;\u6bd4 TCP socket&#xff08;127.0.0.1:9000&#xff09;\u6027\u80fd\u7565\u597d&#xff0c;\u914d\u7f6e\u4e5f\u66f4\u7b80\u5355<\/li>\n<li>location ~ \/\\\\.ht&#xff1a;\u7981\u6b62\u8bbf\u95ee\u6240\u6709\u4ee5\u00a0.ht\u00a0\u5f00\u5934\u7684\u6587\u4ef6&#xff08;.htaccess\u00a0\u548c\u00a0.htpasswd&#xff09;&#xff0c;\u8fd9\u662f Apache \u7528\u7684\u914d\u7f6e\u6587\u4ef6&#xff0c;Nginx \u4e0d\u8ba4&#xff0c;\u76f4\u63a5\u62d2\u7edd\u8bbf\u95ee\u66f4\u5b89\u5168<\/li>\n<\/ul>\n<p>\u5982\u4f55\u786e\u8ba4 PHP-FPM \u7684 socket \u8def\u5f84&#xff1f;\u00a0\u53ef\u4ee5\u7528\u00a0ls \/var\/run\/php\/\u00a0\u770b\u770b\u91cc\u9762\u6709\u4ec0\u4e48\u00a0.sock\u00a0\u6587\u4ef6&#xff0c;\u6bd4\u5982\u00a0php8.1-fpm.sock\u00a0\u6216\u00a0php8.3-fpm.sock&#xff0c;\u628a\u914d\u7f6e\u6587\u4ef6\u91cc\u7684\u7248\u672c\u53f7\u6539\u6210\u5bf9\u5e94\u7684\u5c31\u884c\u3002<\/p>\n<p>\u4fdd\u5b58\u9000\u51fa&#xff08;Ctrl &#043; X&#xff0c;\u7136\u540e\u00a0Y&#xff0c;\u518d\u56de\u8f66&#xff09;\u3002<\/p>\n<p>\u7136\u540e&#xff0c;\u542f\u7528\u8fd9\u4e2a\u914d\u7f6e\u2014\u2014\u5728 Nginx \u4e2d&#xff0c;sites-available\u00a0\u662f\u5b58\u653e\u6240\u6709\u53ef\u7528\u914d\u7f6e\u7684\u5730\u65b9&#xff0c;\u800c\u00a0sites-enabled\u00a0\u662f\u5b58\u653e\u5b9e\u9645\u542f\u7528\u914d\u7f6e\u7684\u5730\u65b9\u3002\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u8f6f\u94fe\u63a5&#xff1a;<\/p>\n<p>ln -s \/etc\/nginx\/sites-available\/\u4f60\u7684\u57df\u540d.conf \/etc\/nginx\/sites-enabled\/ <\/p>\n<p>\u6bd4\u5982&#xff1a;<\/p>\n<p>ln -s \/etc\/nginx\/sites-available\/example.com.conf \/etc\/nginx\/sites-enabled\/ <\/p>\n<p>\u4ec0\u4e48\u662f\u8f6f\u94fe\u63a5&#xff1f;\u00a0\u8f6f\u94fe\u63a5&#xff08;symbolic link&#xff09;\u7c7b\u4f3c\u4e8e Windows \u4e0b\u7684\u5feb\u6377\u65b9\u5f0f\u3002\u8fd9\u6837\u505a\u7684\u76ee\u7684\u662f\u628a\u914d\u7f6e\u6587\u4ef6\u96c6\u4e2d\u653e\u5728\u00a0sites-available\u00a0\u91cc\u7ba1\u7406&#xff0c;\u60f3\u542f\u7528\u67d0\u4e2a\u7ad9\u70b9\u5c31\u5728\u00a0sites-enabled\u00a0\u91cc\u521b\u5efa\u4e00\u4e2a\u6307\u5411\u5b83\u7684\u94fe\u63a5&#xff0c;\u60f3\u505c\u7528\u5c31\u76f4\u63a5\u5220\u9664\u8fd9\u4e2a\u94fe\u63a5&#xff0c;\u800c\u4e0d\u7528\u5220\u9664\u539f\u59cb\u6587\u4ef6\u3002<\/p>\n<p>\u6700\u540e&#xff0c;\u5220\u9664\u9ed8\u8ba4\u7684 Nginx \u914d\u7f6e&#xff08;\u4e0d\u7136\u53ef\u80fd\u4f1a\u548c\u4f60\u7684\u914d\u7f6e\u51b2\u7a81&#xff09;&#xff1a;<\/p>\n<p>rm \/etc\/nginx\/sites-enabled\/default <\/p>\n<p>\u68c0\u67e5\u4e00\u4e0b Nginx \u914d\u7f6e\u6709\u6ca1\u6709\u8bed\u6cd5\u9519\u8bef&#xff1a;<\/p>\n<p>nginx -t <\/p>\n<p>\u5982\u679c\u663e\u793a\u00a0syntax is ok\u00a0\u548c\u00a0test is successful&#xff0c;\u8bf4\u660e\u914d\u7f6e\u6ca1\u95ee\u9898\u3002<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"54\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d85316ceed.png\" width=\"488\" \/><\/p>\n<p>\u7136\u540e\u91cd\u8f7d Nginx&#xff1a;<\/p>\n<p>systemctl reload nginx <\/p>\n<p>\u73b0\u5728\u5728\u6d4f\u89c8\u5668\u91cc\u8f93\u5165\u4f60\u7684\u57df\u540d&#xff08;http:\/\/\u4f60\u7684\u57df\u540d&#xff09;&#xff0c;\u5e94\u8be5\u80fd\u770b\u5230 WordPress \u7684\u5b89\u88c5\u754c\u9762\u4e86\u3002\u4e0d\u8fc7\u522b\u6025&#xff0c;\u6211\u4eec\u5148\u52a0\u4e0a HTTPS \u518d\u7ee7\u7eed\u3002<\/p>\n<h3 id=\"toc_72\">\u7b2c\u5341\u4e8c\u6b65&#xff1a;\u7528 Certbot \u81ea\u52a8\u914d\u7f6e HTTPS&#xff08;Let&#039;s Encrypt \u514d\u8d39\u8bc1\u4e66&#xff09;<\/h3>\n<p>HTTP \u662f\u660e\u6587\u4f20\u8f93\u7684&#xff0c;\u4f60\u8f93\u5165\u7684\u4efb\u4f55\u4fe1\u606f&#xff08;\u5305\u62ec\u5bc6\u7801&#xff09;\u5728\u7f51\u7edc\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u90fd\u662f\u88f8\u5954\u7684&#xff0c;\u975e\u5e38\u4e0d\u5b89\u5168\u3002\u6211\u4eec\u8981\u7ed9\u7f51\u7ad9\u52a0\u4e0a HTTPS&#xff0c;\u7528 Let&#039;s Encrypt \u63d0\u4f9b\u7684\u514d\u8d39 SSL \u8bc1\u4e66\u3002<\/p>\n<p>\u4ec0\u4e48\u662f Let&#039;s Encrypt&#xff1f;\u00a0\u5b83\u662f\u4e00\u4e2a\u975e\u8425\u5229\u6027\u7684\u8bc1\u4e66\u9881\u53d1\u673a\u6784&#xff08;CA&#xff09;&#xff0c;\u7531 Linux \u57fa\u91d1\u4f1a\u6258\u7ba1&#xff0c;\u4e3a\u5168\u7403\u7f51\u7ad9\u63d0\u4f9b\u514d\u8d39\u7684 SSL\/TLS \u8bc1\u4e66\u3002\u5b83\u7684\u8bc1\u4e66\u6709\u6548\u671f\u4e3a 90 \u5929&#xff0c;\u4f46\u53ef\u4ee5\u81ea\u52a8\u7eed\u671f&#xff0c;\u5b8c\u5168\u4e0d\u9700\u8981\u624b\u52a8\u5e72\u9884\u3002<\/p>\n<p>Let&#039;s Encrypt \u7684\u8bc1\u4e66\u7533\u8bf7\u548c\u914d\u7f6e\u8fc7\u7a0b\u53ef\u4ee5\u4f7f\u7528 Certbot \u8fd9\u4e2a\u5de5\u5177\u5168\u81ea\u52a8\u5b8c\u6210\u3002<\/p>\n<p>\u5b89\u88c5 Certbot \u548c Nginx \u63d2\u4ef6&#xff1a;<\/p>\n<p>apt install certbot python3-certbot-nginx -y <\/p>\n<p>\u7533\u8bf7\u8bc1\u4e66\u5e76\u81ea\u52a8\u914d\u7f6e Nginx&#xff1a;<\/p>\n<p>\u5982\u679c\u4e0d\u9700\u8981www.\u7684\u90e8\u5206\u53bb\u6389\u540e\u9762\u7684-d www.\u4f60\u7684\u57df\u540d\u5373\u53ef<\/p>\n<p>certbot &#8211;nginx -d \u4f60\u7684\u57df\u540d -d www.\u4f60\u7684\u57df\u540d <\/p>\n<p>\u6bd4\u5982&#xff1a;<\/p>\n<p>certbot &#8211;nginx -d example.com -d www.example.com <\/p>\n<p>\u8fd0\u884c\u540e&#xff0c;Certbot \u4f1a\u95ee\u4f60\u51e0\u4e2a\u95ee\u9898&#xff1a;<\/p>\n<li>\u8f93\u5165\u90ae\u7bb1\u5730\u5740&#xff1a;\u7528\u4e8e\u63a5\u6536\u7d27\u6025\u7eed\u671f\u901a\u77e5\u548c\u5b89\u5168\u63d0\u9192&#xff08;\u5982\u679c\u8bc1\u4e66\u5373\u5c06\u8fc7\u671f\u6216\u51fa\u73b0\u95ee\u9898&#xff0c;\u4f1a\u53d1\u90ae\u4ef6\u901a\u77e5\u4f60&#xff09;<\/li>\n<li>\u540c\u610f\u670d\u52a1\u6761\u6b3e&#xff1a;\u8f93\u5165\u00a0A\u00a0\u540c\u610f<\/li>\n<li>\u662f\u5426\u613f\u610f\u5206\u4eab\u90ae\u7bb1\u7ed9 EFF&#xff08;\u7535\u5b50\u524d\u54e8\u57fa\u91d1\u4f1a&#xff0c;EFF \u662f Let&#039;s Encrypt \u7684\u4e3b\u8981\u53d1\u8d77\u65b9\u4e4b\u4e00&#xff09;&#xff1a;\u8f93\u5165\u00a0Y\u00a0\u6216\u00a0N\u00a0\u90fd\u884c&#xff0c;\u770b\u4f60\u81ea\u5df1<\/li>\n<p>\u7136\u540e Certbot \u4f1a\u81ea\u52a8\u5b8c\u6210\u4ee5\u4e0b\u6b65\u9aa4&#xff1a;<\/p>\n<ul>\n<li>\u9a8c\u8bc1\u4f60\u5bf9\u57df\u540d\u7684\u6240\u6709\u6743&#xff08;\u901a\u8fc7\u5728\u4f60\u7f51\u7ad9\u76ee\u5f55\u4e0b\u653e\u4e00\u4e2a\u4e34\u65f6\u9a8c\u8bc1\u6587\u4ef6&#xff0c;Let&#039;s Encrypt \u7684\u670d\u52a1\u5668\u4f1a\u901a\u8fc7 HTTP \u8bbf\u95ee\u8fd9\u4e2a\u6587\u4ef6\u6765\u786e\u8ba4\u4f60\u786e\u5b9e\u62e5\u6709\u8fd9\u4e2a\u57df\u540d\u7684\u63a7\u5236\u6743&#xff09;<\/li>\n<li>\u5411 Let&#039;s Encrypt \u7533\u8bf7\u8bc1\u4e66<\/li>\n<li>\u81ea\u52a8\u4fee\u6539\u4f60\u7684 Nginx \u914d\u7f6e\u6587\u4ef6&#xff0c;\u52a0\u4e0a HTTPS \u76f8\u5173\u7684\u914d\u7f6e<\/li>\n<li>\u91cd\u8f7d Nginx \u8ba9\u914d\u7f6e\u751f\u6548<\/li>\n<\/ul>\n<p>\u6574\u4e2a\u8fc7\u7a0b\u4e0d\u5230\u4e00\u5206\u949f\u3002\u5b8c\u6210\u540e&#xff0c;\u6253\u5f00\u6d4f\u89c8\u5668\u8f93\u5165\u00a0https:\/\/\u4f60\u7684\u57df\u540d&#xff0c;\u5e94\u8be5\u80fd\u770b\u5230\u6d4f\u89c8\u5668\u5730\u5740\u680f\u65c1\u8fb9\u6709\u4e2a\u5c0f\u9501\u5934\u56fe\u6807&#xff0c;\u8bf4\u660e HTTPS \u5df2\u7ecf\u751f\u6548\u4e86\u3002<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"104\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d853175dba.png\" width=\"406\" \/><\/p>\n<p>\u68c0\u67e5\u8bc1\u4e66\u72b6\u6001&#xff1a;\u4efb\u4f55\u65f6\u5019\u4f60\u53ef\u4ee5\u7528\u00a0certbot certificates\u00a0\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u6240\u6709\u5df2\u5b89\u88c5\u7684\u8bc1\u4e66\u5217\u8868\u53ca\u5176\u5230\u671f\u65f6\u95f4\u3002<\/p>\n<h3 id=\"toc_77\">\u7b2c\u5341\u4e09\u6b65&#xff1a;\u914d\u7f6e HTTP \u81ea\u52a8\u8df3\u8f6c\u5230 HTTPS<\/h3>\n<p>\u867d\u7136 Certbot \u901a\u5e38\u4f1a\u81ea\u52a8\u5e2e\u4f60\u914d\u7f6e\u597d HTTP \u5230 HTTPS \u7684\u91cd\u5b9a\u5411&#xff0c;\u4f46\u6700\u597d\u786e\u8ba4\u4e00\u4e0b\u3002\u6253\u5f00\u4f60\u7684 Nginx \u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>nano \/etc\/nginx\/sites-available\/\u4f60\u7684\u57df\u540d.conf <\/p>\n<p>\u68c0\u67e5\u4e00\u4e0b&#xff0c;\u5e94\u8be5\u6709\u4e24\u4e2a\u00a0server\u00a0\u5757&#xff1a;<\/p>\n<p>\u7b2c\u4e00\u4e2a&#xff08;\u76d1\u542c 80 \u7aef\u53e3&#xff09;\u8d1f\u8d23\u628a HTTP \u8bf7\u6c42\u91cd\u5b9a\u5411\u5230 HTTPS&#xff1a;<\/p>\n<p>server {<br \/>\n    listen 80;<br \/>\n    listen [::]:80;<br \/>\n    server_name example.com www.example.com;<br \/>\n    return 301 https:\/\/$server_name$request_uri;<br \/>\n} <\/p>\n<p>return 301\u00a0\u662f\u6c38\u4e45\u91cd\u5b9a\u5411&#xff08;Moved Permanently&#xff09;&#xff0c;\u544a\u8bc9\u6d4f\u89c8\u5668\u548c\u641c\u7d22\u5f15\u64ce&#xff1a;\u8fd9\u4e2a\u5730\u5740\u5df2\u7ecf\u6c38\u4e45\u8fc1\u79fb\u5230 HTTPS \u7248\u672c\u4e86\u3002301\u00a0\u548c\u00a0302\u00a0\u7684\u533a\u522b\u662f&#xff1a;301\u00a0\u662f\u6c38\u4e45\u6027\u7684&#xff0c;\u641c\u7d22\u5f15\u64ce\u4f1a\u628a\u6743\u91cd\u8f6c\u79fb\u5230\u65b0\u5730\u5740&#xff1b;302\u00a0\u662f\u4e34\u65f6\u6027\u7684&#xff0c;\u641c\u7d22\u5f15\u64ce\u4e0d\u4f1a\u8f6c\u79fb\u6743\u91cd\u3002<\/p>\n<p>\u7b2c\u4e8c\u4e2a&#xff08;\u76d1\u542c 443 \u7aef\u53e3&#xff09;\u8d1f\u8d23\u5904\u7406 HTTPS \u8bf7\u6c42&#xff0c;Certbot \u4f1a\u81ea\u52a8\u5e2e\u4f60\u586b\u597d\u8bc1\u4e66\u8def\u5f84&#xff1a;<\/p>\n<p>server {<br \/>\n    listen 443 ssl;<br \/>\n    listen [::]:443 ssl;<br \/>\n    server_name example.com www.example.com;<br \/>\n    root \/var\/www\/html;<br \/>\n    index index.php index.html index.htm;<\/p>\n<p>    ssl_certificate \/etc\/letsencrypt\/live\/example.com\/fullchain.pem;<br \/>\n    ssl_certificate_key \/etc\/letsencrypt\/live\/example.com\/privkey.pem;<\/p>\n<p>    location \/ {<br \/>\n        try_files $uri $uri\/ \/index.php?$args;<br \/>\n    }<\/p>\n<p>    location ~ \\\\.php$ {<br \/>\n        include snippets\/fastcgi-php.conf;<br \/>\n        fastcgi_pass unix:\/var\/run\/php\/php8.3-fpm.sock;<br \/>\n    }<\/p>\n<p>    location ~ \/\\\\.ht {<br \/>\n        deny all;<br \/>\n    }<br \/>\n} <\/p>\n<p>\u8bc1\u4e66\u6587\u4ef6\u7684\u542b\u4e49&#xff1a;fullchain.pem\u00a0\u662f\u5b8c\u6574\u7684\u8bc1\u4e66\u94fe\u6587\u4ef6&#xff0c;\u5305\u542b\u4e86\u4f60\u7684\u7ad9\u70b9\u8bc1\u4e66\u548c\u4e2d\u95f4\u8bc1\u4e66&#xff1b;privkey.pem\u00a0\u662f\u4f60\u7684\u79c1\u94a5\u6587\u4ef6&#xff0c;\u5fc5\u987b\u4e25\u683c\u4fdd\u5bc6&#xff0c;\u7edd\u5bf9\u4e0d\u80fd\u6cc4\u9732\u3002<\/p>\n<p>\u5982\u679c\u4f60\u7684\u914d\u7f6e\u91cc\u6ca1\u6709\u7b2c\u4e00\u4e2a\u00a0server\u00a0\u5757&#xff08;80 \u7aef\u53e3\u90a3\u4e2a&#xff09;&#xff0c;\u624b\u52a8\u52a0\u4e0a\u5c31\u884c\u3002\u4fdd\u5b58\u540e\u68c0\u67e5\u914d\u7f6e\u5e76\u91cd\u8f7d&#xff1a;<\/p>\n<p>nginx -t<br \/>\nsystemctl reload nginx <\/p>\n<p>\u73b0\u5728\u8bbf\u95ee\u00a0http:\/\/\u4f60\u7684\u57df\u540d\u00a0\u4f1a\u81ea\u52a8\u8df3\u8f6c\u5230\u00a0https:\/\/\u4f60\u7684\u57df\u540d\u3002<\/p>\n<h3 id=\"toc_82\">\u7b2c\u5341\u56db\u6b65&#xff1a;\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650<\/h3>\n<p>WordPress \u9700\u8981\u5bf9\u67d0\u4e9b\u6587\u4ef6\u5939\u6709\u5199\u5165\u6743\u9650&#xff0c;\u6bd4\u5982\u4e0a\u4f20\u56fe\u7247\u3001\u5b89\u88c5\u4e3b\u9898\u548c\u63d2\u4ef6\u3002\u4f46\u6743\u9650\u4e5f\u4e0d\u80fd\u7ed9\u5f97\u592a\u677e&#xff0c;\u4e0d\u5b89\u5168\u3002<\/p>\n<p>\u5148\u4fee\u6539\u6587\u4ef6\u6240\u6709\u8005&#xff1a;<\/p>\n<p>chown -R www-data:www-data \/var\/www\/html <\/p>\n<p>\u8fd9\u6761\u547d\u4ee4\u628a\u7f51\u7ad9\u76ee\u5f55\u7684\u6240\u6709\u8005\u6539\u6210\u00a0www-data\u3002-R\u00a0\u8868\u793a\u9012\u5f52\u5904\u7406&#xff0c;\u4f1a\u4fee\u6539\u8be5\u76ee\u5f55\u4e0b\u6240\u6709\u5b50\u76ee\u5f55\u548c\u6587\u4ef6\u3002<\/p>\n<p>www-data\u00a0\u662f\u4ec0\u4e48&#xff1f;\u00a0\u5b83\u662f Ubuntu\/Debian \u7cfb\u7edf\u4e2d Nginx \u548c PHP-FPM \u9ed8\u8ba4\u7684\u8fd0\u884c\u7528\u6237\u3002Web \u670d\u52a1\u5668\u4ee5\u8fd9\u4e2a\u7528\u6237\u7684\u8eab\u4efd\u8bfb\u53d6\u548c\u6267\u884c\u7f51\u7ad9\u6587\u4ef6\u3002\u628a\u7f51\u7ad9\u76ee\u5f55\u7684\u6240\u6709\u8005\u8bbe\u4e3a\u00a0www-data&#xff0c;Web \u670d\u52a1\u5668\u624d\u6709\u6743\u9650\u8bfb\u5199\u8fd9\u4e9b\u6587\u4ef6\u3002<\/p>\n<p>\u7136\u540e\u8bbe\u7f6e\u6587\u4ef6\u5939\u6743\u9650\u4e3a\u00a0755&#xff0c;\u6587\u4ef6\u6743\u9650\u4e3a\u00a0644&#xff1a;<\/p>\n<p>find \/var\/www\/html -type d -exec chmod 755 {} \\\\;<br \/>\nfind \/var\/www\/html -type f -exec chmod 644 {} \\\\; <\/p>\n<p>755 \u548c 644 \u662f\u4ec0\u4e48\u610f\u601d&#xff1f;\u00a0Linux \u6743\u9650\u7528\u4e09\u4f4d\u6570\u5b57\u8868\u793a&#xff1a;\u7b2c\u4e00\u4f4d\u662f\u6240\u6709\u8005&#xff08;owner&#xff09;\u7684\u6743\u9650&#xff0c;\u7b2c\u4e8c\u4f4d\u662f\u6240\u5c5e\u7ec4&#xff08;group&#xff09;\u7684\u6743\u9650&#xff0c;\u7b2c\u4e09\u4f4d\u662f\u5176\u4ed6\u4eba&#xff08;others&#xff09;\u7684\u6743\u9650\u30027\u00a0&#061; \u8bfb&#xff08;4&#xff09;&#043; \u5199&#xff08;2&#xff09;&#043; \u6267\u884c&#xff08;1&#xff09;&#xff0c;5\u00a0&#061; \u8bfb&#xff08;4&#xff09;&#043; \u6267\u884c&#xff08;1&#xff09;&#xff0c;4\u00a0&#061; \u53ea\u8bfb\u3002\u6240\u4ee5\u00a0755\u00a0\u8868\u793a\u6240\u6709\u8005\u6709\u5168\u90e8\u6743\u9650&#xff0c;\u7ec4\u7528\u6237\u548c\u5176\u4ed6\u7528\u6237\u53ea\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650&#xff1b;644\u00a0\u8868\u793a\u6240\u6709\u8005\u6709\u8bfb\u5199\u6743\u9650&#xff0c;\u7ec4\u7528\u6237\u548c\u5176\u4ed6\u7528\u6237\u53ea\u6709\u8bfb\u6743\u9650\u3002<\/p>\n<p>\u8fd9\u6837 WordPress \u5c31\u80fd\u6b63\u5e38\u8bfb\u5199\u6587\u4ef6\u4e86&#xff0c;\u540c\u65f6\u5b89\u5168\u6027\u4e5f\u6709\u4fdd\u969c\u3002<\/p>\n<h3 id=\"toc_87\">\u7b2c\u5341\u4e94\u6b65&#xff1a;\u8c03\u6574 PHP \u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f\u9650\u5236<\/h3>\n<p>WordPress \u9ed8\u8ba4\u5141\u8bb8\u4e0a\u4f20\u7684\u6587\u4ef6\u5927\u5c0f\u662f 2MB&#xff0c;\u8fd9\u4e2a\u5bf9\u4e8e\u4e0a\u4f20\u4e3b\u9898\u3001\u63d2\u4ef6\u6216\u8005\u5927\u56fe\u7247\u6765\u8bf4\u901a\u5e38\u662f\u4e0d\u591f\u7684\u3002\u6211\u4eec\u9700\u8981\u4fee\u6539 PHP \u7684\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<p>\u627e\u5230 PHP \u7684\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>nano \/etc\/php\/8.3\/fpm\/php.ini <\/p>\n<p>\u6ce8\u610f&#xff1a;\u7248\u672c\u53f7\u6362\u6210\u4f60\u5b9e\u9645\u7684 PHP \u7248\u672c\u3002Ubuntu 22.04 \u662f\u00a08.1&#xff0c;Ubuntu 24.04 \u662f\u00a08.3\u3002<\/p>\n<p>\u627e\u5230\u4e0b\u9762\u8fd9\u4e09\u884c&#xff0c;\u4fee\u6539\u6210\u4f60\u60f3\u8981\u7684\u6570\u503c&#xff08;\u8fd9\u91cc\u4ee5 64MB \u4e3a\u4f8b&#xff09;&#xff1a;<\/p>\n<p>upload_max_filesize &#061; 64M<br \/>\npost_max_size &#061; 64M<br \/>\nmemory_limit &#061; 128M <\/p>\n<ul>\n<li>upload_max_filesize&#xff1a;\u5355\u4e2a\u4e0a\u4f20\u6587\u4ef6\u7684\u6700\u5927\u5927\u5c0f<\/li>\n<li>post_max_size&#xff1a;\u5355\u6b21 POST \u8bf7\u6c42\u7684\u6700\u5927\u5927\u5c0f&#xff08;\u5fc5\u987b\u5927\u4e8e\u7b49\u4e8e\u00a0upload_max_filesize&#xff0c;\u56e0\u4e3a\u4e0a\u4f20\u6587\u4ef6\u662f\u7528 POST \u65b9\u6cd5\u63d0\u4ea4\u7684&#xff09;<\/li>\n<li>memory_limit&#xff1a;PHP \u811a\u672c\u53ef\u4f7f\u7528\u7684\u6700\u5927\u5185\u5b58&#xff08;\u5fc5\u987b\u5927\u4e8e\u00a0post_max_size&#xff0c;\u5426\u5219\u5927\u6587\u4ef6\u4e0a\u4f20\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u5185\u5b58\u6ea2\u51fa&#xff09;<\/li>\n<\/ul>\n<p>\u6539\u5b8c\u4e4b\u540e\u4fdd\u5b58\u9000\u51fa&#xff0c;\u7136\u540e\u91cd\u542f PHP-FPM \u8ba9\u914d\u7f6e\u751f\u6548&#xff1a;<\/p>\n<p>systemctl restart php8.3-fpm <\/p>\n<p>\u6ce8\u610f\u7248\u672c\u53f7\u540c\u6837\u8981\u6362\u6210\u4f60\u5b9e\u9645\u7684\u7248\u672c\u3002<\/p>\n<h3 id=\"toc_92\">\u7b2c\u5341\u516d\u6b65&#xff1a;\u6d4f\u89c8\u5668\u4e2d\u5b8c\u6210 WordPress \u5b89\u88c5<\/h3>\n<p>\u4ee5\u4e0a\u6240\u6709\u6b65\u9aa4\u90fd\u505a\u5b8c\u4e4b\u540e&#xff0c;\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u8f93\u5165\u4f60\u7684\u57df\u540d&#xff08;https:\/\/\u4f60\u7684\u57df\u540d&#xff09;\u3002<\/p>\n<p>\u5e94\u8be5\u4f1a\u770b\u5230 WordPress \u7684\u5b89\u88c5\u754c\u9762&#xff0c;\u8ba9\u4f60\u9009\u62e9\u8bed\u8a00\u2014\u2014\u9009\u7b80\u4f53\u4e2d\u6587&#xff0c;\u70b9\u201c\u7ee7\u7eed\u201d\u3002<\/p>\n<p>\u7136\u540e\u4f1a\u770b\u5230\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f&#xff08;\u524d\u9762\u5982\u679c\u4f60\u8ddf\u7740\u6211\u7684\u6559\u7a0b\u5728\u6587\u4ef6\u91cc\u8bbe\u7f6e\u8fc7\u4e86&#xff0c;\u90a3\u53ef\u4ee5\u76f4\u63a5\u53bb\u8bbe\u7f6e\u7f51\u7ad9\u57fa\u672c\u4fe1\u606f\u4e86&#xff09;&#xff1a;<\/p>\n<p>1.\u6570\u636e\u5e93\u540d&#xff1a;wordpress<\/p>\n<p>2.\u7528\u6237\u540d&#xff1a;wpuser<\/p>\n<p>3.\u5bc6\u7801&#xff1a;\u4f60\u8bbe\u7684\u5bc6\u7801<\/p>\n<p>4.\u6570\u636e\u5e93\u4e3b\u673a&#xff1a;localhost<\/p>\n<p>5.\u8868\u524d\u7f00&#xff1a;wp_&#xff08;\u9ed8\u8ba4\u5c31\u597d&#xff0c;\u5982\u679c\u4f60\u6709\u7279\u6b8a\u9700\u6c42\u53ef\u4ee5\u6539&#xff0c;\u4f46\u4e00\u822c\u4e0d\u9700\u8981\u52a8&#xff09;<\/p>\n<p>\u586b\u597d\u4e4b\u540e\u70b9\u201c\u63d0\u4ea4\u201d&#xff0c;\u5982\u679c\u4fe1\u606f\u90fd\u5bf9&#xff0c;\u5c31\u4f1a\u8fdb\u5165\u4e0b\u4e00\u6b65\u3002<\/p>\n<p>\u5982\u679c\u63d0\u793a\u201c\u65e0\u6cd5\u8fde\u63a5\u6570\u636e\u5e93\u201d&#xff1a;\u8fd4\u56de\u68c0\u67e5\u00a0wp-config.php\u00a0\u91cc\u7684\u6570\u636e\u5e93\u4fe1\u606f\u662f\u5426\u5b8c\u5168\u6b63\u786e&#xff0c;\u5c24\u5176\u662f\u5bc6\u7801\u6709\u6ca1\u6709\u6253\u9519\u5b57\u3001\u6709\u6ca1\u6709\u591a\u4f59\u7684\u7a7a\u683c\u3002<\/p>\n<p>\u4e0b\u4e00\u6b65\u662f\u8bbe\u7f6e\u7f51\u7ad9\u7684\u57fa\u672c\u4fe1\u606f&#xff1a;<\/p>\n<p>1.\u7ad9\u70b9\u6807\u9898&#xff1a;\u4f60\u7684\u7f51\u7ad9\u540d\u5b57&#xff08;\u4e4b\u540e\u53ef\u4ee5\u968f\u65f6\u4fee\u6539&#xff09;<\/p>\n<p>2.\u7528\u6237\u540d&#xff1a;\u7ba1\u7406\u5458\u8d26\u53f7&#xff08;\u4e0d\u8981\u7528\u00a0admin&#xff0c;\u56e0\u4e3a\u8fd9\u662f WordPress \u9ed8\u8ba4\u7684\u7ba1\u7406\u5458\u7528\u6237\u540d&#xff0c;\u5f88\u5bb9\u6613\u88ab\u66b4\u529b\u7834\u89e3\u653b\u51fb\u76ef\u4e0a&#xff09;<\/p>\n<p>3.\u5bc6\u7801&#xff1a;\u8bbe\u4e00\u4e2a\u590d\u6742\u70b9\u7684&#xff08;WordPress \u4f1a\u7ed9\u4f60\u4e00\u4e2a\u5f3a\u5bc6\u7801\u5efa\u8bae&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u7528&#xff09;<\/p>\n<p>4.\u60a8\u7684\u7535\u5b50\u90ae\u4ef6&#xff1a;\u586b\u4f60\u7684\u90ae\u7bb1<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"522\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d85317f40e.png\" width=\"1024\" \/><\/p>\n<p>\u586b\u5b8c\u4e4b\u540e\u70b9\u201c\u5b89\u88c5 WordPress\u201d&#xff0c;\u7b49\u51e0\u79d2\u949f&#xff0c;\u770b\u5230\u201c\u5b89\u88c5\u6210\u529f\u201d\u7684\u9875\u9762\u5c31\u5927\u529f\u544a\u6210\u4e86\u3002<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"522\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d8531a2359.png\" width=\"1024\" \/><\/p>\n<p>\u70b9\u201c\u767b\u5f55\u201d&#xff0c;\u7528\u521a\u624d\u8bbe\u7684\u7ba1\u7406\u5458\u8d26\u53f7\u548c\u5bc6\u7801\u767b\u5f55\u540e\u53f0\u3002\u540e\u53f0\u5730\u5740\u662f\u00a0https:\/\/\u4f60\u7684\u57df\u540d\/wp-admin<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"522\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d8531c33b1.png\" width=\"1024\" \/><\/p>\n<h3 id=\"toc_97\">\u7b2c\u5341\u4e03\u6b65&#xff1a;\u786e\u8ba4 HTTPS \u81ea\u52a8\u7eed\u671f<\/h3>\n<p>Let&#039;s Encrypt \u7684\u8bc1\u4e66\u53ea\u6709 90 \u5929\u6709\u6548\u671f&#xff0c;\u4f46 Certbot \u4f1a\u81ea\u52a8\u5e2e\u4f60\u7eed\u671f\u3002\u9a8c\u8bc1\u4e00\u4e0b\u81ea\u52a8\u7eed\u671f\u662f\u5426\u914d\u7f6e\u597d\u4e86&#xff1a;<\/p>\n<p>certbot renew &#8211;dry-run <\/p>\n<p>&#8211;dry-run\u00a0\u662f\u201c\u6a21\u62df\u8fd0\u884c\u201d\u7684\u610f\u601d&#xff0c;\u4e0d\u4f1a\u771f\u7684\u53bb\u7eed\u671f&#xff0c;\u53ea\u662f\u6d4b\u8bd5\u6574\u4e2a\u7eed\u671f\u6d41\u7a0b\u662f\u5426\u6b63\u5e38\u3002<\/p>\n<p>\u5982\u679c\u8f93\u51fa\u7c7b\u4f3c\u00a0The dry run was successful\u00a0\u7684\u4fe1\u606f&#xff0c;\u8bf4\u660e\u81ea\u52a8\u7eed\u671f\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"217\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053337-6a6d8531e4bcd.png\" width=\"644\" \/><\/p>\n<p>Certbot \u4f1a\u5728\u7cfb\u7edf\u4e2d\u521b\u5efa\u4e00\u4e2a\u5b9a\u65f6\u4efb\u52a1&#xff08;systemd timer&#xff09;&#xff0c;\u6bcf\u5929\u8fd0\u884c\u4e24\u6b21&#xff0c;\u68c0\u67e5\u6240\u6709\u5df2\u5b89\u88c5\u7684\u8bc1\u4e66&#xff0c;\u5982\u679c\u53d1\u73b0\u54ea\u4e2a\u8bc1\u4e66\u8ddd\u79bb\u8fc7\u671f\u4e0d\u8db3 30 \u5929&#xff0c;\u5c31\u81ea\u52a8\u7eed\u671f\u3002\u4f60\u4ec0\u4e48\u90fd\u4e0d\u7528\u505a\u3002<\/p>\n<h3 id=\"toc_102\">\u7b2c\u5341\u516b\u6b65&#xff1a;&#xff08;\u53ef\u9009&#xff09;\u5f00\u542f HSTS \u63d0\u5347\u5b89\u5168\u6027<\/h3>\n<p>HSTS&#xff08;HTTP Strict Transport Security&#xff09;\u662f\u4e00\u4e2a\u5b89\u5168\u673a\u5236&#xff0c;\u5b83\u544a\u8bc9\u6d4f\u89c8\u5668&#xff1a;\u5728\u63a5\u4e0b\u6765\u7684\u4e00\u5e74\u91cc&#xff0c;\u53ea\u80fd\u7528 HTTPS \u8bbf\u95ee\u6211\u7684\u7f51\u7ad9&#xff0c;\u7edd\u5bf9\u4e0d\u8981\u7528 HTTP\u3002\u8fd9\u6837\u5373\u4f7f\u6709\u4eba\u70b9\u51fb\u4e86 HTTP \u94fe\u63a5\u6216\u8f93\u5165\u4e86 HTTP \u5730\u5740&#xff0c;\u6d4f\u89c8\u5668\u4e5f\u4f1a\u81ea\u52a8\u628a\u5b83\u8f6c\u6362\u6210 HTTPS\u3002<\/p>\n<p>\u5728 Nginx \u914d\u7f6e\u6587\u4ef6\u7684 HTTPS server \u5757\u91cc\u52a0\u4e0a\u4e00\u884c&#xff1a;<\/p>\n<p>add_header Strict-Transport-Security &#034;max-age&#061;31536000; includeSubDomains&#034; always; <\/p>\n<p>max-age&#061;31536000\u00a0\u8868\u793a\u6709\u6548\u671f\u4e00\u5e74&#xff08;\u5355\u4f4d\u662f\u79d2&#xff0c;31536000 \u79d2 &#061; 365 \u5929&#xff09;&#xff0c;includeSubDomains\u00a0\u8868\u793a\u5bf9\u6240\u6709\u5b50\u57df\u540d\u4e5f\u751f\u6548\u3002<\/p>\n<p>\u52a0\u5b8c\u4fdd\u5b58\u540e\u68c0\u67e5\u5e76\u91cd\u8f7d\u914d\u7f6e&#xff1a;<\/p>\n<p>nginx -t<br \/>\nsystemctl reload nginx <\/p>\n<p>\u6ce8\u610f&#xff1a;\u542f\u7528 HSTS \u540e&#xff0c;\u5982\u679c\u4f60\u540e\u7eed\u60f3\u5173\u95ed HTTPS&#xff0c;\u4f1a\u975e\u5e38\u9ebb\u70e6\u3002\u56e0\u4e3a\u6d4f\u89c8\u5668\u5df2\u7ecf\u8bb0\u4f4f\u4e86\u201c\u53ea\u80fd\u7528 HTTPS\u201d\u7684\u6307\u4ee4&#xff0c;\u5373\u4f7f\u4f60\u5220\u9664\u4e86\u670d\u52a1\u5668\u4e0a\u7684 HTTPS \u914d\u7f6e&#xff0c;\u6d4f\u89c8\u5668\u8fd8\u662f\u4f1a\u56fa\u6267\u5730\u5c1d\u8bd5\u7528 HTTPS \u8bbf\u95ee\u3002\u6240\u4ee5\u5efa\u8bae\u5728\u7f51\u7ad9\u8fd0\u884c\u7a33\u5b9a\u540e\u518d\u5f00\u542f\u3002<\/p>\n<h3 id=\"toc_107\">\u5e38\u89c1\u7684\u5751\u548c\u89e3\u51b3\u529e\u6cd5<\/h3>\n<p>1. \u6253\u5f00\u6d4f\u89c8\u5668\u770b\u5230\u7684\u662f Nginx \u6b22\u8fce\u9875&#xff0c;\u4e0d\u662f WordPress \u5b89\u88c5\u754c\u9762<\/p>\n<p>\u8bf4\u660e Nginx \u7684\u914d\u7f6e\u6ca1\u6709\u751f\u6548&#xff0c;\u6216\u8005\u9ed8\u8ba4\u914d\u7f6e\u6ca1\u6709\u88ab\u66ff\u6362\u3002\u68c0\u67e5\u4e00\u4e0b&#xff1a;<\/p>\n<p>&lt;1&gt;\/etc\/nginx\/sites-enabled\/default\u00a0\u662f\u5426\u5df2\u7ecf\u88ab\u5220\u9664<\/p>\n<p>&lt;2&gt;\u4f60\u7684\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u5df2\u7ecf\u8f6f\u94fe\u63a5\u5230\u00a0sites-enabled<\/p>\n<p>&lt;3&gt;\u8fd0\u884c\u00a0nginx -t\u00a0\u68c0\u67e5\u914d\u7f6e\u662f\u5426\u6709\u8bed\u6cd5\u9519\u8bef<\/p>\n<p>&lt;4&gt;\u8fd0\u884c\u00a0systemctl reload nginx\u00a0\u91cd\u8f7d\u914d\u7f6e<\/p>\n<p>2. \u63d0\u793a\u201cError establishing a database connection\u201d<\/p>\n<p>\u591a\u534a\u662f\u00a0wp-config.php\u00a0\u91cc\u7684\u6570\u636e\u5e93\u540d\u3001\u7528\u6237\u540d\u6216\u5bc6\u7801\u586b\u9519\u4e86\u3002\u56de\u53bb\u68c0\u67e5\u4e00\u4e0b&#xff0c;\u5c24\u5176\u662f\u5bc6\u7801\u6709\u6ca1\u6709\u6253\u9519\u5b57\u3002\u4e5f\u6709\u53ef\u80fd\u662f MySQL \u670d\u52a1\u6ca1\u542f\u52a8&#xff0c;\u7528\u00a0systemctl status mysql\u00a0\u770b\u4e00\u4e0b\u3002<\/p>\n<p>3. \u5b89\u88c5\u4e3b\u9898\u6216\u63d2\u4ef6\u65f6\u63d0\u793a\u9700\u8981 FTP \u4fe1\u606f<\/p>\n<p>\u5728\u00a0wp-config.php\u00a0\u6587\u4ef6\u4e2d\u627e\u5230\u00a0\/* That&#039;s all, stop editing! Happy publishing. *\/\u00a0\u8fd9\u884c\u6ce8\u91ca&#xff0c;\u5728\u5b83\u4e4b\u524d\u52a0\u4e0a\u4e00\u884c&#xff1a;<\/p>\n<p>define(&#039;FS_METHOD&#039;, &#039;direct&#039;); <\/p>\n<p>\u8fd9\u6837 WordPress \u5c31\u4f1a\u76f4\u63a5\u7528\u6587\u4ef6\u7cfb\u7edf\u5199\u5165&#xff0c;\u4e0d\u9700\u8981 FTP\u3002<\/p>\n<p>4. \u4e0a\u4f20\u56fe\u7247\u6216\u4e3b\u9898\u65f6\u63d0\u793a\u201c\u6587\u4ef6\u5927\u5c0f\u8d85\u8fc7\u9650\u5236\u201d<\/p>\n<p>\u8fd9\u662f PHP \u4e0a\u4f20\u5927\u5c0f\u9650\u5236\u7684\u95ee\u9898\u3002\u6309\u7b2c\u5341\u4e94\u6b65\u8c03\u6574\u00a0upload_max_filesize\u3001post_max_size\u00a0\u548c\u00a0memory_limit\u00a0\u8fd9\u4e09\u4e2a\u53c2\u6570&#xff0c;\u7136\u540e\u91cd\u542f PHP-FPM\u3002<\/p>\n<p>5. \u4e0a\u4f20\u56fe\u7247\u5931\u8d25&#xff0c;\u63d0\u793a\u201c\u65e0\u6cd5\u521b\u5efa\u76ee\u5f55\u201d<\/p>\n<p>\u68c0\u67e5\u4e00\u4e0b\u00a0\/var\/www\/html\/wp-content\/uploads\u00a0\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728&#xff0c;\u5982\u679c\u4e0d\u5b58\u5728\u5c31\u624b\u52a8\u521b\u5efa&#xff1a;<\/p>\n<p>mkdir -p \/var\/www\/html\/wp-content\/uploads<br \/>\nchown www-data:www-data \/var\/www\/html\/wp-content\/uploads <\/p>\n<p>6. \u9875\u9762\u6253\u4e0d\u5f00&#xff0c;\u663e\u793a 502 Bad Gateway<\/p>\n<p>\u901a\u5e38\u662f PHP-FPM \u6ca1\u542f\u52a8\u6216\u8005 Nginx \u548c PHP-FPM \u4e4b\u95f4\u7684\u901a\u4fe1\u51fa\u4e86\u95ee\u9898\u3002\u68c0\u67e5 PHP-FPM \u7684\u72b6\u6001&#xff1a;<\/p>\n<p>systemctl status php8.3-fpm <\/p>\n<p>\u5982\u679c\u6ca1\u542f\u52a8&#xff0c;\u5c31\u542f\u52a8\u5b83&#xff1a;<\/p>\n<p>systemctl start php8.3-fpm <\/p>\n<p>\u5982\u679c PHP-FPM \u662f\u542f\u52a8\u7684\u4f46\u95ee\u9898\u4f9d\u7136\u5b58\u5728&#xff0c;\u68c0\u67e5 Nginx \u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u00a0fastcgi_pass\u00a0\u8def\u5f84\u662f\u5426\u6b63\u786e&#xff08;\u7248\u672c\u53f7\u662f\u5426\u5339\u914d&#xff09;\u3002<\/p>\n<p>7. \u6d4f\u89c8\u5668\u63d0\u793a\u201c\u60a8\u7684\u8fde\u63a5\u4e0d\u662f\u79c1\u5bc6\u8fde\u63a5\u201d\u6216\u8bc1\u4e66\u65e0\u6548<\/p>\n<p>\u53ef\u80fd\u7684\u539f\u56e0&#xff1a;<\/p>\n<p>&lt;1&gt;\u8bc1\u4e66\u8fd8\u6ca1\u6709\u751f\u6548&#xff08;\u521a\u7533\u8bf7\u5b8c\u9700\u8981\u7b49\u51e0\u79d2&#xff09;<\/p>\n<p>&lt;2&gt;\u4f60\u8bbf\u95ee\u7684\u662f\u00a0http:\/\/\u00a0\u800c\u4e0d\u662f\u00a0https:\/\/&#xff08;\u67d0\u4e9b\u6d4f\u89c8\u5668\u4f1a\u628a HTTP \u8bbf\u95ee\u663e\u793a\u4e3a\u201c\u4e0d\u5b89\u5168\u201d\u800c\u4e0d\u662f\u201c\u79c1\u5bc6\u8fde\u63a5\u201d&#xff09;<\/p>\n<p>&lt;3&gt;\u57df\u540d\u89e3\u6790\u8fd8\u6ca1\u751f\u6548&#xff0c;Certbot \u9a8c\u8bc1\u57df\u540d\u6240\u6709\u6743\u65f6\u5931\u8d25\u4e86<\/p>\n<p>&lt;4&gt;\u4f60\u662f\u7528 IP \u5730\u5740\u8bbf\u95ee\u7684&#xff0c;\u800c SSL \u8bc1\u4e66\u662f\u7ed1\u5b9a\u5728\u57df\u540d\u4e0a\u7684&#xff0c;\u7528 IP \u8bbf\u95ee\u5fc5\u7136\u8bc1\u4e66\u62a5\u9519<\/p>\n<p>\u53ef\u4ee5\u7528\u00a0certbot certificates\u00a0\u547d\u4ee4\u67e5\u770b\u8bc1\u4e66\u72b6\u6001&#xff0c;\u786e\u8ba4\u8bc1\u4e66\u662f\u5426\u5df2\u6210\u529f\u7b7e\u53d1\u3002<\/p>\n<p>8. \u57df\u540d\u89e3\u6790\u4e00\u76f4\u4e0d\u751f\u6548<\/p>\n<p>DNS \u89e3\u6790\u7684\u751f\u6548\u65f6\u95f4\u53d6\u51b3\u4e8e\u4e24\u4e2a\u56e0\u7d20&#xff1a;\u4e00\u662f\u4f60\u57df\u540d\u6ce8\u518c\u5546\u90a3\u8fb9\u7684 TTL&#xff08;Time To Live&#xff09;\u8bbe\u7f6e&#xff0c;\u4e8c\u662f\u5404\u5730 DNS \u670d\u52a1\u5668\u7684\u7f13\u5b58\u5237\u65b0\u901f\u5ea6\u3002\u5982\u679c\u4f60\u6025\u7740\u6d4b\u8bd5&#xff0c;\u53ef\u4ee5\u5148\u628a TTL \u8bbe\u77ed\u4e00\u4e9b&#xff08;\u6bd4\u5982 300 \u79d2&#xff0c;\u5373 5 \u5206\u949f&#xff09;&#xff0c;\u7b49\u6b63\u5f0f\u4e0a\u7ebf\u518d\u6539\u56de\u9ed8\u8ba4\u503c&#xff08;\u901a\u5e38\u662f 600 \u79d2\u6216 3600 \u79d2&#xff09;\u3002<\/p>\n<p>9. \u6253\u5f00\u7f51\u7ad9\u663e\u793a\u7a7a\u767d\u9875&#xff08;\u767d\u5c4f&#xff09;<\/p>\n<p>\u53ef\u80fd\u662f PHP \u5185\u5b58\u4e0d\u8db3\u6216\u67d0\u4e2a\u63d2\u4ef6\/\u4e3b\u9898\u62a5\u9519\u3002\u53ef\u4ee5\u5148\u68c0\u67e5 PHP \u9519\u8bef\u65e5\u5fd7&#xff1a;<\/p>\n<p>tail -f \/var\/log\/php8.3-fpm.log <\/p>\n<p>\u7248\u672c\u53f7\u6362\u6210\u4f60\u5b9e\u9645\u7684\u7248\u672c\u3002tail -f\u00a0\u4f1a\u5b9e\u65f6\u663e\u793a\u65e5\u5fd7\u7684\u6700\u540e\u51e0\u884c\u5e76\u6301\u7eed\u66f4\u65b0\u3002<\/p>\n<p>\u5982\u679c\u9519\u8bef\u65e5\u5fd7\u91cc\u6ca1\u6709\u4fe1\u606f&#xff0c;\u53ef\u4ee5\u4e34\u65f6\u5728\u00a0wp-config.php\u00a0\u4e2d\u5f00\u542f\u8c03\u8bd5\u6a21\u5f0f&#xff1a;<\/p>\n<p>define(&#039;WP_DEBUG&#039;, true);<br \/>\ndefine(&#039;WP_DEBUG_LOG&#039;, true);<br \/>\ndefine(&#039;WP_DEBUG_DISPLAY&#039;, false); <\/p>\n<p>\u7136\u540e\u8bbf\u95ee\u7f51\u7ad9&#xff0c;\u9519\u8bef\u4fe1\u606f\u4f1a\u88ab\u8bb0\u5f55\u5230\u00a0\/var\/www\/html\/wp-content\/debug.log\u00a0\u6587\u4ef6\u4e2d&#xff0c;\u67e5\u770b\u8fd9\u4e2a\u6587\u4ef6\u5c31\u80fd\u5b9a\u4f4d\u95ee\u9898\u3002<\/p>\n<h3 id=\"toc_112\">\u63a5\u4e0b\u6765\u53ef\u4ee5\u505a\u4ec0\u4e48<\/h3>\n<p>\u7f51\u7ad9\u8dd1\u8d77\u6765\u4e4b\u540e&#xff0c;\u4f60\u53ef\u4ee5&#xff1a;<\/p>\n<p>1.\u6362\u4e2a\u597d\u770b\u7684\u4e3b\u9898&#xff1a;\u540e\u53f0\u201c\u5916\u89c2 \u2192 \u4e3b\u9898\u201d\u91cc\u6709\u5f88\u591a\u514d\u8d39\u7684&#xff0c;\u6311\u4e00\u4e2a\u987a\u773c\u7684<\/p>\n<p>2.\u88c5\u51e0\u4e2a\u5b9e\u7528\u7684\u63d2\u4ef6&#xff1a;\u6bd4\u5982 Yoast SEO&#xff08;\u641c\u7d22\u5f15\u64ce\u4f18\u5316&#xff09;\u3001Akismet&#xff08;\u9632\u5783\u573e\u8bc4\u8bba&#xff09;\u3001UpdraftPlus&#xff08;\u81ea\u52a8\u5907\u4efd&#xff09;<\/p>\n<p>3.\u5199\u7b2c\u4e00\u7bc7\u6587\u7ae0&#xff1a;\u70b9\u51fb\u540e\u53f0\u5de6\u4fa7\u7684\u201c\u6587\u7ae0 \u2192 \u5199\u6587\u7ae0\u201d&#xff0c;\u5f00\u59cb\u4f60\u7684\u521b\u4f5c<\/p>\n<p>4.\u5b9a\u671f\u5907\u4efd&#xff1a;\u5efa\u8bae\u6bcf\u5468\u5907\u4efd\u4e00\u6b21\u6570\u636e\u5e93\u548c\u7f51\u7ad9\u6587\u4ef6&#xff0c;\u53ef\u4ee5\u7528\u00a0mysqldump\u00a0\u5bfc\u51fa\u6570\u636e\u5e93&#xff0c;\u7528\u00a0tar\u00a0\u6253\u5305\u7f51\u7ad9\u76ee\u5f55<\/p>\n<p>\u90e8\u7f72 WordPress \u7684\u6838\u5fc3\u5c31\u662f\u88c5\u597d\u00a0Nginx &#043; MySQL &#043; PHP\u00a0\u8fd9\u4e09\u4e2a\u4e1c\u897f&#xff0c;\u518d\u628a\u57df\u540d\u89e3\u6790\u505a\u597d&#xff0c;\u7528 Certbot \u4e00\u952e\u641e\u5b9a HTTPS\u3002\u770b\u7740\u633a\u591a&#xff0c;\u5b9e\u9645\u90e8\u7f72\u8d77\u6765\u633a\u7b80\u5355\u3002<\/p>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u6559\u7a0b\u5bf9\u4f60\u6709\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u6765\u81ea\u6211\u7684\u4e2a\u4eba\u535a\u5ba2&#xff1a;\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf&#xff1a;\u5168\u7a0b\u6572\u547d\u4ee4&#xff0c;\u4e0d\u7528\u4efb\u4f55\u9762\u677f &#8211; \u53f9\u60cb\u535a\u5ba2 \u5168\u7a0b\u547d\u4ee4\u884c\u64cd\u4f5c&#xff0c;\u4e0d\u9760\u4efb\u4f55\u9762\u677f&#xff0c;\u4f7f\u6027\u80fd\u5229\u7528\u6700\u5927\u5316 \u5199\u5728\u524d\u9762<br \/>\n\u524d\u4e24\u5929\u5199\u4e86\u4e00\u4e2a\u642d\u5efatypecho\u7684\u6587\u7ae0&#xff0c;\u6709\u670b\u53cb\u770b\u4e86\u95ee\u6211\u4f60\u81ea\u5df1\u535a\u5ba2\u90fd\u662f\u7528wordpress\u7684&#xff0c;\u548b\u5148\u5199\u4e86\u4e2a\u642d\u5efatypecho\u7684\u6559\u7a0b&#xff0c;\u54c8\u54c8\u54c8\u54c8\u54c8\u54c8&#xff0c;\u90a3\u6211\u73b0\u5728\u6765\u5199\u4e00\u4e0b\u642d\u5efawordpress\u6559\u7a0b\u3002 <\/p>\n","protected":false},"author":2,"featured_media":88589,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9137,117,43,44],"topic":[],"class_list":["post-88601","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-atomgit","tag-nginx","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/88601.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u6765\u81ea\u6211\u7684\u4e2a\u4eba\u535a\u5ba2&#xff1a;\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf&#xff1a;\u5168\u7a0b\u6572\u547d\u4ee4&#xff0c;\u4e0d\u7528\u4efb\u4f55\u9762\u677f - \u53f9\u60cb\u535a\u5ba2 \u5168\u7a0b\u547d\u4ee4\u884c\u64cd\u4f5c&#xff0c;\u4e0d\u9760\u4efb\u4f55\u9762\u677f&#xff0c;\u4f7f\u6027\u80fd\u5229\u7528\u6700\u5927\u5316 \u5199\u5728\u524d\u9762 \u524d\u4e24\u5929\u5199\u4e86\u4e00\u4e2a\u642d\u5efatypecho\u7684\u6587\u7ae0&#xff0c;\u6709\u670b\u53cb\u770b\u4e86\u95ee\u6211\u4f60\u81ea\u5df1\u535a\u5ba2\u90fd\u662f\u7528wordpress\u7684&#xff0c;\u548b\u5148\u5199\u4e86\u4e2a\u642d\u5efatypecho\u7684\u6559\u7a0b&#xff0c;\u54c8\u54c8\u54c8\u54c8\u54c8\u54c8&#xff0c;\u90a3\u6211\u73b0\u5728\u6765\u5199\u4e00\u4e0b\u642d\u5efawordpress\u6559\u7a0b\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/88601.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-01T05:33:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053336-6a6d8530bd869.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/88601.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/88601.html\",\"name\":\"\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-01T05:33:38+00:00\",\"dateModified\":\"2026-08-01T05:33:38+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/88601.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/88601.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/88601.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/88601.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u672c\u6587\u6765\u81ea\u6211\u7684\u4e2a\u4eba\u535a\u5ba2&#xff1a;\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf&#xff1a;\u5168\u7a0b\u6572\u547d\u4ee4&#xff0c;\u4e0d\u7528\u4efb\u4f55\u9762\u677f - \u53f9\u60cb\u535a\u5ba2 \u5168\u7a0b\u547d\u4ee4\u884c\u64cd\u4f5c&#xff0c;\u4e0d\u9760\u4efb\u4f55\u9762\u677f&#xff0c;\u4f7f\u6027\u80fd\u5229\u7528\u6700\u5927\u5316 \u5199\u5728\u524d\u9762 \u524d\u4e24\u5929\u5199\u4e86\u4e00\u4e2a\u642d\u5efatypecho\u7684\u6587\u7ae0&#xff0c;\u6709\u670b\u53cb\u770b\u4e86\u95ee\u6211\u4f60\u81ea\u5df1\u535a\u5ba2\u90fd\u662f\u7528wordpress\u7684&#xff0c;\u548b\u5148\u5199\u4e86\u4e2a\u642d\u5efatypecho\u7684\u6559\u7a0b&#xff0c;\u54c8\u54c8\u54c8\u54c8\u54c8\u54c8&#xff0c;\u90a3\u6211\u73b0\u5728\u6765\u5199\u4e00\u4e0b\u642d\u5efawordpress\u6559\u7a0b\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/88601.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-01T05:33:38+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801053336-6a6d8530bd869.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"12 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/88601.html","url":"https:\/\/www.wsisp.com\/helps\/88601.html","name":"\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-01T05:33:38+00:00","dateModified":"2026-08-01T05:33:38+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/88601.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/88601.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/88601.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4ece\u4e00\u53f0\u7a7a\u670d\u52a1\u5668\u5230 WordPress \u4e0a\u7ebf\uff1a\u5168\u7a0b\u6572\u547d\u4ee4\uff0c\u4e0d\u7528\u4efb\u4f55\u9762\u677f"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/88601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=88601"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/88601\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/88589"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=88601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=88601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=88601"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=88601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}