简体   繁体   中英

Can't Login Non Admin User in WordPress

Before I can login without problem with any user registered on my WordPress site. But now, I can't login non admin users to my WordPress site. Administrator has no problem signing in.

When non admin login, it throws the following error:

PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 5041000 bytes)

I believe this is not due to the lack of memory since I can login admin user without problem.

Does anyone has experience the same problem before?

I'm with you on that it doesn't seem like it is running low on memory, but it probably wouldn't hurt to increase your memory in the php.ini file. I would recommend disabling all of your plugins and seeing if the problem exists. If so, activate them one by one to isolate the problem plugin.

You need edit this file, usually in the root folder.

wp-config.php

You need to write in MB, not G. For example:

define(‘WP_MEMORY_LIMIT’, ‘1024M’);

I suggest this number:

define(‘WP_MEMORY_LIMIT’, ‘256M’);

Please, read below …

Some suggestions about Memory Limit:

  1. Your WordPress memory limit cannot exceed your PHP memory limit. The php memory limit can be set, for example, editing your php.ini file. For example: memory_limit 512M For details about it, talk with your hosting company.

  2. PHP memory_limit is per-script. For example, although PHP's memory limit may be set high to 1GB, that does not mean that scripts will pile up to use that 1GB. This helps prevent poorly written scripts for eating up all available memory on a server… Then, I guess 256M is a good number for PHP ini and WP memory limit.

  3. Your server need be free memory bigger than PHP Memory limit. It's important to understand that increasing the amount of memory each PHP process can use decreases the number of concurrent processes that can run.

We have this free WP plugin to help you to control your memory limit: https://wordpress.org/plugins/wp-memory/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM