Question

how to optimize my wordpress to support lots of visitors

  • Posted on June 17, 2014
  • jhoedramAsked by jhoedram

hi all

I created my website with wordpress with great effort and launched my post, I have a dropplet with 1GB of ram (centos 6.4), but many times I could not access my site, because it has fallen, then I had to restart the machine so that it can be solved.

I get about 100-200 visitors a day there are times when visitors are concentrated in 80 parallel visits, ie 80 users accessing at the same time, my vps has fallen 2 times, my question is: How can I prevent these falls or can properly manage these recuros?

I hope you can help me and thanks


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.

That isn’t too much of a load. A 1 GB droplet really should be able to handle that. Are you seeing any error messages when it crashes? Is there anything interesting in <code>/var/log/messages</code> ? We can give some general advice, but getting to the bottom of this exact issue would probably be best.

More generally, there is a chance MySQL is running out of memory. In order to give it some extra breathing room, you might want to add a swap file:

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-6

You may also consider moving to Nginx as it is more lightweight than Apache. Check out:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-6

Setting up caching with something like Varnish is also a good step:

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-nginx-php-and-varnish-on-ubuntu-12-04

Less specific to your issue, one way to scale out is to add a separate database server:

https://www.digitalocean.com/community/tutorials/how-to-optimize-wordpress-performance-with-mysql-replication-on-ubuntu-14-04