{"id":8,"date":"2024-12-05T12:02:39","date_gmt":"2024-12-05T12:02:39","guid":{"rendered":"http:\/\/blog.xiaocongyu.com\/?p=8"},"modified":"2024-12-05T12:05:56","modified_gmt":"2024-12-05T12:05:56","slug":"wordpress-%e5%ae%89%e8%a3%85%e6%9d%83%e9%99%90%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/blog.xiaocongyu.com\/index.php\/2024\/12\/05\/wordpress-%e5%ae%89%e8%a3%85%e6%9d%83%e9%99%90%e9%97%ae%e9%a2%98\/","title":{"rendered":"WordPress \u5b89\u88c5\u6743\u9650\u95ee\u9898"},"content":{"rendered":"\n<p>Installation failed: Could not create directory. \/wp-content\/upgrade<\/p>\n\n\n\n<p>\u5728\u521d\u7528 wordpress \u65f6\uff0c\u5b89\u88c5\u4e3b\u9898\u9047\u5230\u4e86\u8fd9\u4e2a\u6743\u9650\u95ee\u9898\uff0c\u53c2\u8003<a href=\"https:\/\/stackoverflow.com\/questions\/37157264\/wordpress-plugin-install-could-not-create-directory\">https:\/\/stackoverflow.com\/questions\/37157264\/wordpress-plugin-install-could-not-create-directory<\/a>\u540e\uff0c\u6211\u5c1d\u8bd5\u5728 wordpress \u6839\u76ee\u5f55\u7528\u8fd9\u4e2a\u547d\u4ee4\u89e3\u51b3\u5b89\u88c5\u6743\u9650\u95ee\u9898\uff0c\u5b9e\u9645\u4e0a\u6211\u7684 nginx \u7684\u7528\u6237\u4e0d\u53eb\u8fd9\u4e2a\uff0c\u6240\u4ee5\u4e0b\u9762\u4e09\u6761\u5bf9\u6211\u4e0d\u8d77\u4f5c\u7528<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown -R www-data:www-data wp-content\/plugins\/\nsudo chmod 775 wp-content\nsudo chown -R www-data:www-data wp-content\/<\/code><\/pre>\n\n\n\n<p>\u6211\u7528\u4e0b\u9762\u8fd9\u4e2a\u6307\u4ee4\u6765\u67e5\u8be2\u4e86\u6211\u7684 nginx \u7528\u6237<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>ps aux | grep nginx<\/code><\/code><\/pre>\n\n\n\n<p>\u8f93\u51fa\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root       23807  0.0  0.2 170120  2980 ?        Ss   Nov28   0:00 nginx: master process \/www\/server\/nginx\/sbin\/nginx -c \/www\/server\/nginx\/conf\/nginx.conf\nwww        39116  0.0  1.0 191700 10184 ?        S    Nov28   0:15 nginx: worker process\nwww        39117  0.0  0.5 191700  5472 ?        S    Nov28   0:00 nginx: worker process\nwww        39118  0.0  0.2 170104  2332 ?        S    Nov28   0:04 nginx: cache manager process\nroot      245143  0.0  0.2   6332  2076 pts\/0    S+   03:49   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox --exclude-dir=.venv --exclude-dir=venv ngin<\/code><\/pre>\n\n\n\n<p>\u53ef\u4ee5\u770b\u51fa\uff0c\u6211\u7684 nginx \u5ba2\u6237\u7aef\u7528\u6237\u662f www<\/p>\n\n\n\n<p>\u6539\u547d\u4ee4\u4e3a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown -R www:www wp-content\/plugins\/\nsudo chmod 775 wp-content\nsudo chown -R www:www wp-content\/<\/code><\/pre>\n\n\n\n<p>\u540e\u5c31\u53ef\u4ee5\u5b89\u88c5\u5566<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installation failed: Could not create directory. \/wp-content\/upgrade \u5728\u521d\u7528 wordpress \u65f6\uff0c\u5b89\u88c5\u4e3b\u9898\u9047\u5230\u4e86\u8fd9\u4e2a\u6743\u9650\u95ee\u9898\uff0c\u53c2\u8003https:\/\/stackoverflow.com\/questions\/37157264\/wordpress-plugin-install-could-not-create-directory\u540e\uff0c\u6211\u5c1d\u8bd5\u5728 wordpress \u6839\u76ee\u5f55\u7528\u8fd9\u4e2a\u547d\u4ee4\u89e3\u51b3\u5b89\u88c5\u6743\u9650\u95ee\u9898\uff0c\u5b9e\u9645\u4e0a\u6211\u7684 nginx \u7684\u7528\u6237\u4e0d\u53eb\u8fd9\u4e2a\uff0c\u6240\u4ee5\u4e0b\u9762\u4e09\u6761\u5bf9\u6211\u4e0d\u8d77\u4f5c\u7528 \u6211\u7528\u4e0b\u9762\u8fd9\u4e2a\u6307\u4ee4\u6765\u67e5\u8be2\u4e86\u6211\u7684 nginx \u7528\u6237 \u8f93\u51fa\u4e86 \u53ef\u4ee5\u770b\u51fa\uff0c\u6211\u7684 nginx \u5ba2\u6237\u7aef\u7528\u6237\u662f www \u6539\u547d\u4ee4\u4e3a \u540e\u5c31\u53ef\u4ee5\u5b89\u88c5\u5566<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":2,"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"predecessor-version":[{"id":11,"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions\/11"}],"wp:attachment":[{"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xiaocongyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}