{"id":6475,"date":"2021-05-24T15:12:19","date_gmt":"2021-05-24T07:12:19","guid":{"rendered":"https:\/\/www.ldhost.cn\/jc\/?p=6475"},"modified":"2026-08-12T23:19:00","modified_gmt":"2026-08-12T15:19:00","slug":"wordpress%e7%bd%91%e7%ab%99%e6%8f%90%e7%a4%ba%e5%86%85%e5%ad%98%e4%b8%8d%e8%b6%b3%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.ldhost.cn\/jc\/wp\/6475.html","title":{"rendered":"WordPress\u7f51\u7ad9\u63d0\u793a\u5185\u5b58\u4e0d\u8db3\u7684\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WordPress\u7f51\u7ad9\u524d\u53f0\u6216\u540e\u53f0\u51fa\u73b0Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate xxx bytes) in xxx.php on line xxx\u7684\u89e3\u51b3\u529e\u6cd5<br>\u6253\u5f00wp-includes\u76ee\u5f55\u4e0bdefault-constants.php\u6587\u4ef6\uff0c\u627e\u5230\u5982\u4e0b\u4ee3\u7801\uff08\u5982\u679c\u6ca1\u6709\u5c31\u65b0\u589e\uff09\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\/\/ set memory limits<br>if ( !defined(&#8216;WP_MEMORY_LIMIT&#8217;) ) {<br>if( is_multisite() ) {<br>define(&#8216;WP_MEMORY_LIMIT&#8217;, &#8217;64M&#8217;);<br>} else {<br>define(&#8216;WP_MEMORY_LIMIT&#8217;, &#8217;32M&#8217;);<br>}<br>}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">if ( ! defined( &#8216;WP_MAX_MEMORY_LIMIT&#8217; ) ) {<br>define( &#8216;WP_MAX_MEMORY_LIMIT&#8217;, &#8216;256M&#8217; );<br>}<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><br>\u7136\u540e\u628adefine(&#8216;WP_MEMORY_LIMIT&#8217;, &#8217;32M&#8217;)\u4e2d\u768432M\u4fee\u6539\u4e3a64M\uff0c\u4fee\u6539\u540e\u5982\u4e0b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"374\" height=\"233\" src=\"https:\/\/www.ldhost.cn\/jc\/wp-content\/uploads\/2021\/05\/20210524150259.png\" alt=\"\" class=\"wp-image-6476\" srcset=\"https:\/\/www.ldhost.cn\/jc\/wp-content\/uploads\/2021\/05\/20210524150259.png 374w, https:\/\/www.ldhost.cn\/jc\/wp-content\/uploads\/2021\/05\/20210524150259-300x187.png 300w, https:\/\/www.ldhost.cn\/jc\/wp-content\/uploads\/2021\/05\/20210524150259-150x93.png 150w\" sizes=\"auto, (max-width: 374px) 100vw, 374px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/help.laoxuehost.com\/wp-content\/uploads\/2012\/11\/Eagle-111.png\"><\/a>\u5982\u679c\u8fd8\u662f\u4e0d\u884c\uff0c\u53ef\u4ee5\u4fee\u6539\u621096M\u3001128M\u6216\u66f4\u5927\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\u610f\uff1a\u8bf7\u4e0d\u8981\u4f7f\u7528Windows\u7cfb\u7edf\u81ea\u5e26\u7684\u8bb0\u4e8b\u672c\u4fee\u6539\u4ee3\u7801\uff0c\u63a8\u8350\u4f7f\u7528Notepad++\u3001UltraEdit\u3001EditPlus\u7b49\u7f16\u8f91\u5668\u4fee\u6539\uff0c<a href=\"https:\/\/www.ldhost.cn\/shared-ld.html\" target=\"_blank\" rel=\"noreferrer noopener\">cPanel\u4e3b\u673a<\/a>\u7528\u6237\u53ef\u4ee5\u76f4\u63a5\u5728cPanel\u6587\u4ef6\u7ba1\u7406\u5668Edit\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u4f60\u5728\u7528wordpress\u6700\u5403cpu\u7684\u4e24\u4e2a\u63d2\u4ef6\uff1aelementor \u548c woocommerce\uff0c\u90a3\u53ea\u80fd\u66f4\u6362\u6210\u9ad8\u914d\u7f6e\u7684<a href=\"https:\/\/www.ldhost.cn\/hkserver.html\" target=\"_blank\" rel=\"noreferrer noopener\">\u670d\u52a1\u5668<\/a>\uff0c\u56e0\u4e3a\u8981\u540c\u65f6\u8dd1\u8fd9\u4e8c\u4e2a\u63d2\u4ef6\u81f3\u5c11\u8981<strong>4\u6838\u5fc3\u30014G\u5185\u5b58<\/strong>\u7684\u670d\u52a1\u5668\u3002\u5982\u4e50\u9053\u4e3b\u673a\u63d0\u4f9b\u7684\u9999\u6e2f4\u6838\u5fc3\u30014G\u5185\u5b58\u30015M\u5bbd\u5e26\u300160G SSD\u786c\u76d8\u7684\u4e91\u670d\u52a1\u5668\uff0c\u4e00\u4e2a\u6708130\u5143\uff0c<a href=\"https:\/\/z.ldhost.cn\/cart.php?a=add&amp;pid=642\" target=\"_blank\" rel=\"noreferrer noopener\">\u70b9\u51fb\u8d2d\u4e70<\/a>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<div><img decoding=\"async\" src=\"https:\/\/www.ldhost.cn\/images\/ad-845-3.png\" alt=\"\u56fe\u7247\u63cf\u8ff0\" \/><\/div>","protected":false},"excerpt":{"rendered":"<p>WordPress\u7f51\u7ad9\u524d\u53f0\u6216\u540e\u53f0\u51fa\u73b0Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate xxx bytes) in xxx.php on line xxx\u7684\u89e3\u51b3\u529e\u6cd5\u6253\u5f00wp-includes\u76ee\u5f55\u4e0bdefault-constants.php\u6587\u4ef6\uff0c\u627e\u5230\u5982\u4e0b\u4ee3\u7801\uff08\u5982\u679c\u6ca1\u6709\u5c31\u65b0\u589e\uff09\uff1a \/\/ set memory limitsif ( !defined(&#8216;WP_MEMORY_LIMIT&#8217;) ) {if( is_multisite() ) {define(&#8216;WP_MEMOR&#8230; <a href=\"https:\/\/www.ldhost.cn\/jc\/wp\/6475.html\" class=\"readmore\">\u9605\u8bfb\u5168\u6587<span class=\"screen-reader-text\">WordPress\u7f51\u7ad9\u63d0\u793a\u5185\u5b58\u4e0d\u8db3\u7684\u89e3\u51b3\u65b9\u6cd5<\/span><span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-6475","post","type-post","status-publish","format-standard","hentry","category-wp","content-layout-excerpt-thumb"],"_links":{"self":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/6475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/comments?post=6475"}],"version-history":[{"count":2,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/6475\/revisions"}],"predecessor-version":[{"id":13966,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/6475\/revisions\/13966"}],"wp:attachment":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/media?parent=6475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/categories?post=6475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/tags?post=6475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}