2

I have a theme with an options page. And on that page there are 1083 options. I've noticed that the last 13 are not saving. They were saving at one point, but after I added new options above them, they stopped working.

I suspected that I may have run up against some kind of option limit or limit on the array so to test that, I removed 7 options above the last 13 and sure enough 7 of them saved after that.

I've been trying to find information about this but have been unable to do so. Does anyone know if you can only have 1070 options in one settings field? It's not an issue with the database longtext memory limit. These are simple 1's and 0's and hex color values and other CSS type stuff. The export of the field is only 33k.

4
  • haven't found any limitation, try to debug it Apr 25, 2013 at 7:01
  • What is your PHP version? Are you using Suhosin?
    – birgire
    Apr 25, 2013 at 8:02
  • Thanks for the comments. I don't know about Suhosin but your question makes me think maybe I should contact my web host and ask. I'm using WebSynthesis which is a dedicated WP hosting service and they'll probably have a good answer about all this for me. I'll let you know.
    – Suzanne
    Apr 25, 2013 at 18:28
  • 1
    Just a follow-up to this. I contacted my web host and indeed they are using Suhosin which was likely the issue. So again, thank you for the leads. This question has been resolved :)
    – Suzanne
    May 1, 2013 at 21:06

1 Answer 1

2

The limit is probably not WordPress specific, but caused by PHP.

max_input_vars might be set to 1000, so not all fields might reach WordPress.

You can store 4,294,967,295 or 4GB (232 – 1) characters in one option, so I don’t think this is your problem. If it is, you should consider a separate table.

1
  • Correct the longtext limit isn't the issue because the field is only storing 33k at the moment. However I'll look into the max_input_vars issue. Thanks for the lead. Much appreciated.
    – Suzanne
    Apr 25, 2013 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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