{"id":194,"date":"2016-10-25T12:08:40","date_gmt":"2016-10-25T04:08:40","guid":{"rendered":"http:\/\/pony.hk\/?p=194"},"modified":"2021-02-25T22:36:44","modified_gmt":"2021-02-25T14:36:44","slug":"%e9%98%bf%e9%87%8c%e4%ba%91-wordpress%e5%8d%87%e7%ba%a7%e5%a4%b1%e8%b4%a5%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95","status":"publish","type":"post","link":"https:\/\/lnmp.ivan.xin\/?p=194","title":{"rendered":"\u963f\u91cc\u4e91 wordpress\u5347\u7ea7\u5931\u8d25\u7684\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<p>2021-02-25 \u66f4\u65b0\uff1a\u4e4b\u524d\u7684\u65b9\u6cd5\u64cd\u4f5c\u8d77\u6765\u96be\u5ea6\u6bd4\u8f83\u5927\uff0c\u7528wp-china-yes\u63d2\u4ef6\u7684\u65b9\u6cd5\u89e3\u51b3\u975e\u5e38\u7b80\u5355<br \/>\n\u7b2c\u4e00\u6b65\uff1a\u5230https:\/\/wp-china.org\/\u4e0b\u8f7d\u63d2\u4ef6zip\u5b89\u88c5\u5305<br \/>\n\u7b2c\u4e8c\u6b65\uff1a\u5728\u4f60\u7684wordpress\u540e\u53f0\uff0c\u4e0a\u4f20\u5e76\u5b89\u88c5\u63d2\u4ef6<br \/>\n\u7b2c\u4e09\u6b65\uff1a\u542f\u7528\u63d2\u4ef6<br \/>\n\u7b2c\u56db\u6b65\uff1a\u5f00\u59cb\u8fdb\u884cwordpress\u5347\u7ea7<br \/>\n\u7b2c\u4e94\u6b65\uff1a\u5982\u679c\u4e0d\u60f3\u4f7f\u7528\u8fd9\u4e2a\u63d2\u4ef6\uff0c\u7981\u7528\u63d2\u4ef6\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p>\/\/\/\/\/\/\/\/\/\/\/\/ \u4ee5\u4e0b\u662f\u8001\u65b9\u6cd5 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n<p>1\u3001\u7531\u4e8e\u56fd\u5185\u963f\u91cc\u4e91\u5bf9\u4e8edownloads.wordpress.org\u4e0b\u8f7d\u901f\u5ea6\u592a\u6162\uff0c\u5bfc\u81f4PHP\u6267\u884c\u8d85\u65f6\uff0c\u9700\u8981\u4fee\u6539\u4ee5\u4e0b\u6587\u4ef6\u53c2\u6570\uff1a<br \/>\nwordpress\u6587\u4ef6\/wp-admin\/includes\/file.php\u91cc\u8fb9\u7684function download_url( $url, $timeout = 300 )\u53c2\u6570\u4fee\u6539\u4e3a3000<br \/>\nphp.ini\u91cc\u8fb9\u7684max_execution_time = 30\u53c2\u6570\u4fee\u6539\u4e3a3000<br \/>\nphp-fpm.conf\u91cc\u8fb9\u7684request_terminate_timeout = 30s\u53c2\u6570\u4fee\u6539\u4e3a3000<br \/>\nhosts\u91cc\u8fb9\u628adownloads.wordpress.org\u7684\u89e3\u6790\u4fee\u6539\u4e3a\u8fd9\u51e0\u4e2aip\u4e2d\u6700\u5feb\u768466.155.40.186~189<\/p>\n<p>2\u3001\u5982\u679c\u51fa\u73b0\u201c\u53e6\u4e00\u66f4\u65b0\u6b63\u5728\u8fdb\u884c\u201d\u7684\u63d0\u793a\uff1a<br \/>\nWordPress\u5728\u5347\u7ea7\u7684\u8fc7\u7a0b\u4e2d\uff0c\u5982\u679c\u4f60\u5237\u65b0\u9875\u9762\u6216\u8005\u5173\u95ed\u9875\u9762\u4f1a\u9020\u6210Wordpress\u5347\u7ea7\u4e0d\u6210\u529f\uff0c\u4e0b\u6b21\u5347\u7ea7\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u8fd9\u6837\u6216\u8005\u90a3\u6837\u7684\u95ee\u9898\u3002\u4f8b\u5982\u6211\u524d\u51e0\u5929\u5347\u7ea7\u65f6\u5237\u65b0\u4e86\u9875\u9762\uff0c\u518d\u6b21\u5347\u7ea7Wordpress\u65f6\uff0cWordpress\u4e00\u76f4\u63d0\u793a\"\u53e6\u4e00\u66f4\u65b0\u6b63\u5728\u8fdb\u884c\"\u3002<\/p>\n<p>\u8fd9\u662f\u7531\u4e8e\u5728\u5347\u7ea7Wordpress\u65f6\uff0cWordpress\u4f1a\u5728\u6570\u636e\u5e93wp_options\u8868\u4e2d\u589e\u52a0core_updater.lock\u8bb0\u5f55\u3002\u5982\u4e2d\u9014\u6253\u65adWordpress\u5347\u7ea7\uff0c\u8fd9\u4e2a\u8bb0\u5f55\u4f1a\u7559\u5728\u6570\u636e\u5e93\u4e2d\u3002\u5f53\u4e0b\u6b21\u5347\u7ea7\u65f6\uff0cWordpress\u68c0\u6d4b\u5230\u6b64\u8bb0\u5f55\u7684\u5b58\u5728\u5c31\u4f1a\u8fd4\u56de\"\u53e6\u4e00\u66f4\u65b0\u6b63\u5728\u8fdb\u884c\"\u3002\u53ef\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u89e3\u51b3\uff1a<\/p>\n<p>\u901a\u8fc7phpmyadmin\u6216navicat\u7b49\u5de5\u5177\u7ba1\u7406Wordpress\u6570\u636e\u5e93\uff0c\u5728wp_options\u8868\u4e2d\u627e\u5230core_updater.lock\u8bb0\u5f55\u5e76\u5220\u9664\u3002\u5982\u679c\u7528sql\u8bed\u53e5\u67e5\u627e\u548c\u5220\u9664\uff0c\u5c31\u662f\uff1a<br \/>\nselect * from wp_options where option_name like '%lock%';<br \/>\n\u627e\u5230id\u540e<br \/>\ndelete from wp_options where option_id='12345';<\/p>\n<p>3\u3001\u89e3\u51b3\u65e0\u6cd5\u5347\u7ea7\u7684\u7ec8\u6781\u5927\u62db\uff1a\u56fd\u5916\u670d\u52a1\u5668\u4e0a\u81ea\u5efahttps\u7f51\u9875\u4ee3\u7406<\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u5728\u56fd\u5916\u670d\u52a1\u5668\u4e0a\uff08\u5047\u5982IP\u662f\uff1a123.123.123.123\uff09\u7ed9nginx\u914d\u7f6ehttps<br \/>\n\u53c2\u8003\u6b65\u9aa4\uff1a<a href=\"http:\/\/pony.hk\/?p=216\">http:\/\/pony.hk\/?p=216<\/a><\/p>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u5728\u56fd\u5916\u670d\u52a1\u5668\u4e0a\u505ahttps\u7f51\u9875\u4ee3\u7406\uff0c\u5f88\u7b80\u5355\uff0c\u7ad9\u70b9conf\u6587\u4ef6\u5185\u5bb9\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n<blockquote><p>server {<br \/>\nlisten 443;<br \/>\nssl on;<br \/>\nssl_certificate key\/server.crt;<br \/>\nssl_certificate_key key\/server.key;<br \/>\nserver_name downloads.wordpress.org;<\/p>\n<p>location \/ {<br \/>\nindex index.php index.html;<br \/>\nproxy_set_header X-Real-IP $remote_addr;<br \/>\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\nproxy_set_header Referer https:\/\/downloads.wordpress.org;<br \/>\nproxy_set_header Host downloads.wordpress.org;<br \/>\nproxy_pass https:\/\/downloads.wordpress.org;<br \/>\nproxy_set_header Accept-Encoding \"\";<br \/>\n}<br \/>\n}<\/p><\/blockquote>\n<p>\u7b2c\u4e09\u6b65\uff1a\u5728\u56fd\u5185\u670d\u52a1\u5668\u4e0a\uff0c\u628aphp.ini\u548cphp-fpm.conf\u53c2\u6570\u753130\u6539\u4e3a3000\uff0c\u53e6\u5916\u8981\u81ea\u5b9a\u4e49\u57df\u540d\u89e3\u6790\uff0c\u5728\/etc\/hosts\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e00\u6761\u56fd\u5916\u670d\u52a1\u5668\u7684\u89e3\u6790\u8bb0\u5f55\uff1a123.123.123.123 downloads.wordpress.org<\/p>\n<p>\u7b2c\u56db\u6b65\uff1a\u56e0\u4e3a\u8fd9\u65f6\u5019wordpress\u53bb\u8bbf\u95ee\u7684\u4e0b\u8f7d\u7ad9\u70b9\uff0c\u5b9e\u9645\u4e0a\u8bc1\u4e66\u662f\u9519\u8bef\u7684\uff0c\u8981\u8bbe\u7f6essl\u4e0d\u9a8c\u8bc1\u8bc1\u4e66\u3002\u65b9\u6cd5\uff1a\u5728wordpress\u5f53\u524d\u6a21\u677f\u7684functions.php\u6587\u4ef6\u4e2d\u52a0\u5165\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<blockquote><p>add_action('http_request_args', 'jkudish_http_request_args', 10, 2);<br \/>\nfunction jkudish_http_request_args($args, $url) {<br \/>\n$args['sslverify'] = false;<br \/>\nreturn $args;<br \/>\n} \/\/ \u89e3\u51b3php https\u7b7e\u540d\u9519\u8bef<\/p><\/blockquote>\n<p>\u7b2c\u4e94\u6b65\uff1a\u540e\u53f0\u5347\u7ea7\u66f4\u65b0<\/p>\n<p>\u7b2c\u516d\u6b65\uff1a\u628aphp.ini\u548cphp-fpm.conf\u53c2\u6570\u75313000\u6539\u56de30\uff0c\u7ed3\u675f\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2021-02-25 \u66f4\u65b0\uff1a\u4e4b\u524d\u7684\u65b9\u6cd5\u64cd\u4f5c\u8d77\u6765\u96be\u5ea6\u6bd4\u8f83\u5927\uff0c\u7528wp-china-yes\u63d2\u4ef6\u7684\u65b9\u6cd5\u89e3\u51b3\u975e\u5e38\u7b80\u5355 \u7b2c...<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22780],"tags":[],"class_list":["post-194","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=194"}],"version-history":[{"count":3,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/194\/revisions"}],"predecessor-version":[{"id":672,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/194\/revisions\/672"}],"wp:attachment":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}