{"id":9,"date":"2024-08-15T11:23:26","date_gmt":"2024-08-15T03:23:26","guid":{"rendered":"https:\/\/top.myhome007.com:12107\/?p=9"},"modified":"2024-08-23T10:29:34","modified_gmt":"2024-08-23T02:29:34","slug":"wordpress%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8%e5%ad%a6%e4%b9%a0%e5%a1%ab%e5%9d%91%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/myuutime.com\/?p=9","title":{"rendered":"WordPress\u5b89\u88c5\u4f7f\u7528\u5b66\u4e60\u7b14\u8bb0"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-text-color has-accent-color has-alpha-channel-opacity has-accent-background-color has-background\"\/>\n\n\n\n<p style=\"text-indent:2em;\"><strong>\u4e00\u3001\u5173\u4e8e\u5b89\u88c5\u7fa4\u6656\u7f51\u7ad9\u67b6\u8bbe\u73af\u5883\u4e09\u5251\u5ba2\u7684\u95ee\u9898<\/strong><\/p>\n\n\n\n<p style=\"text-indent:2em;\">1\u3001\u8fd9\u4e09\u4e2a\u5168\u90e8\u5728\u5957\u4ef6\u4e2d\u5fc3\u5b89\u88c5\u5373\u53ef\uff0c\u4e0d\u9700\u8981\u8fd0\u7528docker\u73af\u5883\u3002\u5b83\u4eec\u5206\u522b\u662f\uff1aweb station\u5957\u4ef6\uff0cmariadb10\u6570\u636e\u5e93\u5957\u4ef6\uff0cphpmyadmin\u6570\u636e\u5e93\u7ba1\u7406\u5957\u4ef6\u3002\u4e25\u683c\u6309\u7167\u4e0a\u8ff0\u987a\u5e8f\u5b89\u88c5\uff0c\u4e0d\u80fd\u4e71\uff0c\u5426\u5219\u4f1a\u51fa\u73b0\u5404\u79cd\u83ab\u540d\u5176\u5999\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\">2\u3001\u5728\u5b89\u88c5mariadb10\u5957\u4ef6\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u8bbe\u7f6eroot\u5bc6\u7801\uff0c\u8981\u6c42\u5927\u5c0f\u5199\u3001\u6570\u5b57\u3001\u7b26\u53f7\u6df7\u5408\u624d\u884c\uff0c\u52a1\u5fc5\u7528\u8bb0\u4e8b\u672c\u8bb0\u4e0b\uff0c\u5426\u5219\u4e00\u4f1a\u513f\u5c31\u5fd8\u8bb0\u4e86\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\">3\u3001php8.0\u4f1a\u5728\u5b89\u88c5phpmyadmin\u5957\u4ef6\u8fc7\u7a0b\u4e2d\u81ea\u52a8\u5b89\u88c5\uff0c\u65e0\u9700\u518d\u5355\u72ec\u5b89\u88c5\u6b64\u5957\u4ef6\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\"><strong>\u4e8c\u3001\u5173\u4e8e\u91cd\u5b9a\u5411\u6b21\u6570\u8fc7\u591a\u53ca\u53cd\u5411\u4ee3\u7406\u9519\u8bef\u95ee\u9898<\/strong><\/p>\n\n\n\n<p style=\"text-indent:2em;\">\u901a\u8fc7\u767b\u5f55\u7f51\u7ad9FTP\u6216\u8005\u7f51\u7ad9\u4e3b\u673a\u7684\u6587\u4ef6\u7ba1\u7406\uff0c\u627e\u5230\u7f51\u7ad9\u6839\u76ee\u5f55\u4e0b\u7684 wp-config.php \u6587\u4ef6\uff0c\u5c06\u4ee5\u4e0b\u4ee3\u7801\u6dfb\u52a0\u7684\u8be5\u6587\u4ef6\uff0c\u5373\u53ef\u5b8c\u7f8e\u89e3\u51b3\u6b64\u95ee\u9898\uff1a<\/p>\n\n\n\n<p style=\"text-indent:2em;\"re class=\"wp-block-code\"><code>$_SERVER&#91;'HTTPS'] = 'on';\ndefine('FORCE_SSL_LOGIN', true);\ndefine('FORCE_SSL_ADMIN', true);<\/code><\/pre>\n\n\n\n<p style=\"text-indent:2em;\"><strong>\u4e09\u3001\u5173\u4e8ewordpress\u66f4\u65b0\u65f6\u5f39\u51faFTP\u7a97\u53e3\u9519\u8bef\u7684\u95ee\u9898<\/strong><\/p>\n\n\n\n<p style=\"text-indent:2em;\">wordpress\u5b89\u88c5\u63d2\u4ef6\u63d0\u793a\u9700\u8981ftp\u670d\u52a1\uff0c\u5176\u5b9e\u4e0d\u662f\u771f\u7684\u9700\u8981\u5b89\u88c5ftp\u670d\u52a1\uff0c\u53ea\u8981\u4fee\u6539wordpress\u914d\u7f6e\u5373\u53ef\u3002<br>\u5728wordpress\u5b89\u88c5\u76ee\u5f55\u4e2d\u627e\u5230wp-config.php\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n\n\n\n<p style=\"text-indent:2em;\"re class=\"wp-block-code\"><code>define(\"FS_METHOD\",\"direct\");\ndefine(\"FS_CHMOD_DIR\", 0777);\ndefine(\"FS_CHMOD_FILE\", 0777);<\/code><\/pre>\n\n\n\n<p style=\"text-indent:2em;\"><strong>\u56db\u3001\u5173\u4e8e\u5168\u9762\u5173\u95ed\u6216\u7981\u7528wordpress\u8bc4\u8bba\u529f\u80fd\u7684\u95ee\u9898<\/strong><\/p>\n\n\n\n<p style=\"text-indent:2em;\">\u76f4\u63a5\u5b89\u88c5disable comments\u63d2\u4ef6\u5e76\u542f\u7528\u540e\uff0c\u8bbe\u7f6e\u6210\u201c\u5168\u9762\u7981\u7528\u201d\u5373\u53ef\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\"><strong>\u4e94\u3001\u5173\u4e8ewordpress\u5168\u7ad9\u5907\u4efd\u6216\u8fc1\u79fb\u7684\u95ee\u9898<\/strong><\/p>\n\n\n\n<p style=\"text-indent:2em;\">1\u3001\u5148\u5bfc\u51faSQL\u6570\u636e\u5e93\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\">2\u3001\u590d\u5236\u5168\u7ad9\u6587\u4ef6\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\">3\u3001\u5728\u65b0\u7684\u7f51\u7ad9\u5148\u628a\u6570\u636e\u5e93\u4e2d\u5bfc\u5165\uff0c\u5728\u6570\u636e\u5e93\u4e2d\u4fee\u6539\u7f51\u7ad9\u7684\u57df\u540d\u4e3a\u65b0\u57df\u540d\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\">4\u3001\u4e0a\u4f20\u5168\u7ad9\u6587\u4ef6\u5230\u65b0\u7f51\u7ad9\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\">5\u3001\u5728\u65b0\u7f51\u7ad9\u4e2d\u4fee\u6539WP-CONFIG.PHP\u4e2d\u7684\u6570\u636e\u5e93\u540d\u79f0\u3001\u8fde\u63a5\u5bc6\u7801\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\">\u4fee\u6539\u4e0b\u9762\u51e0\u9879\uff0c\u5206\u522b\u4e3a\u6570\u636e\u5e93\u540dDB_NAME\u3001\u7528\u6237\u540dDB_USER\u3001\u5bc6\u7801DB_PASSWORD\u3001host\u5730\u5740DB_HOST\uff1a<\/p>\n\n\n\n<p style=\"text-indent:2em;\"re class=\"wp-block-code\"><code>\/\/ ** Database settings \u2013 You can get this info from your web host ** \/\/\n\n\/** The name of the database for WordPress *\/\n\ndefine( \u2018DB_NAME\u2019, \u2018hep_wordpress\u2019 );\n\n\/** Database username *\/\n\ndefine( \u2018DB_USER\u2019, \u2018root\u2019 );\n\n\/** Database password *\/\n\ndefine( \u2018DB_PASSWORD\u2019, \u2018admin123\u2019 );\n\n\/** Database hostname *\/\n\ndefine( \u2018DB_HOST\u2019, \u2018localhost\u2019 );<\/code><\/pre>\n\n\n\n<p style=\"text-indent:2em;\">\u5176\u4e2d\u7684DB_HOST\u4e00\u9879\uff0c\u4e00\u822c\u7528\u9ed8\u8ba4\u7684\u5c31\u884c\uff0c\u5982\u679c\u51fa\u73b0\u6570\u636e\u5e93\u8fde\u63a5\u9519\u8bef\uff0c\u518d\u4fee\u6539\u6210\u670d\u52a1\u5668\u7684IP\u5730\u5740\u4e5f\u53ef\u4ee5\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\"><strong>\u516d\u3001\u5173\u4e8ewordpress\u540e\u53f0\u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u95ee\u9898<\/strong><\/p>\n\n\n\n<p style=\"text-indent:2em;\">\u4e3b\u8981\u662f\u901a\u8fc7\u4fee\u6539\u670d\u52a1\u5668\u7684php.ini\u6587\u4ef6\u6765\u89e3\u51b3\u3002\u6253\u5f00php.ini\u6587\u4ef6\uff0c\u901a\u5e38\u4f4d\u4e8e\u4f60\u7684\u670d\u52a1\u5668\u63a7\u5236\u9762\u677f\u6216PHP\u5b89\u88c5\u76ee\u5f55\u4e2d\u3002\u627e\u5230\u4ee5\u4e0b\u4e24\u4e2a\u53c2\u6570\uff1a<\/p>\n\n\n\n<p style=\"text-indent:2em;\"re class=\"wp-block-code\"><code>upload_max_filesize\uff1a\u63a7\u5236\u5355\u4e2a\u6587\u4ef6\u4e0a\u4f20\u7684\u6700\u5927\u5c3a\u5bf8\u3002\n\npost_max_size\uff1a\u63a7\u5236\u901a\u8fc7POST\u65b9\u6cd5\u53d1\u9001\u7684\u4fe1\u606f\u91cf\uff0c\u8fd9\u4e2a\u503c\u8981\u5927\u4e8eupload_max_filesize\u3002<\/code><\/pre>\n\n\n\n<p style=\"text-indent:2em;\">\u4fee\u6539\u8fd9\u4e24\u4e2a\u503c\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<p style=\"text-indent:2em;\"re class=\"wp-block-code\"><code>upload_max_filesize = 100M\npost_max_size = 110M<\/code><\/pre>\n\n\n\n<p style=\"text-indent:2em;\">\u7136\u540e\u91cd\u542f\u670d\u52a1\u5668\u751f\u6548\u5373\u53ef\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\"><strong>\u4e03\u3001\u5173\u4e8ewordpress\u4e2dphpmyadmin\u5bfc\u5165\u6570\u636e\u5e93\u5927\u5c0f\u9650\u5236\u7684\u95ee\u9898<\/strong><\/p>\n\n\n\n<p style=\"text-indent:2em;\">\u8fd9\u4e2a\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u4e0d\u9700\u8981\u4fee\u6539php.ini\u53c2\u6570\uff0c \u9002\u7528\u628a\u7ad9\u653e\u5728\u865a\u62df\u4e3b\u673a\u7684\u4eba\u3002<br>\u6253\u5f00phpMyAdmin\u76ee\u5f55\u4e0b\u7684\u914d\u7f6e\u6587\u4ef6\uff1aconfig.inc.php<br>\u8bf7\u6ce8\u610f\u5176\u4e2d\u7684\u8fd9\u4e24\u4e2a\u53c2\u6570\uff1a<\/p>\n\n\n\n<p style=\"text-indent:2em;\"re class=\"wp-block-code\"><code>$cfg&#91;'UploadDir'] = \u2018upload\u2018;\n$cfg&#91;'SaveDir'] = \u2018save\u2018;<\/code><\/pre>\n\n\n\n<p style=\"text-indent:2em;\">\u5728phpMyAdmin\u76ee\u5f55\u4e0b\u81ea\u884c\u5efa\u7acb\u6587\u4ef6\u5939upload\u548csave\u6765\u5bf9\u5e94UploadDir\uff08\u5bfc\u5165\u76ee\u5f55\uff09\u548cSaveDir\uff08\u5bfc\u51fa\u76ee\u5f55\uff09\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\"><br>\u5bfc\u51fa\u64cd\u4f5c\uff1a<br>1\u3001\u767b\u9646phpMyAdmin<br>2\u3001\u5728\u5de6\u4fa7\u9009\u4e2d\u4f60\u9700\u8981\u5907\u4efd\u5bfc\u51fa\u7684\u6570\u636e\u5e93<br>3\u3001\u5728\u53f3\u4fa7\u7a97\u53e3\u4e2d\u627e\u5230\u201c\u5bfc\u51fa\u201d<br>4\u3001\u5728\u53f3\u4fa7\u7a97\u53e3\u5e95\u90e8\u9009\u62e9\u201c\u4fdd\u5b58\u4e8e\u670d\u52a1\u5668\u7684 save \u76ee\u5f55\u201d<br>5\u3001\u9009\u62e9\u538b\u7f29\u6a21\u5f0f\uff0c\u63d0\u4ea4\u201c\u6267\u884c\u201d\u5373\u53ef\u5728save\u6587\u4ef6\u5939\u4e2d\u627e\u5230\u8be5\u6570\u636e\u5e93\u7684\u5bfc\u51fa\u6570\u636e\u3002<\/p>\n\n\n\n<p style=\"text-indent:2em;\"><br>\u5bfc\u5165\u64cd\u4f5c\uff1a<br>1\u3001\u4e0a\u4f20\u51c6\u5907\u5bfc\u5165\u7684\u6570\u636e\u6587\u4ef6\u5230upload\u76ee\u5f55<br>2\u3001\u767b\u9646phpMyAdmin<br>3\u3001\u5728\u5de6\u4fa7\u9009\u4e2d\u4f60\u9700\u8981\u5907\u4efd\u5bfc\u51fa\u7684\u6570\u636e\u5e93<br>4\u3001\u5728\u53f3\u4fa7\u7a97\u53e3\u4e2d\u627e\u5230\u201cImport\u201d\uff08\u5bfc\u51fa\uff09<br>5\u3001\u5728\u53f3\u4fa7\u7a97\u53e3\u201c\u7f51\u7ad9\u670d\u52a1\u5668\u4e0a\u8f7d\u76ee\u5f55\u201d\u4e2d\u9009\u62e9\u9700\u8981\u5bfc\u5165\u7684\u6570\u636e\u6587\u4ef6\uff0c\u63d0\u4ea4\u201c\u6267\u884c\u201d\u5b8c\u6210\u5bfc\u5165\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5173\u4e8e\u5b89\u88c5\u7fa4\u6656\u7f51\u7ad9\u67b6\u8bbe\u73af\u5883\u4e09\u5251\u5ba2\u7684\u95ee\u9898 1\u3001\u8fd9\u4e09\u4e2a\u5168\u90e8\u5728\u5957\u4ef6\u4e2d\u5fc3\u5b89\u88c5\u5373\u53ef\uff0c\u4e0d\u9700\u8981\u8fd0\u7528docker\u73af\u5883\u3002\u5b83\u4eec\u5206\u522b\u662f\uff1aweb station\u5957\u4ef6\uff0cmariadb1<\/p>\n","protected":false},"author":1,"featured_media":31,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","comments-off"],"_links":{"self":[{"href":"https:\/\/myuutime.com\/index.php?rest_route=\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myuutime.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myuutime.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myuutime.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myuutime.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":20,"href":"https:\/\/myuutime.com\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"predecessor-version":[{"id":152,"href":"https:\/\/myuutime.com\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions\/152"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/myuutime.com\/index.php?rest_route=\/wp\/v2\/media\/31"}],"wp:attachment":[{"href":"https:\/\/myuutime.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myuutime.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myuutime.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}