{"id":776,"date":"2025-07-31T18:14:54","date_gmt":"2025-07-31T10:14:54","guid":{"rendered":"https:\/\/wp.winter-weng.cc\/work\/?p=776"},"modified":"2025-07-31T18:14:55","modified_gmt":"2025-07-31T10:14:55","slug":"wordpress-%e6%9b%b4%e6%96%b0%e5%be%8c%ef%bc%8c%e6%96%b0%e5%a2%9e%e5%a5%97%e4%bb%b6-%e4%bd%88%e6%99%af%e9%a0%81%e9%9d%a2%e7%84%a1%e6%b3%95%e9%a1%af%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/wp.winter-weng.cc\/work\/?p=776","title":{"rendered":"[WordPress] \u66f4\u65b0\u5f8c\uff0c\u65b0\u589e\u5957\u4ef6\/\u4f48\u666f\u9801\u9762\u7121\u6cd5\u986f\u793a"},"content":{"rendered":"\n<p>\u597d\u4e45\u6c92\u66f4\u65b0\uff0c\u54c8\u54c8\u54c8\uff5e\u592a\u61f6\u60f0\u4e86\u3002<\/p>\n\n\n\n<p>\u6700\u8fd1\u624b\u52d5\u66f4\u65b0\u4e4b\u5f8c\uff0cWordpress \u5efa\u8b70\u6211\u5c07 php \u5347\u7d1a\u70ba 8.0+\uff0c\u7562\u7adf\u7576\u521d\u662f\u4e09\u56db\u5e74\u524d\u67b6\u7684\uff0c\u5927\u6982\u662f 5.8 \u7248\u672c\uff08PHP 7.3 \u5de6\u53f3\uff09\u3002<\/p>\n\n\n\n<p>\u4ed7\u8457\u662f Docker \u67b6\u7684\uff0c\u8cc7\u6599\u4e5f\u90fd Volume \u51fa\u4f86\u4e86\uff0c\u76f4\u63a5\u780d\u6389 Container \u62c9\u6700\u65b0\u7684\u7248\u672c\u3002\u62c9\u5b8c\u9084\u5fd8\u8a18\u8981\u555f\u7528 Apache \u7684 SSL\uff0c\u6280\u80fd\u679c\u7136\u662f\u653e\u8457\u5c31\u6703\u5fd8\u8a18\u3002<\/p>\n\n\n\n<p>\u4f46\u5b8c\u6210\u4e86\u4e4b\u5f8c\u767c\u73fe\u5957\u4ef6 \/ \u4f48\u666f\u9801\u9762\u6c92\u8fa6\u6cd5\u986f\u793a\uff0c\u6703\u51fa\u73fe\u4ee5\u4e0b\u932f\u8aa4\u8a0a\u606f\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u8907\u88fd\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>Warning: plugins_api(): \u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4\uff0c\u61c9\u8a72\u662f WordPress.org \u6216\u9019\u500b\u7db2\u7ad9\u4f3a\u670d\u5668\u7684\u7d44\u614b\u767c\u751f\u554f\u984c\u3002\u5047\u5982\u6301\u7e8c\u767c\u751f\u76f8\u540c\u932f\u8aa4\uff0c\u8acb\u524d\u5f80\u6280\u8853\u652f\u63f4\u8ad6\u58c7\u5c0b\u6c42\u5354\u52a9\u3002 (WordPress \u7db2\u7ad9\u7121\u6cd5\u5efa\u7acb\u8207 WordPress.org \u9593\u7684\u5b89\u5168\u9023\u7dda\uff0c\u8acb\u806f\u7d61\u9019\u500b\u7db2\u7ad9\u7684\u4f3a\u670d\u5668\u7ba1\u7406\u54e1) in \/var\/www\/html\/wp-includes\/functions.php<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">Warning:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">plugins_api<\/span><span style=\"color: #ECEFF4\">()<\/span><span style=\"color: #A3BE8C\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4\uff0c\u61c9\u8a72\u662f<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">WordPress.org<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u6216\u9019\u500b\u7db2\u7ad9\u4f3a\u670d\u5668\u7684\u7d44\u614b\u767c\u751f\u554f\u984c\u3002\u5047\u5982\u6301\u7e8c\u767c\u751f\u76f8\u540c\u932f\u8aa4\uff0c\u8acb\u524d\u5f80\u6280\u8853\u652f\u63f4\u8ad6\u58c7\u5c0b\u6c42\u5354\u52a9\u3002<\/span><span style=\"color: #D8DEE9FF\"> (WordPress <\/span><span style=\"color: #A3BE8C\">\u7db2\u7ad9\u7121\u6cd5\u5efa\u7acb\u8207<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">WordPress.org<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u9593\u7684\u5b89\u5168\u9023\u7dda\uff0c\u8acb\u806f\u7d61\u9019\u500b\u7db2\u7ad9\u7684\u4f3a\u670d\u5668\u7ba1\u7406\u54e1<\/span><span style=\"color: #D8DEE9FF\">) <\/span><span style=\"color: #81A1C1\">in<\/span><span style=\"color: #D8DEE9FF\"> \/var\/www\/html\/wp-includes\/functions.php<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4e00\u81c9\u832b\u7136\u7576\u7136\u662f\u5148\u53bb\u554f AI\uff0c\u63a5\u4e0b\u4f86 AI \u8981\u6211\u57f7\u884c\u4ee5\u4e0b\u6307\u4ee4\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u8907\u88fd\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -I https:\/\/api.wordpress.org\/<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">curl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-I<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">https:\/\/api.wordpress.org\/<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4e4b\u5f8c\u5c31\u5f97\u5230\u4e86\u9019\u500b\u932f\u8aa4\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u8907\u88fd\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl: (6) getaddrinfo() thread failed to start<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">curl:<\/span><span style=\"color: #D8DEE9FF\"> (6) <\/span><span style=\"color: #88C0D0\">getaddrinfo<\/span><span style=\"color: #ECEFF4\">()<\/span><span style=\"color: #D8DEE9FF\"> thread failed to start<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u7136\u5f8c\u4ed6\u5c31\u8ddf\u6211\u8aaa\uff5e\u54e6\u9019\u53ef\u80fd\u662f\u56e0\u70ba\u4f60\u7684 Container DNS \u6709\u554f\u984c\u54e6\uff01\u4f60\u8981\u8a2d\u5b9a\u4f60\u7684 DockerFile\uff0c\u9084\u6709 Docker \u670d\u52d9\u7684\u9810\u8a2d\u7d44\u4ef6\uff0c\u9084\u6709\u9019\u500b\u3001\u9084\u6709\u90a3\u500b\uff5e<\/p>\n\n\n\n<p>\u6211\u5468\u65cb\u5728\u5404\u500b AI \u4e4b\u9593\uff0c\u8ff7\u5931\u4e86\u65b9\u5411\uff0c\u6d6a\u8cbb\u4e86\u5169\u5929 T^T\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<p>\u6700\u7d42\u4e86\u89e3\u5230\uff0c\u6700\u65b0\u7248\u672c\u7684 WordPress Image \u5e95\u5c64\u4e5f\u6709\u66f4\u65b0\uff0c<code>getaddrinfo()<\/code> \u9810\u8a2d\u6703\u958b thread \u505a DNS \u89e3\u6790\uff0c\u4f46 Docker \u7684\u9810\u8a2d seccomp profile \u628a\u9019\u4e9b\u300c\u5371\u96aa syscall\u300d\u9650\u5236\u6389\uff0c\u6240\u4ee5\u61c9\u8a72\u8981\u8abf\u6574\u7684\u662f seccomp \u7684\u8a2d\u5b9a\u3002<\/p>\n\n\n\n<p>\u5982\u679c WordPress \u4e0d\u662f\u7528 Docker \u67b6\u8a2d\u7684\u8a71\uff0c\u61c9\u8a72\u4e5f\u4e0d\u6703\u9047\u5230\u9019\u500b\u554f\u984c\u5427\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<p>\ud83e\udde0 \u70ba\u4ec0\u9ebc\u300c\u820a\u7248 WordPress image\u300d\u6c92\u9019\u500b\u554f\u984c\uff1f<\/p>\n\n\n\n<p>\u2705 <strong>\u820a\u7248 WordPress image\uff08\u4f8b\u5982 6.1.x\u30016.2.x\uff09\u5927\u591a\u6578\u662f\u57fa\u65bc\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Debian 11\uff08bullseye\uff09<\/strong><\/li>\n\n\n\n<li><strong>glibc 2.31 \u6216 2.33<\/strong><\/li>\n\n\n\n<li><code>curl<\/code>, <code>getaddrinfo()<\/code> \u9019\u4e9b function \u5728\u9019\u4e9b\u7248\u672c\u88e1\uff0c<strong>\u9084\u6c92\u5207\u63db\u6210 multithread \u6a21\u5f0f<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udd27 \u63db\u53e5\u8a71\u8aaa\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u820a\u7248 image \u7528\u7684\u662f\u300c\u55ae\u57f7\u884c\u7dd2 DNS resolver\u300d\uff0c<strong>\u4e0d\u4f9d\u8cf4\u88ab seccomp \u9650\u5236\u7684 syscall<\/strong>\uff0c\u6240\u4ee5\u6839\u672c\u4e0d\u6703\u5831\u932f\u3002<\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\ud83d\udd25 \u65b0\u7248 WordPress image \u7206\u70b8\u7684\u539f\u56e0\uff1f<\/strong><\/p>\n\n\n\n<p>\u5f9e <strong>Debian 12\uff08bookworm\uff09 + glibc 2.36<\/strong> \u958b\u59cb\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>getaddrinfo()<\/code> \u9810\u8a2d\u6703<strong>\u958b thread \u505a DNS \u89e3\u6790<\/strong><\/li>\n\n\n\n<li>\u9019\u4e9b thread \u547c\u53eb <code>clone<\/code>, <code>futex<\/code>, <code>set_tid_address<\/code> \u7b49 syscall<\/li>\n\n\n\n<li>\u4f46 Docker \u7684\u9810\u8a2d seccomp profile \u628a\u9019\u4e9b\u300c\u5371\u96aa syscall\u300d\u9650\u5236\u6389<\/li>\n\n\n\n<li>\u7136\u5f8c\u4f60\u5c31\u7206\u4e86\uff1a<code>getaddrinfo() thread failed to start<\/code><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u597d\u4e45\u6c92\u66f4\u65b0\uff0c\u54c8\u54c8\u54c8\uff5e\u592a\u61f6\u60f0\u4e86\u3002 \u6700\u8fd1\u624b\u52d5\u66f4\u65b0\u4e4b\u5f8c\uff0c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[43,11,36],"tags":[],"class_list":["post-776","post","type-post","status-publish","format-standard","hentry","category-wordpress","category-11","category-36"],"_links":{"self":[{"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=\/wp\/v2\/posts\/776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=776"}],"version-history":[{"count":2,"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=\/wp\/v2\/posts\/776\/revisions"}],"predecessor-version":[{"id":778,"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=\/wp\/v2\/posts\/776\/revisions\/778"}],"wp:attachment":[{"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.winter-weng.cc\/work\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}