{"id":81,"date":"2023-02-21T11:29:02","date_gmt":"2023-02-21T03:29:02","guid":{"rendered":"https:\/\/km94.com\/?p=81"},"modified":"2023-02-21T11:29:02","modified_gmt":"2023-02-21T03:29:02","slug":"ubuntu-20-04%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85%e6%90%ad%e5%bb%bawoocommerce%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/dy208.cn\/index.php\/2023\/02\/21\/ubuntu-20-04%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85%e6%90%ad%e5%bb%bawoocommerce%e6%95%99%e7%a8%8b\/","title":{"rendered":"Ubuntu 20.04\u670d\u52a1\u5668\u5b89\u88c5\u642d\u5efaWooCommerce\u6559\u7a0b"},"content":{"rendered":"<p>WooCommerce\u662fWordPress\u7684\u5f00\u6e90\u7535\u5b50\u5546\u52a1\u63d2\u4ef6\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u8f7b\u677e\u521b\u5efa\u5728\u7ebf\u5546\u5e97\u548c\u8d2d\u7269\u7f51\u7ad9\uff0c\u64cd\u4f5c\u7b80\u5355\u5e76\u80fd\u5141\u8bb8\u7528\u6237\u6839\u636e\u7535\u5b50\u5546\u52a1\u9700\u6c42\u7075\u6d3b\u6269\u5c55\u529f\u80fd\u3002\u90a3\u4e48\u5982\u4f55\u5728Ubuntu 20.04\u670d\u52a1\u5668\u5b89\u88c5\u548c\u914d\u7f6e<span class=\"wp_keywordlink\">WooCommerce<\/span>\uff1f\u4e0b\u9762\u6765\u7b80\u5355\u4e86\u89e3\u4e0b\u3002<\/p>\n<p><\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" class=\"wp-image-83\" src=\"https:\/\/km94.com\/wp-content\/uploads\/2023\/02\/12-44.jpg\" alt=\"Ubuntu 20.04\u670d\u52a1\u5668\u5b89\u88c5\u642d\u5efaWooCommerce\u6559\u7a0b\" \/><\/figure>\n<p><\/p>\n<p>Ubuntu 20.04 LTS\u662f\u76ee\u524d\u6d41\u884c\u7684Linux\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u4e00\uff0c\u7edd\u5927\u591a\u6570\u7f8e\u56fd\u670d\u52a1\u5668\u652f\u6301\u914d\u7f6e\u6b64\u7cfb\u7edf\u3002\u6211\u4eec\u521b\u5efa\u7535\u5b50\u5546\u52a1\u7f51\u7ad9\u65f6\uff0c\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u5b89\u5168\u7a33\u5b9a\u7684\u4e3b\u673a\u7a7a\u95f4\uff0c\u672c\u6587\u4ee5Vultr VPS\u4e3a\u4f8b\uff08\u64cd\u4f5c\u7cfb\u7edf\u9009\u7684\u662fUbuntu 20.04\uff09\u3002Vultr\u63d0\u4f9b\u6709\u5e94\u7528\u7a0b\u5e8f\u5e02\u573a\uff0c\u652f\u6301\u4e00\u952e\u5b89\u88c5\u90e8\u7f72WordPress\u3002<\/p>\n<p><strong>1\u3001\u5b89\u88c5WordPress\u7a0b\u5e8f<\/strong><\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cVultr Marketplace WordPress\u5e94\u7528\u7a0b\u5e8f\u8fd0\u884c\u5728LEMP (Nginx\u3001MySQL\u3001PHP)\u6808\u4e0a\uff0c\u6211\u4eec\u5728\u5e94\u7528\u7a0b\u5e8f\u5e02\u573a\u627e\u5230WordPress\u540e\u4e00\u952e\u5b89\u88c5\u5373\u53ef\u3002Nginx\u6839\u636e\u6240\u9009\u7684VPS\u670d\u52a1\u5668\u89c4\u683c\u8fdb\u884c\u4e86\u9884\u4f18\u5316\uff0c\u4ee5\u83b7\u5f97\u6240\u6709\u6258\u7ba1WordPress\u7f51\u7ad9\u7684\u6700\u4f73\u6027\u80fd\u3002<\/p>\n<p>\u5229\u7528SSH\u5de5\u5177\u767b\u5f55\u5230Vultr VPS\u670d\u52a1\u5668\u540e\uff0c\u53ef\u8fd0\u884c\u4e0b\u9762\u547d\u4ee4\u6765\u786e\u4fddWordPress\u7684\u6b63\u786e\u4f18\u5316\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">$ cat \/etc\/nginx\/nginx.conf<\/span><\/code><\/pre>\n<p>\u5982\u679cworker_processes\u8bbe\u4e3aauto\uff0cworker_connections\u80fd\u5339\u914d\u670d\u52a1\u5668\u5185\u5b58\u7684\u8bdd\uff0c\u8fd9\u8868\u660e\u8be5Vultr VPS\u670d\u52a1\u5668\u662f\u4e13\u95e8\u4e3aWordPress\u4f18\u5316\u7684\u3002<\/p>\n<p>user nginx;<\/p>\n<p>worker_processes auto;<\/p>\n<p>worker_connections 1024;<\/p>\n<p><strong>2\u3001\u4e0b\u8f7d\u5b89\u88c5WooCommerce\u63d2\u4ef6<\/strong><\/p>\n<p>WordPress\u7a0b\u5e8f\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4eceWordPress\u63d2\u4ef6\u9875\u9762\u4e0b\u8f7d\u6700\u65b0\u7684WooCommerce\u6587\u4ef6\uff0c\u8fd9\u91cc\u5b89\u88c5\u7684\u662f5.8\u7248\u672c\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">$ wget https:\/\/downloads.wordpress.org\/plugin\/woocommerce.5.8.0.zip<\/span><\/code><\/pre>\n<p>\u89e3\u538b\u7f29WooCommerce\u6587\u4ef6\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">$ unzip woocommerce.5.8.0.zip<\/span><\/code><\/pre>\n<p>\u5c06\u538b\u7f29\u540e\u7684\u6587\u4ef6\u79fb\u52a8\u5230WordPress\u63d2\u4ef6\u5b89\u88c5\u76ee\u5f55\u4e0b\/var\/www\/html\/wordpress\/wp-content\/plugins<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">$ mv woocommerce \/var\/www\/html\/wordpress\/wp-content\/plugins<\/span><\/code><\/pre>\n<p>\u4e3a\u4e86\u907f\u514d\u7531\u4e8e\u6743\u9650\u95ee\u9898\u5bfc\u81f4WordPress\u9519\u8bef\uff0c\u8fd9\u91cc\u5c06\u76ee\u5f55\u6240\u6709\u6743\u66f4\u6539\u7ed9\u7528\u6237www-data\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">$ chown -R www-data:www-data woocommerce\/<\/span><\/code><\/pre>\n<p><strong>3\u3001\u6fc0\u6d3bWooCommerce\u63d2\u4ef6\u5e76\u521b\u5efa\u7535\u5b50\u5546\u52a1\u7f51\u7ad9<\/strong><\/p>\n<p>\u6709\u4e86WordPress\u63d2\u4ef6\u76ee\u5f55\u4e2d\u7684WooCommerce\u6587\u4ef6\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95eeUbuntu 20.04\u670d\u52a1\u5668\u7684IP\u5730\u5740\u767b\u5f55\u5230WordPress\u540e\u53f0\uff0c\u7136\u540e\u5728\u7ba1\u7406\u4eea\u8868\u677f\u7684\u5de6\u4fa7\u83dc\u5355\u680f\u4e2d\u627e\u5230WooCommerce\u63d2\u4ef6\u5e76\u6fc0\u6d3b\u5b83\u3002<\/p>\n<p>WooCommerce\u63d2\u4ef6\u6fc0\u6d3b\u540e\uff0c\u6211\u4eec\u53ef\u4e3a\u5728\u7ebf\u5546\u5e97\u9009\u62e9\u4e00\u4e2a\u5408\u9002\u7684\u4e3b\u9898\uff0c\u7136\u540e\u586b\u5199\u8d44\u6599\u521b\u5efa\u6240\u9700\u7684\u7535\u5b50\u5546\u52a1\u7f51\u7ad9\u5373\u53ef\u3002<\/p>\n<div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>WooCommerce\u662fWordPress\u7684\u5f00\u6e90\u7535\u5b50\u5546\u52a1\u63d2\u4ef6\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u8f7b\u677e\u521b\u5efa\u5728\u7ebf\u5546\u5e97\u548c\u8d2d\u7269\u7f51\u7ad9\uff0c\u64cd\u4f5c\u7b80\u5355&hellip;<\/p>\n","protected":false},"author":1,"featured_media":82,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3],"tags":[12,7,4,13,14,15,8,16,17,18,19,20,21,22,23,11,24,25],"class_list":["post-81","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jc","category-server","tag-ip","tag-linux","tag-mysql","tag-nginx","tag-php","tag-ssh","tag-ubuntu","tag-vps","tag-vultr","tag-vultr-vps","tag-woocommerce","tag-wordpress","tag-21","tag-22","tag-23","tag-11","tag-24","tag-25","entry"],"_links":{"self":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":0,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}