Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
    
haven't found any limitation, try to debug it –  Eugene Manuilov Apr 25 '13 at 7:01
    
What is your PHP version? Are you using Suhosin? –  birgire Apr 25 '13 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 '13 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 '13 at 21:06
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
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 '13 at 18:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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