{"id":84,"date":"2026-02-06T10:52:51","date_gmt":"2026-02-06T02:52:51","guid":{"rendered":"https:\/\/wp.shjlr.top\/?p=84"},"modified":"2026-02-06T10:52:51","modified_gmt":"2026-02-06T02:52:51","slug":"wordpress-woocommerce-%e5%86%85%e5%ad%98%e4%b8%8d%e8%b6%b3%e6%8a%a5%e9%94%99%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88%ef%bc%88allowed-memory-size-exhausted-%e5%ae%8c%e6%95%b4%e4%bf%ae%e5%a4%8d%e6%95%99","status":"publish","type":"post","link":"https:\/\/wp.shjlr.top\/index.php\/2026\/02\/06\/wordpress-woocommerce-%e5%86%85%e5%ad%98%e4%b8%8d%e8%b6%b3%e6%8a%a5%e9%94%99%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88%ef%bc%88allowed-memory-size-exhausted-%e5%ae%8c%e6%95%b4%e4%bf%ae%e5%a4%8d%e6%95%99\/","title":{"rendered":"WordPress WooCommerce \u5185\u5b58\u4e0d\u8db3\u62a5\u9519\u89e3\u51b3\u65b9\u6848\uff08Allowed memory size exhausted \u5b8c\u6574\u4fee\u590d\u6559\u7a0b\uff09"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">WordPress WooCommerce \u5185\u5b58\u4e0d\u8db3\u62a5\u9519\u89e3\u51b3\u65b9\u6848\uff08Allowed memory size exhausted \u5b8c\u6574\u4fee\u590d\u6559\u7a0b\uff09<\/h4>\n\n\n\n<p>\u5728\u4f7f\u7528 <strong>WordPress \u642d\u5efa WooCommerce \u5546\u57ce\u7f51\u7ad9<\/strong> \u65f6\uff0c\u5f88\u591a\u7ad9\u957f\u90fd\u4f1a\u9047\u5230\u5982\u4e0b\u62a5\u9519\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Fatal error: Allowed memory size of 134217728 bytes exhausted\n<\/code><\/pre>\n\n\n\n<p>\u7279\u522b\u662f\u5f53\u9519\u8bef\u6587\u4ef6\u6307\u5411\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>woocommerce-zh_CN.l10n.php\n<\/code><\/pre>\n\n\n\n<p>\u8fd9\u901a\u5e38\u8bf4\u660e <strong>WooCommerce \u4e2d\u6587\u8bed\u8a00\u5305\u6216\u63d2\u4ef6\u52a0\u8f7d\u65f6 PHP \u5185\u5b58\u4e0d\u8db3<\/strong>\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u5c06\u63d0\u4f9b\u4e00\u4efd\u5b8c\u6574\u7684 <strong>WordPress \u5185\u5b58\u4e0d\u8db3\u4fee\u590d\u6307\u5357<\/strong>\uff0c\u5e2e\u52a9\u4f60\u5feb\u901f\u89e3\u51b3 WooCommerce \u8fd0\u884c\u62a5\u9519\u95ee\u9898\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e00\u3001\u4ec0\u4e48\u662f Allowed memory size exhausted \u62a5\u9519\uff1f<\/h4>\n\n\n\n<p>\u8be5\u9519\u8bef\u5c5e\u4e8e WordPress \u548c PHP \u73af\u5883\u4e2d\u5e38\u89c1\u7684\u6027\u80fd\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u62a5\u9519\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Allowed memory size of 134217728 bytes exhausted\n<\/code><\/pre>\n\n\n\n<p>\u542b\u4e49\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>134217728 bytes \u2248 128MB<\/li>\n\n\n\n<li>\u8868\u793a\u5f53\u524d PHP \u6700\u5927\u53ef\u7528\u5185\u5b58\u4e3a 128MB<\/li>\n\n\n\n<li>WooCommerce \u8fd0\u884c\u6240\u9700\u5185\u5b58\u8d85\u8fc7\u8be5\u9650\u5236<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e8c\u3001\u4e3a\u4ec0\u4e48 WooCommerce \u5bb9\u6613\u51fa\u73b0\u5185\u5b58\u4e0d\u8db3\uff1f<\/h4>\n\n\n\n<p>WooCommerce \u5c5e\u4e8e\u8d44\u6e90\u6d88\u8017\u8f83\u5927\u7684 WordPress \u63d2\u4ef6\uff0c\u4e3b\u8981\u539f\u56e0\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5546\u54c1\u6570\u636e\u8f83\u591a<\/li>\n\n\n\n<li>\u63d2\u4ef6\u529f\u80fd\u590d\u6742<\/li>\n\n\n\n<li>\u4e2d\u6587\u8bed\u8a00\u5305\u6587\u4ef6\u8f83\u5927<\/li>\n\n\n\n<li>\u4e3b\u9898\u6216\u6269\u5c55\u63d2\u4ef6\u51b2\u7a81<\/li>\n<\/ul>\n\n\n\n<p>\u56e0\u6b64 WooCommerce \u5bf9\u670d\u52a1\u5668\u914d\u7f6e\u8981\u6c42\u660e\u663e\u9ad8\u4e8e\u666e\u901a\u535a\u5ba2\u7ad9\u70b9\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e09\u3001\u89e3\u51b3 WordPress \u5185\u5b58\u4e0d\u8db3\u7684 3 \u79cd\u65b9\u6cd5<\/h4>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">\u65b9\u6cd5\u4e00\uff1a\u4fee\u6539 WordPress \u5185\u5b58\u9650\u5236\uff08\u6700\u63a8\u8350\uff09<\/h5>\n\n\n\n<p>\u8fd9\u662f\u6700\u7b80\u5355\u3001\u6700\u5b89\u5168\u7684 WooCommerce \u4fee\u590d\u65b9\u5f0f\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u64cd\u4f5c\u6b65\u9aa4\uff1a<\/h5>\n\n\n\n<p>\u6253\u5f00\u7f51\u7ad9\u76ee\u5f55\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-config.php\n<\/code><\/pre>\n\n\n\n<p>\u627e\u5230\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* That's all, stop editing! Happy publishing. *\/\n<\/code><\/pre>\n\n\n\n<p>\u5728\u8be5\u4ee3\u7801\u4e0a\u65b9\u6dfb\u52a0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('WP_MEMORY_LIMIT', '512M');\ndefine('WP_MAX_MEMORY_LIMIT', '512M');\n<\/code><\/pre>\n\n\n\n<p>\u4fdd\u5b58\u540e\u5237\u65b0\u7f51\u7ad9\u5373\u53ef\u751f\u6548\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">\u65b9\u6cd5\u4e8c\uff1a\u4fee\u6539 PHP memory_limit\uff08\u5f7b\u5e95\u89e3\u51b3\uff09<\/h5>\n\n\n\n<p>\u5982\u679c WordPress \u4fee\u6539\u540e\u4ecd\u62a5\u9519\uff0c\u9700\u8981\u8c03\u6574\u670d\u52a1\u5668 PHP \u914d\u7f6e\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u7b2c\u4e00\u6b65\uff1a\u67e5\u627e php.ini \u6587\u4ef6\u8def\u5f84<\/h5>\n\n\n\n<p>\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -i | grep php.ini\n<\/code><\/pre>\n\n\n\n<p>\u5e38\u89c1\u4f4d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/www\/server\/php\/\u7248\u672c\/etc\/php.ini\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">\u7b2c\u4e8c\u6b65\uff1a\u8c03\u6574\u5185\u5b58\u9650\u5236<\/h5>\n\n\n\n<p>\u627e\u5230\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>memory_limit = 128M\n<\/code><\/pre>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>memory_limit = 512M\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">\u7b2c\u4e09\u6b65\uff1a\u91cd\u542f PHP \u670d\u52a1<\/h5>\n\n\n\n<p>\u6267\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart php-fpm\n<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u4f7f\u7528\u5b9d\u5854\u9762\u677f\uff0c\u53ef\u4ee5\u76f4\u63a5\u91cd\u542f PHP \u670d\u52a1\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">\u65b9\u6cd5\u4e09\uff1a\u901a\u8fc7 .htaccess \u589e\u52a0\u5185\u5b58\u9650\u5236<\/h5>\n\n\n\n<p>\u5728\u7f51\u7ad9\u6839\u76ee\u5f55 <code>.htaccess<\/code> \u6587\u4ef6\u4e2d\u6dfb\u52a0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php_value memory_limit 512M\n<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff1a\u90e8\u5206\u670d\u52a1\u5668\u73af\u5883\u53ef\u80fd\u4e0d\u652f\u6301\u6b64\u65b9\u6cd5\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u56db\u3001WooCommerce \u4e2d\u6587\u8bed\u8a00\u5305\u5bfc\u81f4\u5185\u5b58\u62a5\u9519\u7684\u89e3\u51b3\u529e\u6cd5<\/h4>\n\n\n\n<p>\u5f53\u9519\u8bef\u6765\u6e90\u4e8e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>woocommerce-zh_CN.l10n.php\n<\/code><\/pre>\n\n\n\n<p>\u53ef\u4ee5\u5c1d\u8bd5\u6e05\u7406\u8bed\u8a00\u7f13\u5b58\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm wp-content\/languages\/plugins\/woocommerce-zh_CN*\n<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u91cd\u65b0\u767b\u5f55 WordPress \u540e\u53f0\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u91cd\u65b0\u4e0b\u8f7d\u7ffb\u8bd1\u6587\u4ef6\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e94\u3001WooCommerce \u63a8\u8350\u670d\u52a1\u5668\u914d\u7f6e<\/h4>\n\n\n\n<p>\u4e3a\u4e86\u4fdd\u8bc1 WooCommerce \u7a33\u5b9a\u8fd0\u884c\uff0c\u5efa\u8bae\u670d\u52a1\u5668\u6ee1\u8db3\u4ee5\u4e0b\u914d\u7f6e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7f51\u7ad9\u89c4\u6a21<\/th><th>\u63a8\u8350 PHP \u5185\u5b58<\/th><\/tr><\/thead><tbody><tr><td>\u5c0f\u578b\u5546\u57ce<\/td><td>256MB<\/td><\/tr><tr><td>\u4e2d\u578b\u5546\u57ce<\/td><td>512MB<\/td><\/tr><tr><td>\u5927\u578b\u5546\u57ce<\/td><td>1024MB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u516d\u3001\u5982\u4f55\u68c0\u67e5\u670d\u52a1\u5668\u5185\u5b58\u662f\u5426\u5145\u8db3\uff1f<\/h4>\n\n\n\n<p>\u53ef\u4ee5\u6267\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>free -h\n<\/code><\/pre>\n\n\n\n<p>\u67e5\u770b\u5f53\u524d\u670d\u52a1\u5668\u53ef\u7528\u5185\u5b58\u60c5\u51b5\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u670d\u52a1\u5668\u672c\u8eab\u5185\u5b58\u4e0d\u8db3\uff0c\u5373\u4f7f\u8c03\u6574 PHP \u914d\u7f6e\u4ecd\u53ef\u80fd\u62a5\u9519\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e03\u3001\u5982\u4f55\u907f\u514d WooCommerce \u5185\u5b58\u95ee\u9898\u518d\u6b21\u51fa\u73b0\uff1f<\/h4>\n\n\n\n<p>\u5efa\u8bae\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528\u9ad8\u6027\u80fd\u4e3b\u673a\u6216\u4e91\u670d\u52a1\u5668<\/li>\n\n\n\n<li>\u51cf\u5c11\u4e0d\u5fc5\u8981\u63d2\u4ef6<\/li>\n\n\n\n<li>\u5b9a\u671f\u6e05\u7406\u7f13\u5b58<\/li>\n\n\n\n<li>\u4f18\u5316\u6570\u636e\u5e93\u6027\u80fd<\/li>\n\n\n\n<li>\u4f7f\u7528 CDN \u52a0\u901f\u7f51\u7ad9<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u516b\u3001\u603b\u7ed3\uff1aWordPress \u5185\u5b58\u4e0d\u8db3\u4fee\u590d\u6700\u4f73\u5b9e\u8df5<\/h4>\n\n\n\n<p>\u89e3\u51b3 WooCommerce \u5185\u5b58\u62a5\u9519\u5efa\u8bae\u6309\u4ee5\u4e0b\u987a\u5e8f\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u63d0\u5347 WordPress \u5185\u5b58\u9650\u5236<\/li>\n\n\n\n<li>\u4fee\u6539 PHP memory_limit<\/li>\n\n\n\n<li>\u6e05\u7406 WooCommerce \u8bed\u8a00\u7f13\u5b58<\/li>\n\n\n\n<li>\u68c0\u67e5\u670d\u52a1\u5668\u8d44\u6e90\u914d\u7f6e<\/li>\n<\/ol>\n\n\n\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5c06 PHP \u5185\u5b58\u63d0\u5347\u81f3 512MB \u4ee5\u4e0a\u5373\u53ef\u89e3\u51b3\u7edd\u5927\u591a\u6570\u95ee\u9898\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress WooCommerce \u5185\u5b58\u4e0d\u8db3\u62a5\u9519\u89e3\u51b3\u65b9\u6848\uff08Allowed memory size ex [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":1,"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":85,"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions\/85"}],"wp:attachment":[{"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.shjlr.top\/index.php\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}