{"id":207,"date":"2024-08-27T23:01:43","date_gmt":"2024-08-27T15:01:43","guid":{"rendered":"http:\/\/www.woniuseo.com\/wordpress\/?p=207"},"modified":"2024-08-27T23:01:57","modified_gmt":"2024-08-27T15:01:57","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8%e9%98%bf%e9%87%8c%e4%ba%91%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e5%ae%89%e8%a3%85wordpress","status":"publish","type":"post","link":"http:\/\/www.woniuseo.com\/wordpress\/changshi\/207.html","title":{"rendered":"\u5982\u4f55\u5728\u963f\u91cc\u4e91\u670d\u52a1\u5668\u4e0a\u5b89\u88c5WordPress"},"content":{"rendered":"

\u5728\u6570\u5b57\u5316\u65f6\u4ee3\uff0c\u642d\u5efa\u4e2a\u4eba\u535a\u5ba2\u6216\u4f01\u4e1a\u7f51\u7ad9\u5df2\u6210\u4e3a\u5c55\u73b0\u81ea\u6211\u3001\u63a8\u5e7f\u54c1\u724c\u7684\u91cd\u8981\u65b9\u5f0f\u4e4b\u4e00\u3002\u800cWordPress\uff0c\u51ed\u501f\u5176\u5f3a\u5927\u7684\u529f\u80fd\u3001\u4e30\u5bcc\u7684\u63d2\u4ef6\u5e93\u4ee5\u53ca\u53cb\u597d\u7684\u7528\u6237\u754c\u9762\uff0c\u6210\u4e3a\u4e86\u4f17\u591a\u7f51\u7ad9\u5f00\u53d1\u8005\u7684\u9996\u9009\u5e73\u53f0\u3002\u963f\u91cc\u4e91\u670d\u52a1\u5668\uff0c\u4f5c\u4e3a\u56fd\u5185\u9886\u5148\u7684\u4e91\u8ba1\u7b97\u670d\u52a1\u63d0\u4f9b\u5546\uff0c\u5176\u7a33\u5b9a\u3001\u5b89\u5168\u3001\u7075\u6d3b\u7684\u7279\u6027\uff0c\u4e3aWordPress\u7684\u90e8\u7f72\u63d0\u4f9b\u4e86\u7406\u60f3\u7684\u73af\u5883\u3002\u4e0b\u9762\uff0c\u6211\u4eec\u5c06\u7b80\u8981\u4ecb\u7ecd\u5982\u4f55\u5728\u963f\u91cc\u4e91\u670d\u52a1\u5668\u4e0a\u5b89\u88c5WordPress\u3002<\/p>\n

\u51c6\u5907\u9636\u6bb5<\/p>\n

\u9996\u5148\uff0c\u4f60\u9700\u8981\u62e5\u6709\u4e00\u4e2a\u963f\u91cc\u4e91\u8d26\u53f7\uff0c\u5e76\u8d2d\u4e70\u4e00\u53f0\u4e91\u670d\u52a1\u5668ECS\uff08Elastic Compute Service\uff09\u3002\u5728\u9009\u62e9\u670d\u52a1\u5668\u914d\u7f6e\u65f6\uff0c\u8003\u8651\u5230WordPress\u7684\u8fd0\u884c\u9700\u6c42\uff0c\u5efa\u8bae\u81f3\u5c11\u9009\u62e92\u6838CPU\u30014GB\u5185\u5b58\u7684\u5b9e\u4f8b\u89c4\u683c\uff0c\u5e76\u9009\u62e9\u5408\u9002\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5982CentOS 7\u6216Ubuntu Server\u7b49\uff0c\u5b83\u4eec\u90fd\u6709\u826f\u597d\u7684\u793e\u533a\u652f\u6301\u548c\u4e30\u5bcc\u7684\u6587\u6863\u8d44\u6e90\u3002<\/p>\n

\u63a5\u4e0b\u6765\uff0c\u914d\u7f6e\u670d\u52a1\u5668\u5b89\u5168\u7ec4\u89c4\u5219\uff0c\u786e\u4fddHTTP\uff0880\u7aef\u53e3\uff09\u548cHTTPS\uff08443\u7aef\u53e3\uff09\u7684\u8bbf\u95ee\u6743\u9650\u88ab\u6253\u5f00\uff0c\u4ee5\u4fbf\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u4f60\u7684WordPress\u7f51\u7ad9\u3002<\/p>\n

\u5b89\u88c5\u73af\u5883\u914d\u7f6e<\/p>\n

\u5b89\u88c5Web\u670d\u52a1\u5668<\/p>\n

\u4ee5CentOS 7\u4e3a\u4f8b\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Yum\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5Apache\u4f5c\u4e3aWeb\u670d\u52a1\u5668\u3002\u5728\u7ec8\u7aef\u4e2d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`bash
\nsudo yum update -y
\nsudo yum install httpd -y
\nsudo systemctl start httpd
\nsudo systemctl enable httpd
\n“`<\/p>\n

\u5b89\u88c5\u6570\u636e\u5e93<\/p>\n

WordPress\u4f9d\u8d56\u4e8eMySQL\u6216MariaDB\u6570\u636e\u5e93\u3002\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5MariaDB\u5e76\u8bbe\u7f6e\u5176\u5f00\u673a\u81ea\u542f\uff1a<\/p>\n

“`bash
\nsudo yum install mariadb-server mariadb -y
\nsudo systemctl start mariadb
\nsudo systemctl enable mariadb
\n“`<\/p>\n

\u4e4b\u540e\uff0c\u8fd0\u884c`mysql_secure_installation`\u811a\u672c\u6765\u8bbe\u7f6eroot\u5bc6\u7801\u3001\u5220\u9664\u533f\u540d\u7528\u6237\u3001\u7981\u6b62root\u8fdc\u7a0b\u767b\u5f55\u7b49\u5b89\u5168\u52a0\u56fa\u63aa\u65bd\u3002<\/p>\n

\u5b89\u88c5PHP\u53ca\u5fc5\u8981\u6269\u5c55<\/p>\n

WordPress\u662f\u7528PHP\u7f16\u5199\u7684\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5PHP\u53ca\u4e00\u4e9b\u5fc5\u8981\u7684\u6269\u5c55\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`bash
\nsudo yum install php php-mysqlnd php-opcache php-xml php-xmlrpc php-soap php-gd php-curl php-intl php-mbstring -y
\nsudo systemctl restart httpd
\n“`<\/p>\n

\u90e8\u7f72WordPress<\/p>\n

\u4e0b\u8f7dWordPress<\/p>\n

\u524d\u5f80WordPress\u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684WordPress\uff0c\u5e76\u89e3\u538b\u5230Apache\u7684Web\u6839\u76ee\u5f55\uff08\u901a\u5e38\u4e3a`\/var\/www\/html`\uff09\u4e2d\u3002<\/p>\n

“`bash
\ncd \/var\/www\/html
\nsudo wget https:\/\/wordpress.org\/latest.tar.gz
\nsudo tar -xzvf latest.tar.gz
\nsudo mv wordpress\/* .
\nsudo rm -rf wordpress latest.tar.gz
\n“`<\/p>\n

\u914d\u7f6e\u6570\u636e\u5e93<\/p>\n

\u767b\u5f55MariaDB\u6570\u636e\u5e93\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6570\u636e\u5e93\u548c\u7528\u6237\uff0c\u5e76\u4e3a\u8be5\u7528\u6237\u6388\u6743\u8bbf\u95ee\u65b0\u6570\u636e\u5e93\u3002<\/p>\n

“`bash
\nsudo mysql -u root -p
\n\u5728MySQL\u547d\u4ee4\u884c\u4e2d\u6267\u884c\uff1a
\nCREATE DATABASE wordpressdb;
\nCREATE USER ‘wordpressuser’@’localhost’ IDENTIFIED BY ‘yourpassword’;
\nGRANT ALL PRIVILEGES ON wordpressdb.* TO ‘wordpressuser’@’localhost’;
\nFLUSH PRIVILEGES;
\nEXIT;
\n“`<\/p>\n

\u914d\u7f6eWordPress<\/p>\n

\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u4f60\u7684\u670d\u52a1\u5668IP\u5730\u5740\u6216\u57df\u540d\uff0c\u4f60\u5c06\u770b\u5230WordPress\u7684\u5b89\u88c5\u5411\u5bfc\u3002\u6309\u7167\u63d0\u793a\uff0c\u586b\u5199\u6570\u636e\u5e93\u540d\u79f0\uff08\u5982`wordpressdb`\uff09\u3001\u6570\u636e\u5e93\u7528\u6237\u540d\uff08\u5982`wordpressuser`\uff09\u3001\u6570\u636e\u5e93\u5bc6\u7801\uff08\u4f60\u5728\u4e0a\u4e00\u6b65\u8bbe\u7f6e\u7684\u5bc6\u7801\uff09\u7b49\u4fe1\u606f\uff0c\u5e76\u5b8c\u6210\u5b89\u88c5\u3002<\/p>\n

\u540e\u7eed\u6b65\u9aa4<\/p>\n

\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u5c06\u8fdb\u5165WordPress\u540e\u53f0\u7ba1\u7406\u754c\u9762\u3002\u5728\u8fd9\u91cc\uff0c\u4f60\u53ef\u4ee5\u8fdb\u884c\u4e3b\u9898\u9009\u62e9\u3001\u63d2\u4ef6\u5b89\u88c5\u3001\u9875\u9762\u7f16\u8f91\u7b49\u64cd\u4f5c\uff0c\u4ee5\u5b9a\u5236\u4f60\u7684\u7f51\u7ad9\u3002\u8bb0\u5f97\u5b9a\u671f\u68c0\u67e5WordPress\u53ca\u5176\u63d2\u4ef6\u7684\u66f4\u65b0\uff0c\u786e\u4fdd\u7f51\u7ad9\u7684\u5b89\u5168\u6027\u548c\u529f\u80fd\u6027\u3002<\/p>\n

\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5728\u963f\u91cc\u4e91\u670d\u52a1\u5668\u4e0a\u6210\u529f\u5b89\u88c5WordPress\uff0c\u5e76\u5f00\u59cb\u6784\u5efa\u4f60\u7684\u7f51\u7ad9\u4e4b\u65c5\u3002\u65e0\u8bba\u662f\u4e2a\u4eba\u535a\u5ba2\u3001\u4f01\u4e1a\u5b98\u7f51\u8fd8\u662f\u7535\u5546\u5e73\u53f0\uff0cWordPress\u90fd\u80fd\u4e3a\u4f60\u63d0\u4f9b\u5f3a\u5927\u7684\u652f\u6301\u548c\u7075\u6d3b\u7684\u6269\u5c55\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u6570\u5b57\u5316\u65f6\u4ee3\uff0c\u642d\u5efa\u4e2a\u4eba\u535a\u5ba2\u6216\u4f01\u4e1a\u7f51\u7ad9\u5df2\u6210\u4e3a\u5c55\u73b0\u81ea\u6211\u3001\u63a8\u5e7f\u54c1\u724c\u7684\u91cd\u8981\u65b9\u5f0f\u4e4b\u4e00\u3002\u800cWordPress\uff0c\u51ed\u501f\u5176\u5f3a\u5927\u7684 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3249],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-changshi"],"_links":{"self":[{"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":1,"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"predecessor-version":[{"id":208,"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/posts\/207\/revisions\/208"}],"wp:attachment":[{"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.woniuseo.com\/wordpress\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}