wordpress memory limit wp memory limit settings

建议设置内存至少128MB,如果要导入经典的演示数据,内存要求256MB , 请定义wp-config.php文件内存限制

我修改过php.ini 也修改过wp-config.php 跟.htaccess试了很多方法也花了很长时间都是以失败告终。

后来修改

/wp-includes/default-constants.php

15行左右找到

<pre name="code" class="html">functionwp_initial_constants( ) {  
    global$blog_id;  
    
    // set memory limits  
    if( !defined('WP_MEMORY_LIMIT') ) {  
        if( is_multisite() ) {  
            define('WP_MEMORY_LIMIT','128M');  
        }else{  
            define('WP_MEMORY_LIMIT','64M');  
        }  
    }  
    
    if( ! defined('WP_MAX_MEMORY_LIMIT') ) {  
        define('WP_MAX_MEMORY_LIMIT','256M');  
    }

修改为

functionwp_initial_constants( ) {  
    global$blog_id;  
    
    // set memory limits  
    if( !defined('WP_MEMORY_LIMIT') ) {  
        if( is_multisite() ) {  
            define('WP_MEMORY_LIMIT','256M');  
        }else{  
            define('WP_MEMORY_LIMIT','256M');  
        }  
    }  
    
    if( ! defined('WP_MAX_MEMORY_LIMIT') ) {  
        define('WP_MAX_MEMORY_LIMIT','256M');  
    }

刷新网页成功解决

912sy.com download resources are from the network, only for learning and reference use, the copyright belongs to the original author, do not use for commercial purposes, please remove yourself within 24 hours after downloading.
If the content published on this site inadvertently violates your rights and interests, please contact us and the site will be deleted within one business day.If you encounter any problems please contact customer service QQ:2385367137
912sy " wordpress memory limit wp memory limit settings