how to optimize my wordpress to support lots of visitors

June 17, 2014 1k views
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
1 Answer
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 /var/log/messages ? 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
by Etel Sverdlov
LEMP stack is a group of open source software to get web servers up and running. The acronym stands for Linux, nginx (pronounced Engine x), MySQL, and PHP. This tutorial explains how to install the required repos to download nginx and php-fpm, how to install MySQL, how to install nginx, how to install php-fpm, how to configure php and nginx, and how to create a php info page. This tutorial is written for CentOS.
Have another answer? Share your knowledge.