• I have a WP site where saving a menu from admin is unacceptably slow. I’ve searched in this forum and on google and it appears this problem has been around for a while, but the solutions presented are one-off (probably unrelated) or anecdotal and not reproducible.
    The most recent post in this form says “its a chrome issue, use firefox’. I use both, behavior is the same

    The site has a menu with 64 items.
    – Saving that menu takes ~4:07 to 4.20 minutes.
    – Prior to adjusting php memory, max execution time (to 5 minutes) it would cause a 504 server timeout.
    – Firefox reports 4.37 of “waiting’ in the most recent profile.
    – We are on WP 5.3.2
    – We are running php 7.3.5
    – php memory limit 256MB
    – php max post size is 512MB
    – php time limit 300 seconds
    – php variables 25000 (yes, 25000, not 2500)

    These settings were made in desperation to allow a menu save.
    Please don’t tell me I need a bigger server – specifically dedicated hosting. The site is not large, 64 menu items is not many.

    Can anybody provide insight or suggestions. We paid significant money to have our existing site moved to WP, by recommendation of the company that did the work.

    Regards.
    bob

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dion

    (@diondesigns)

    Depending on your theme and plugins, attempting to save 64 menu items can choke a server.

    The _postmeta table is poorly designed for this operation and it requires an UPDATE for every meta value for every menu item. If your theme and plugins have created, say, 16 meta values for every menu item (not an unrealistic number these days), it will require more than 1000 database UPDATE queries to save the menu. That’s not a misprint…more than one thousand writes to the database.

    If your site is even slightly busy, I can easily see the menu save operation taking more than a minute, even on a reasonably-well-optimized MySQL installation on a VPS. On shared hosting? Five minutes would not surprise me, nor would your getting a warning from your host about excessive MySQL usage.

    If you are unwilling to upgrade your hosting, then your only recourse is to use a theme and/or plugins that create fewer meta values for menu items.

    Thread Starter bggann

    (@bggann)

    Thank you Dion. While I think this points out a fundamental flaw in WP – it is what it is. I will investigate hosting upgrades, but we are probably talking 10x cost for a site that frankly, should not require dedicated hosting. This is a menu save we are talking about – not some radical functionality for the customer on the front end.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Exceptionally Slow menu save from admin’ is closed to new replies.