I have a custom post type that in admin area has a select custom meta box with 12.000+ options. So, in some cases, WordPress show an error message like memory exhausted.

Which could be a good troubleshooting to do?


  • 1
    Don’t know what you expect to find by troubleshooting. 12000 options, presumably loaded from a database, is just too much to load at once. You need to find an alternative UI for loading these options. May 29 '18 at 3:24
  • Thanks for your comment. Sorry if I didn't explain it clearly. I asking for suggestions to find those alternatives that you talk May 29 '18 at 3:31

I think your best shot would be to use a javascript-enhanced selectbox like select2 and an ajax-action to search for options. Right now, i don't have the time to write actual pseudo-code for you, but i guess this link should give you the direction: https://select2.org/data-sources/ajax

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.