Large Menus in WordPress

I recently had a problem where a very large nav menu (200+ items) in WordPress wouldn’t save without cutting off the last few items. Turns out it isn’t a WordPress bug but to do with PHP configuration. In your php.ini, up this value and all should be good:

[bash]max_input_vars = 4096[/bash]

You may also have to up these, depending on if you’re running Suhosin on your production box (PHP security stuff):

[bash]suhosin.post.max_vars = 4096
suhosin.request.max_vars = 4096[/bash]

The problem arises because WordPress posts the entire structure of the nav menu back to the server every time it saves it. Not exactly great when you’re dealing with large navigation I know. Sure there must be a better way, although I suppose it’s not exactly what WP was designed for. Anyway. Strange but true.


Setting up Nginx on Amazon EC2 for WordPress

So I thought the first post may as well be about what I’ve done most recently, which is setup this blog. I’m running it on Amazon Web Services (AWS) because if it’s good enough for about fucking half the internet, it’s good enough for me.

EC2 is their VPS service, and it’s all I’ll be using for now until that million-billion hits an hour of traffic comes along, at which point I’ll get more complex. Read on for the HOWTO.
Continue reading “Setting up Nginx on Amazon EC2 for WordPress”