{"id":55791,"date":"2024-10-10T06:11:17","date_gmt":"2024-10-09T22:11:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/55791\/"},"modified":"2024-10-10T06:11:17","modified_gmt":"2024-10-09T22:11:17","slug":"wordpress-%e6%95%99%e7%a8%8b%ef%bc%9a%e5%af%b6%e5%a1%94%e9%9d%a2%e6%9d%bf%e6%95%99%e7%a8%8b%e4%b9%8b%e4%b8%8d%e5%90%8c%e7%92%b0%e5%a2%83%e5%ae%89%e8%a3%9d%e7%af%87","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/55791\/","title":{"rendered":"WordPress \u6559\u7a0b\uff1a\u5bf6\u5854\u9762\u677f\u6559\u7a0b\u4e4b\u4e0d\u540c\u74b0\u5883\u5b89\u88dd\u7bc7"},"content":{"rendered":"<h1 id=\"wordpress-%e6%95%99%e7%a8%8b%ef%bc%9a%e5%af%b6%e5%a1%94%e9%9d%a2%e6%9d%bf%e6%95%99%e7%a8%8b%e4%b9%8b%e4%b8%8d%e5%90%8c%e7%92%b0%e5%a2%83%e5%ae%89%e8%a3%9d%e7%af%87-PZtrfCBHnM\">WordPress \u6559\u7a0b\uff1a\u5bf6\u5854\u9762\u677f\u6559\u7a0b\u4e4b\u4e0d\u540c\u74b0\u5883\u5b89\u88dd\u7bc7<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0cWordPress \u4f5c\u70ba\u4e00\u500b\u6d41\u884c\u7684\u5167\u5bb9\u7ba1\u7406\u7cfb\u7d71\uff0c\u53d7\u5230\u5ee3\u6cdb\u7684\u4f7f\u7528\u3002\u7121\u8ad6\u662f\u500b\u4eba\u535a\u5ba2\u9084\u662f\u4f01\u696d\u7db2\u7ad9\uff0cWordPress \u90fd\u80fd\u63d0\u4f9b\u9748\u6d3b\u7684\u89e3\u6c7a\u65b9\u6848\u3002\u800c\u5bf6\u5854\u9762\u677f\u4f5c\u70ba\u4e00\u500b\u7c21\u55ae\u6613\u7528\u7684\u4f3a\u670d\u5668\u7ba1\u7406\u5de5\u5177\uff0c\u80fd\u5920\u5e6b\u52a9\u7528\u6236\u8f15\u9b06\u5730\u5b89\u88dd\u548c\u7ba1\u7406 WordPress\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728\u4e0d\u540c\u74b0\u5883\u4e2d\u5b89\u88dd WordPress\uff0c\u4e26\u63d0\u4f9b\u8a73\u7d30\u7684\u6b65\u9a5f\u548c\u793a\u4f8b\u3002<\/p>\n<h2 id=\"%e7%92%b0%e5%a2%83%e6%ba%96%e5%82%99-PZtrfCBHnM\">\u74b0\u5883\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u5b89\u88dd\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u78ba\u4fdd\u4f3a\u670d\u5668\u74b0\u5883\u7684\u6e96\u5099\u3002\u4ee5\u4e0b\u662f\u5b89\u88dd WordPress \u6240\u9700\u7684\u57fa\u672c\u74b0\u5883\uff1a<\/p>\n<ul>\n<li>\u64cd\u4f5c\u7cfb\u7d71\uff1a\u5efa\u8b70\u4f7f\u7528 Linux \u7cfb\u7d71\uff0c\u5982 Ubuntu \u6216 CentOS\u3002<\/li>\n<li>Web \u4f3a\u670d\u5668\uff1aApache \u6216 Nginx\u3002<\/li>\n<li>\u6578\u64da\u5eab\uff1aMySQL \u6216 MariaDB\u3002<\/li>\n<li>PHP\uff1a\u5efa\u8b70\u4f7f\u7528 PHP 7.4 \u6216\u66f4\u9ad8\u7248\u672c\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%ae%89%e8%a3%9d%e5%af%b6%e5%a1%94%e9%9d%a2%e6%9d%bf-PZtrfCBHnM\">\u5b89\u88dd\u5bf6\u5854\u9762\u677f<\/h2>\n<p>\u5728\u4f3a\u670d\u5668\u4e0a\u5b89\u88dd\u5bf6\u5854\u9762\u677f\u662f\u5b89\u88dd WordPress \u7684\u7b2c\u4e00\u6b65\u3002\u4ee5\u4e0b\u662f\u5b89\u88dd\u5bf6\u5854\u9762\u677f\u7684\u6b65\u9a5f\uff1a<\/p>\n<pre><code>curl -sSO http:\/\/download.bt.cn\/install\/install.sh\nbash install.sh<\/code><\/pre>\n<p>\u57f7\u884c\u4e0a\u8ff0\u547d\u4ee4\u5f8c\uff0c\u7cfb\u7d71\u6703\u81ea\u52d5\u4e0b\u8f09\u4e26\u5b89\u88dd\u5bf6\u5854\u9762\u677f\u3002\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u7cfb\u7d71\u6703\u986f\u793a\u7ba1\u7406\u9762\u677f\u7684\u767b\u9304\u5730\u5740\u3001\u7528\u6236\u540d\u548c\u5bc6\u78bc\uff0c\u8acb\u59a5\u5584\u4fdd\u5b58\u9019\u4e9b\u4fe1\u606f\u3002<\/p>\n<h2 id=\"%e5%9c%a8%e5%af%b6%e5%a1%94%e9%9d%a2%e6%9d%bf%e4%b8%ad%e5%ae%89%e8%a3%9d-wordpress-PZtrfCBHnM\">\u5728\u5bf6\u5854\u9762\u677f\u4e2d\u5b89\u88dd WordPress<\/h2>\n<h3 id=\"%e6%ad%a5%e9%a9%9f%e4%b8%80%ef%bc%9a%e5%89%b5%e5%bb%ba%e6%95%b8%e6%93%9a%e5%ba%ab-PZtrfCBHnM\">\u6b65\u9a5f\u4e00\uff1a\u5275\u5efa\u6578\u64da\u5eab<\/h3>\n<p>\u5728\u5b89\u88dd WordPress \u4e4b\u524d\uff0c\u9700\u8981\u5148\u5275\u5efa\u4e00\u500b\u6578\u64da\u5eab\u3002\u9032\u5165\u5bf6\u5854\u9762\u677f\u5f8c\uff0c\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u9ede\u64ca\u5de6\u5074\u83dc\u55ae\u4e2d\u7684\u300c\u6578\u64da\u5eab\u300d\u9078\u9805\u3002<\/li>\n<li>\u9ede\u64ca\u300c\u6dfb\u52a0\u6578\u64da\u5eab\u300d\uff0c\u586b\u5beb\u6578\u64da\u5eab\u540d\u7a31\u3001\u7528\u6236\u540d\u548c\u5bc6\u78bc\u3002<\/li>\n<li>\u9ede\u64ca\u300c\u63d0\u4ea4\u300d\uff0c\u5b8c\u6210\u6578\u64da\u5eab\u7684\u5275\u5efa\u3002<\/li>\n<\/ol>\n<h3 id=\"%e6%ad%a5%e9%a9%9f%e4%ba%8c%ef%bc%9a%e4%b8%8b%e8%bc%89-wordpress-PZtrfCBHnM\">\u6b65\u9a5f\u4e8c\uff1a\u4e0b\u8f09 WordPress<\/h3>\n<p>\u63a5\u4e0b\u4f86\uff0c\u9700\u8981\u4e0b\u8f09 WordPress \u7684\u6700\u65b0\u7248\u672c\u3002\u53ef\u4ee5\u901a\u904e SSH \u9023\u63a5\u5230\u4f3a\u670d\u5668\uff0c\u7136\u5f8c\u57f7\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>wget https:\/\/wordpress.org\/latest.tar.gz\ntar -zxvf latest.tar.gz\nmv wordpress \/www\/wwwroot\/yourdomain.com<\/code><\/pre>\n<p>\u8acb\u5c07\u300cyourdomain.com\u300d\u66ff\u63db\u70ba\u60a8\u7684\u5be6\u969b\u57df\u540d\u3002<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f%e4%b8%89%ef%bc%9a%e9%85%8d%e7%bd%ae-wordpress-PZtrfCBHnM\">\u6b65\u9a5f\u4e09\uff1a\u914d\u7f6e WordPress<\/h3>\n<p>\u5728\u5c07 WordPress \u6587\u4ef6\u79fb\u52d5\u5230\u7db2\u7ad9\u6839\u76ee\u9304\u5f8c\uff0c\u63a5\u4e0b\u4f86\u9700\u8981\u914d\u7f6e WordPress\u3002\u8acb\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u5728\u700f\u89bd\u5668\u4e2d\u8a2a\u554f\u60a8\u7684\u57df\u540d\uff0c\u5c07\u6703\u770b\u5230 WordPress \u7684\u5b89\u88dd\u754c\u9762\u3002<\/li>\n<li>\u9078\u64c7\u8a9e\u8a00\uff0c\u7136\u5f8c\u9ede\u64ca\u300c\u7e7c\u7e8c\u300d\u3002<\/li>\n<li>\u8f38\u5165\u525b\u624d\u5275\u5efa\u7684\u6578\u64da\u5eab\u540d\u7a31\u3001\u7528\u6236\u540d\u548c\u5bc6\u78bc\uff0c\u7136\u5f8c\u9ede\u64ca\u300c\u63d0\u4ea4\u300d\u3002<\/li>\n<li>\u6839\u64da\u63d0\u793a\u5b8c\u6210\u5b89\u88dd\uff0c\u8a2d\u7f6e\u7db2\u7ad9\u6a19\u984c\u3001\u7528\u6236\u540d\u548c\u5bc6\u78bc\u3002<\/li>\n<\/ol>\n<h2 id=\"%e5%9c%a8%e4%b8%8d%e5%90%8c%e7%92%b0%e5%a2%83%e4%b8%ad%e7%9a%84%e5%ae%89%e8%a3%9d%e8%80%83%e9%87%8f-PZtrfCBHnM\">\u5728\u4e0d\u540c\u74b0\u5883\u4e2d\u7684\u5b89\u88dd\u8003\u91cf<\/h2>\n<p>\u5728\u4e0d\u540c\u7684\u4f3a\u670d\u5668\u74b0\u5883\u4e2d\uff0c\u5b89\u88dd WordPress \u53ef\u80fd\u6703\u9047\u5230\u4e00\u4e9b\u7279\u5b9a\u7684\u6311\u6230\u3002\u4f8b\u5982\uff0c\u5728\u4f7f\u7528 Nginx \u4f5c\u70ba Web \u4f3a\u670d\u5668\u6642\uff0c\u9700\u8981\u984d\u5916\u914d\u7f6e Nginx \u7684\u865b\u64ec\u4e3b\u6a5f\u8a2d\u7f6e\uff0c\u4ee5\u78ba\u4fdd WordPress \u6b63\u5e38\u904b\u884c\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u57fa\u672c\u7684 Nginx \u914d\u7f6e\u793a\u4f8b\uff1a<\/p>\n<pre><code>server {\n    listen 80;\n    server_name yourdomain.com;\n    root \/www\/wwwroot\/yourdomain.com;\n\n    index index.php index.html index.htm;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$args;\n    }\n\n    location ~ .php$ {\n        include fastcgi_params;\n        fastcgi_pass 127.0.0.1:9000;\n        fastcgi_index index.php;\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n    }\n}<\/code><\/pre>\n<p>\u78ba\u4fdd\u5c07\u300cyourdomain.com\u300d\u66ff\u63db\u70ba\u60a8\u7684\u5be6\u969b\u57df\u540d\uff0c\u4e26\u6839\u64da\u9700\u8981\u8abf\u6574\u5176\u4ed6\u53c3\u6578\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-PZtrfCBHnM\">\u7e3d\u7d50<\/h2>\n<p>\u5b89\u88dd WordPress \u5728\u5bf6\u5854\u9762\u677f\u4e0a\u662f\u4e00\u500b\u76f8\u5c0d\u7c21\u55ae\u7684\u904e\u7a0b\uff0c\u53ea\u9700\u9075\u5faa\u4e0a\u8ff0\u6b65\u9a5f\u5373\u53ef\u5b8c\u6210\u3002\u7121\u8ad6\u60a8\u662f\u5728\u672c\u5730\u74b0\u5883\u9084\u662f\u96f2\u4f3a\u670d\u5668\u4e0a\u9032\u884c\u5b89\u88dd\uff0c\u4e86\u89e3\u4e0d\u540c\u74b0\u5883\u7684\u914d\u7f6e\u8981\u6c42\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u9ad8\u6548\u7684\u4f3a\u670d\u5668\u89e3\u6c7a\u65b9\u6848\uff0c\u53ef\u4ee5\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u6216 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a>\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u652f\u6301\u60a8\u7684\u7db2\u7ad9\u904b\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22WordPress\u6559\u7a0b\uff0c\u5b78\u7fd2\u5982\u4f55\u5728\u5bf6\u5854\u9762\u677f\u4e2d\u5b89\u88dd\u4e0d\u540c\u74b0\u5883\uff0c\u8f15\u9b06\u642d\u5efa\u60a8\u7684\u7db2\u7ad9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-55791","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/55791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=55791"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/55791\/revisions"}],"predecessor-version":[{"id":55792,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/55791\/revisions\/55792"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=55791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=55791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=55791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}