Call Us : +1-678-551-2452
+91 77381-86899

Number of Menu Items Limit exceeds in WordPress hosted on Godaddy Shared Hosting

On a WordPress website I encountered a problem while adding items in menu. After I added a lot of menu items it automatically truncated few menu items from the end. At first I thought it to be a Browser issue (that caused the Save request for menu to fail) and added the items a second time only to realize that Wordpress wasn’t letting me add a menu item without delete an existing item. This was happening due to a default limit on the number of menu items.

I stumbled upon a solution browsing through other blogs:

Add following lines in php.ini file

max_input_vars = 5000
suhosin.post.max_vars = 5000
suhosin.request.max_vars = 5000

(by default limit for above elements is 1000)

But the site was being hosted on GoDaddy’s shared hosting which directly doesn’t let access to edit the php.ini file.

A workaround was created make it work. I created a new file named php5.ini  and added following lines in the file. This file was placed in the root folder of the GoDaddy Shared Hosting Account (public_html folder).

max_input_vars = 5000
suhosin.post.max_vars = 5000
suhosin.request.max_vars = 5000

A server restart is needed for this to override the original php.ini file settings. To do this, login to your GoDaddy Account and find the Option for System Process. 

Open it and click on ‘End Web’. To verify that new settings have indeed been applied, create a sample.php file with this one line of code:

<?php phpinfo(); ?>

Browse the sample.php file – for example: www.yourdomainname/sample.php  

In the output that displays, check for the value for max_input_vars. If the new settings have been applied, it will be possible to add additional menu items to your WordPress website without issue.

 

Leave a Reply

Pay with PayPal

Icon Web Solutions Service
Other Amount:
Name:

Testimonials

It has been a great pleasure working with Icon Web Solutions on the development of my digitized logo and website. From the initial phases of web design, the Icon Web Solutions team has been a pleasure to work with
Naren, USA

REQUEST A QUOTE

Request A Quote

Please fill the form to request a quote from us

Name (required)

Email (required)

Phone

Services
 Website Design & Development Logo Design SEO SMO Payment Gateway Integration Others

Any Other Detail

Input Text Shown in Image
captcha