Why Your WordPress Menu Links Are Disappearing or Not Saving (And How To Fix It)
Content
One of the most common and frustrating issues WordPress users face is when menu items fail to save correctly. You add a page or a custom link, but the URL field is blank, the label changes to "Pending" or "Menu Item," and the front-end link is completely broken. This guide will walk you through the most common causes and their solutions.
What Does This Problem Look Like?
Based on numerous community reports, the problem typically manifests in a few specific ways:
- After adding a custom link, the URL field is empty upon saving the menu.
- Menu item labels change to "Pending" or generic text like "Menu Item."
- The front-end menu displays the item text, but the
<a>tag has nohrefattribute, making it unclickable. - Adding a page to the menu converts it into a "Custom Link" type with no URL.
- Critically, this issue often persists even after disabling all plugins and switching to a default WordPress theme.
Why Does This Happen?
This bizarre behavior is rarely caused by your theme or a specific plugin. The most common culprit, as indicated by community troubleshooting, is a server-side configuration limit.
Primary Suspect: The PHP max_input_vars Limit
When you save a menu, WordPress sends a large amount of data to the server. Complex menus with many items can exceed the default value of the max_input_vars directive in your PHP configuration. When this limit is exceeded, the server simply stops processing the input data, which results in menu item properties (like the URL) being truncated and lost.
How to Fix the WordPress Menu Saving Issue
Solution 1: Increase the max_input_vars Value (Most Common Fix)
This is the first and most likely solution you should try. You will need to access your hosting account's control panel (e.g., cPanel).
- Log in to your hosting control panel.
- Look for sections named "PHP Settings," "Select PHP Version," or "Software."
- Within these settings, there is often an option to modify PHP directives. Find
max_input_vars. - Increase its value. A common recommended setting is
3000or5000. - Save the changes and restart your web service if necessary.
Alternative wp-config.php method: If you cannot change it in your control panel, you can try adding this line to your wp-config.php file, above the line that says /* That's all, stop editing! Happy publishing. */.
@ini_set( 'max_input_vars', 5000 );
Solution 2: Perform a Basic Conflict Test
While the issue often points to a server config, it's good practice to rule out other conflicts.
- Clear All Caches: Clear any caching from your plugins, server, or CDN.
- Disable All Plugins: Temporarily disable every plugin on your site. Then try to edit and save your menu. If it works, reactivate your plugins one by one to identify the culprit.
- Switch to a Default Theme: Temporarily switch to a classic default theme like Twenty Twenty-One. Note: Some modern block themes remove the classic Menus interface under Appearance, so using a classic theme is necessary for this test.
Solution 3: Check for JavaScript Errors
Sometimes, an error in the browser's console can prevent the menu admin screen from working correctly.
- While on the Menus admin screen, right-click and select "Inspect" to open your browser's developer tools.
- Click on the "Console" tab.
- Look for any red error messages.
- If you see errors related to the menu script, it could indicate a conflict with a plugin or theme script.
When to Seek Further Help
If the solutions above do not resolve your issue, the problem may be more specific to your hosting environment. In this case, contacting your hosting provider's support team is the best next step. They can confirm your server's PHP configuration values and check for other less common limits that might be causing the problem.
By following these steps, you should be able to resolve the disappearing menu link issue and get your navigation back on track.
Related Support Threads Support
-
Menu Off Canvas – Change Menuhttps://wordpress.org/support/topic/menu-off-canvas-change-menu/
-
Primary menu items are blocked by the submenu item boxhttps://wordpress.org/support/topic/primary-menu-items-are-blocked-by-the-submenu-item-box/
-
nav-menus.php broken menu structurehttps://wordpress.org/support/topic/nav-menus-php-broken-menu-structure/
-
Adding Navigation Menu when several exist to A Navigation Blockhttps://wordpress.org/support/topic/adding-navigation-menu-when-several-exist-to-a-navigation-block/
-
How To Edit Top Menu Barhttps://wordpress.org/support/topic/how-to-edit-top-menu-bar/
-
menu items not showing the URL after adding from custom linkshttps://wordpress.org/support/topic/menu-items-not-showing-the-url-after-adding-from-custom-links/
-
Pages Not Reflecting In Menuhttps://wordpress.org/support/topic/pages-not-reflecting-in-menu/
-
Classic theme / menu questionhttps://wordpress.org/support/topic/classic-theme-menu-question/
-
Where is the Posts List Block?https://wordpress.org/support/topic/where-is-the-posts-list-block/
-
Menu inside an articlehttps://wordpress.org/support/topic/menu-inside-an-article/
-
Menu Linkshttps://wordpress.org/support/topic/menu-links-21/
-
checkout page in MemberPress shows my WP menu bottom lefthttps://wordpress.org/support/topic/checkout-page-in-memberpress-shows-my-wp-menu-bottom-left/
-
Menu Randomly Expands but Only on Front Pagehttps://wordpress.org/support/topic/menu-randomly-expands-but-only-on-front-page/
-
Editing Sub Menu of Home Pagehttps://wordpress.org/support/topic/editing-sub-menu-of-home-page/
-
Creating a drop down menuhttps://wordpress.org/support/topic/creating-a-drop-down-menu-7/
-
WordPress Menu widgethttps://wordpress.org/support/topic/wordpress-menu-widget-2/
-
2024 theme navigation block restricting access?https://wordpress.org/support/topic/2024-theme-navigation-block-restricting-access/
-
How to override Links font styling on Block themeshttps://wordpress.org/support/topic/how-to-override-links-font-styling-on-block-themes/
-
Dragging menu items into menu – no linkhttps://wordpress.org/support/topic/dragging-menu-items-into-menu-no-link/
-
How to assign a localized menu to a localized location?https://wordpress.org/support/topic/how-to-assign-a-localized-menu-to-a-localized-location/
-
How to add new menu item to menuhttps://wordpress.org/support/topic/how-to-add-new-menu-item-to-menu/
-
When add wordpress page in menu it converted in to custom linkhttps://wordpress.org/support/topic/when-add-wordpress-page-in-menu-it-converted-in-to-custom-link-2/
-
Trying to edit nav menuhttps://wordpress.org/support/topic/trying-to-edit-nav-menu-help/
-
Bulk select for Menus not workinghttps://wordpress.org/support/topic/bulk-select-for-menus-not-working/
-
Why is my main menu not aligning properly in the Newspaper theme?https://wordpress.org/support/topic/why-is-my-main-menu-not-aligning-properly-in-the-newspaper-theme/