Best Wordpress performance

March 9, 2016 1.1k views
WordPress PHP Security CMS

Hi guys!
I would like to know what's the best way to create a droplet with the best setup to secure and have the best performance for a wordpress website. I want my wordpress to load fast (that's why I chose DigitalOcean over a shared hosting). Also I would like to know if its possible to install or have more than 1 website in a droplet.

Best regards!

1 Answer

Caching. Everything can be cached, even just for a few seconds. I could write an essay about the different caching strategies, but it all depends on how comfortable you are with different tools and what you need, as opposed to what you want.

My tool of choice is Varnish and Redis, but you generally want to understand some of the fundamentals of HTTP when dealing with Varnish, there are lots of gotchas. Using VCL (Varnish Configuration Language) that you found somewhere on Google is going to bite you in the ass, mark my word. So going down that route, make sure you take the time to understand how Varnish works.

You can (in theory) has as many webpages as you have disk space and memory to serve. There isn't a definitive answer to how many, but more than one, sure. More than ten, probably. All depends on the resources available and activity.

Security? Keep things updated, don't use plugins that aren't vetted and regularly receives updates. For things like Wordpress this is absolutely crucial. Exploits to the "core" are very rare, and when they happen patches are always right around the corner. A (usually) safe option is to turn on unattended upgrades (for the distro of choice) and make it apply security patches automatically. You can also use tools like needrestart to make sure that no processes are running older and vulnerable code.

When it comes to unattended upgrades you are trusting that someone know what they are doing. For most distros that is an assumption you can safely make when it comes to security. For regular updates it can be smart be more careful. But I doubt you'd have any issues.

  • Wow, thank you very much for answering! I've worked with shared hostings since my first website and they have always been slow in comparison to websites running in private servers (ofc) . Now I'm struggling trying to make my website faster, so that's why I decided to move to Digital Ocean.
    Is there any good tutorial where I could learn how to connect my domain, build my wordpress website, and use the tools you mentioned above so my wordpress runs fast and smooth? I would appreciate it if you can help me with that.

    And one last question, what plan should I pay if I'm going to be running just my company's website?

    P.S: What about & Cloudways?

    • While I agree 100% with the Varnish recommendation, that can be too daring for some people at first. You are just starting so is maybe to use a tool like , is a great tool to make things easier and has a lot and well documented information and how-to's. Give it a try, even free version is powerful for most your needs.

      Later on you can make it even better adding varnish to the mix.

Have another answer? Share your knowledge.