php - Annoyingconfusing Wordpress memory limit exhausted

I'm setting up a staging site on the same server as a live site. Wordpress 7.1, PHP 7.2. Site is a multisite instal

I'm setting up a staging site on the same server as a live site. Wordpress 7.1, PHP 7.2. Site is a multisite install I've been working with for years.

Everything is identical apart from domain names.

php.ini memory limit is deliberately very high 500MB

Apache config:

php_value memory_limit 256M  
php_value register_globals off  
php_value max_execution_time 600  
php_value upload_max_filesize 64M  
php_value post_max_size 64M  

wp-config.php contains these lines:

define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

.htaccess file does not include any lines dealing with memory limits.

Everything is identical to the live site, or has a higher memory limit.

Live site works fine.

Staging site, when visiting /wp-login.php throws an out of memory error:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 19628820 bytes) in /path/to/wordpress/wp-includes/wp-db.php on line 2888

268435456 bytes is obviously equal to a very low memory limit of 32MB.

Given that the staging and live site are almost identical, any idea what's going on?

As you can imagine, this is a pretty frustrating error!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745537891a4631989.html

相关推荐

  • php - Annoyingconfusing Wordpress memory limit exhausted

    I'm setting up a staging site on the same server as a live site. Wordpress 7.1, PHP 7.2. Site is a multisite instal

    1天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信