Problem: I increased the number of items per page shown in wp-admin for a custom post type. I set it to 999, and now I'm seeing an error 500. I can't figure out how to fix it.
Solution: I found this message:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /***/wp-includes/wp-db.php on line 1889
If it's possible to increase the amount of memory on your server, that would be the first thing to try. Something like 512MB instead of 256MB might work, but it's hard for me to know. If your host is able to bump up the memory to 512, you can try adding these lines in wp-config.php:
define('WP_MEMORY_LIMIT', '512M'); define( 'WP_MAX_MEMORY_LIMIT', '512M' );
If you're not able to get the memory increased, or you need a quick fix, I can show you how to modify this pagination value directly in the database.
ALWAYS MAKE A DATABASE BACKUP BEFORE MODIFYING DATABASE VALUES MANUALLY!
After you backup the db, in the usermeta table, look for a row where the User ID equals your User ID and the meta_key looks like "edit_voter_per_page". Yours may be slightly different based on your post type slug. You should find a row with the meta_value 999. Modify that value to be something smaller like 50. Then you should be able to regain access to the Voters dashboard.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 3 replies, has 2 voices.
Last updated by 6 years, 6 months ago.
Assisted by: Christian Cox.