Best configuration for wordpress based site

  • Posted on October 23, 2014
  • allkinAsked by allkin

Hello! Since I switched to digitalocean, I started to read some guides and tutorials to optimize wordpress for best performance when it comes to caching,but I found so many opinions, I don’t know which to follow. Some say apache, others nginx. Memcache, varnish,nginx reverse proxy with apache, w3 total cache, xcache,APC,self hosted cdn from subdomain,apache’s mod-cache with disk-cache and memcache,etc. There are so many options… I understand that each one of them serves a specific purpose, but I just want to hear some clear opinions. Which is in your opinion the best option for a wordpress site with a lot static content, videos(embeded not self hosted), pictures, with over 5000 visitors/day and the 10$ price plan. Should I go with memcahed option even If I have 1GB memory, or disk cache even If it’s slower? What was the best config for you? From what I understand, nginx is the right choice when it comes to static content, but what should I add with it?Varnish,xcache,memcache?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

When you’re using a reverse caching proxy it doesn’t really matter what you’re using on your backends. As long as you’re familiar and used to it, it’ll do. I prefer Nginx, simply because the configuration is a lot more clear.

Now - back to all the other names you’ve dropped. Most of them do more or less the same, just with a slightly different approach. I doubt you’ll see much difference between XCache and APC, they are both opcode caching.

Memcached is cool if you have multiple nodes and want a shared cache, but given that you only have one, I don’t really see much gain in using it as a key value store over, say, APC. APC is both a key value store and opcode cache.

Using a different (cookieless) sub-domain for a pseudo-CDN can give you slightly faster load times as you trick the browser into opening more connections in parallel to your server. I wouldn’t spend much time on this before you’ve settled on a proper reverse cache and chosen a opcode cache.

You can never go wrong with Varnish, but it adds a little complexity to your stack. If you have more or less only anonymous traffic (ie. not logged in) Varnish will solve all your issues, as long page renders will hardly ever occur anyway. There is also a plugin to Wordpress that integrates it with Varnish, so you can clear the cache when posting new articles and such.

As @vegardx already explained a good way to load your WordPress based website faster however only server configuration can not make your WordPress site fast… Your can use Free WordPress CDN which can decrease your loading speed 3 times. It based on W3 Cache plugin self hosted Content Delivery Network

Simply put,

nginx with it’s built in caching.

This negates the need for any back end tweaks or extra processes like memcache etc.

If you have lots of logged in content then I would run the latest and greatest php5-fpm which already has zends opcache built in. The opcache will cache all php queries from nginx which should speed things up nicely while keeping cpu processes down.

The above setup should negate the need for you to mess about with mysql although you should make sure that the mysql query cache is enabled :)

Good luck