仝 tóng

Increase WP MEMORY LIMIT from 40M to 128M or higher

The default Wordpress memory limit is 40M and 64M for multisite, some themes need memory larger this size.

We only need to modify the file '/wp-includes/default-constans.php', change 40M to the size you need in line 363.

// Define memory limits.
    if ( ! defined( 'WP_MEMORY_LIMIT' ) ) {
            if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
                    define( 'WP_MEMORY_LIMIT', $current_limit );
            } elseif ( is_multisite() ) {
                    define( 'WP_MEMORY_LIMIT', '64M' );
            } else {
                    define( 'WP_MEMORY_LIMIT', '**40M**' );
            }
    }
发表新评论