建议设置内存至少128MB,如果要导入经典的演示数据,内存要求256MB , 请定义wp-config.php文件内存限制
我修改过php.ini 也修改过wp-config.php 跟.htaccess试了很多方法也花了很长时间都是以失败告终。
后来修改
/wp-includes/default-constants.php
15行左右找到
1 2 3 4 5 6 7 8 9 10 11 12 13 14 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'); } |
修改为
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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'); } |
刷新网页成功解决