230 posts Premium Website Design
  • Interviewed on the Envato Notes blog
  • Power Elite Author
  • Referred between 500 and 999 users
  • Power Elite Author: Sold between 2 000 000 - 4 999 999 dollars
  • Exclusive Author
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
ThemeFusion says

Hey,

Navigation menu on our theme demos can be very resource hungry especially considering their number of menu items in a menu and the traffic sent from Envato. It can be a dreadful combination for the server.

We were facing this same problem quite regularly but with the help of a fellow author, Asad Khan ( http://themeforest.net/user/ThemeSphere ), came up with a simple solution to cache the navigation menus. This has helped us majorly and our CPU and memory requirement is decreased by more than 50%.

Here is the plugin, https://github.com/mharis/wp-cache-nav-menus

I hope you find this useful.

Install this on top of a cache plugin for best results.

- Muhammad

1088 posts The Last Man Standing
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Exclusive Author
  • Bought between 10 and 49 items
  • Sold between 50 000 and 100 000 dollars
  • Beta Tester
ImanGM says

Hey!

Thanks for sharing :) Does this plugin help us to sell like you too? ;)

Cheers, Iman

1315 posts
  • Elite Author
  • Has been a member for 5-6 years
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a Free File of the Month
  • Referred between 200 and 499 users
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
+1 more
fuelthemes says

Doesn’t other cache plugins handle this? Like WP Super cache for example?

186 posts
  • Bought between 100 and 499 items
  • Contributed a Tutorial to a Tuts+ Site
  • Elite Author
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 50 000 and 100 000 dollars
Artillegence says

I was facing this problem as well, I had a huge menu (150 items + mega menu) for coming theme. This is working like a charm thanks for sharing guys :D

1068 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 more
Smartik says

Thanks for share. I was never thinking to use Transients API, but after reading something about them on WP Codex I think I got some good ideas for use. :P

491 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

Why not using Super/Total cache instead ? with page cache enabled and mod_rewrite, there won’t be any php/mysql involved at all since it would be exactly like serving a static html page.

BF

77 posts We are CreateIT. We create IT.
  • Author had a Free File of the Month
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Exclusive Author
  • Has been a member for 2-3 years
  • Envato Studio (Microlancer) Beta Tester
  • Poland
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
createit-pl says

Why not using Super/Total cache instead ? with page cache enabled and mod_rewrite, there won’t be any php/mysql involved at all since it would be exactly like serving a static html page. BF

We were having hard time with Super/Total cache and any other plugins like that. The main problem was, that it was operating on the same abstraction layer as the rest of WordPress content. Since we have multiple servers around the world, it was a management nightmare to find where given content comes from, if it’s still from cache or not etc.

What worked for us, was setting two servers (well in fact more :-)): one with full environment for WordPress (mysql, apache and other stuff) and the other one with only nginx installed, acting as reversed proxy. This is extremely fast and supereasy to manage :)

createIT

31 posts
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Envato Studio (Microlancer) Beta Tester
  • Referred between 1 and 9 users
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • India
TheMetroGuy says

Thanks for sharing.

And this will be the epic reply for this thread!


Hey!

Thanks for sharing :) Does this plugin help us to sell like you too? ;)

Cheers, Iman
491 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

one with only nginx installed, acting as reversed proxy. This is extremely fast and supereasy to manage :)
Yeah, nginx + proxy_cache stuff would do it as well. We have a simpler setup as in all previews are hosted on the same server/wp network install so a caching plugin was the easier solution for us.

BF

77 posts We are CreateIT. We create IT.
  • Author had a Free File of the Month
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Exclusive Author
  • Has been a member for 2-3 years
  • Envato Studio (Microlancer) Beta Tester
  • Poland
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
createit-pl says


one with only nginx installed, acting as reversed proxy. This is extremely fast and supereasy to manage :)
Yeah, nginx + proxy_cache stuff would do it as well. We have a simpler setup as in all previews are hosted on the same server/wp network install so a caching plugin was the easier solution for us. BF

amen :) The best solution is the one that fits you best :)

createIT

by
by
by
by
by
by