Reputation: 1
I can't save the header menu on my site in WordPress - it keeps failing with a 500 Internal Server Error. I've tried updating my .htaccess file, and the php memory limit has been set to 128M. The core files are recently updated (4.8), and everything else in the site saves fine (pages, other menus, ext.) It's just the header menu (which has 60+ items) that gets the error.
EDIT
The debug log after trying to save the menu contains no fatal errors. Lots of PHP Notices for deprecated stuff though. Here's a sample:
[16-Aug-2017 17:23:21 UTC] PHP Notice: Undefined variable: th_query in /var/www/vhosts/mysite.com/mysubsite.com/wp-content/themes/mysitetheme/functions.php on line 377
[16-Aug-2017 17:23:21 UTC] PHP Notice: Trying to get property of non-object in /var/www/vhosts/mysite.com/mysubsite.com/wp-content/themes/mysitetheme/functions.php on line 377
[16-Aug-2017 17:23:23 UTC] PHP Notice: The called constructor method for WP_Widget in WDG_SpecialRecentPostsPro is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/mysite.com/mysubsite.com/wp-includes/functions.php on line 3894
[16-Aug-2017 17:30:27 UTC] PHP Notice: Use of undefined constant url - assumed 'url' in /var/www/vhosts/mysite.com/mysubsite.com/wp-content/themes/mysitetheme/header.php on line 339
The 500 error still only shows up when trying to save the header menu in Appearance > Menus.
Upvotes: 0
Views: 4426
Reputation: 1783
I found this article with similar issue:
WordPress is not limiting the number of menus you can have. Your web hosting server is.There are limitations on the POST max variables which is limiting the large number of entries being saved.
So try to increase the following PHP settings in php.ini to something like shown below:
post.max_vars = 5000
request.max_vars = 5000
Upvotes: 0