搜索
SR網頁設計工作室 - 購物網站/企業官網專業開發 Wordpress 使用教程 Wordpress提示Allowed memory size of xxx bytes exhau ...
byadmin 發表於 2014-10-2 20:24:32 , 2713人已閱讀 , 1人回應
Wordpress 若出現了以下的提示「 Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate xxx bytes) in xxx.php on line xxx」,代表目前WP系統記憶體不足,需要擴充設定,以下提供簡易的解決方法。




打開wp-includes目錄下default-constants.php文件,找到以下代碼:約第18行
        // set memory limits
        if ( !defined('WP_MEMORY_LIMIT') ) {
                if( is_multisite() ) {
                        define('WP_MEMORY_LIMIT', '64M');
                } else {
                        define('WP_MEMORY_LIMIT', '40M');

                }
        }

將紅字記憶體大小調整為「128M」即可,參考下方代碼:
        // set memory limits
        if ( !defined('WP_MEMORY_LIMIT') ) {
                if( is_multisite() ) {
                        define('WP_MEMORY_LIMIT', '128M');
                } else {
                        define('WP_MEMORY_LIMIT', '128M');

                }
        }



收藏回覆 只看該作者 道具 舉報

by黃興育@FB 發表於 2015-4-14 13:32:43
感謝你的協助,很實用!

回覆 只看該作者 道具 舉報

Traffic Exchange Site
您需要登錄後才可以回帖 登錄 | 立即註冊

作者資訊

文章分類

SR數位設計工作室

  • 服務專線:03-3555-069


ECSHOP購物網站開發|接案說明|線上洽詢|隱私權政策|SR數位設計(CMS)

信箱:sr.design2011@gmail.com

, Processed in 0.127585 second(s), 38 queries , Gzip On.

Copyright © 2011-2014 Template By SR網頁設計清新部落風格

Core - DZ2.5 GMT+8, 2024-4-23 16:40

回頂部