If we talk about web hosting for personal website, I believe everyone will face website traffic lost when their website receive high traffic. Let me tell my story about my experiences with web hosting for my personal website.
I was first begin to host my website entrepreneurs-success.com with Godady Deluxe Hosting which I pay $9.99 per month. With Godady when my wordpress website hits around 50000 pageviews per a day, my website is down because of run out of limit resource. we need to upgrade the resource to make the website up and running without downtime. Yes I lost visitors and money with godady.
Then I begin to search for solutions, I found Unlimited WordPress Pageviews Hosting called “Kinsta”. However Kinsta web hosting price is $100/months, I can’t afford for this kind of web hosting. Inspired by two articles “40 Million hits a day on WordPress using a $10 VPS” and “How My DigitalOcean Droplet Handles Heavy Traffic“, I began to host my website with Digitalocean Cloud Hosting with 10$ Droplet per months. I install my wordpress website on a $10 droplet. As a result my website encountered the problem “Error Establishing a Database Connection in WordPress” when my website hits around 100 to 200 visitors per second. I begin to search for solutions for Digitalocean droplet. Actually there are a lot of articles referring the solutions for high traffic website which include Vertical Scale and Horizontal Scale with Load Balancing, CDN, Caching etc which need pay more money for web hosting.
Finally I make a test with a 10$ Digitalocean droplet to reach its maximum capacity because I don’t want to spend more money for hosting.
Here are what I used:
1. Nginx and PHP-FPM
Nginx is a fast proxy server. I switched from Apache to Nginx.
For Nginx installation Read How To Install WordPress with LEMP on Ubuntu 16.04
2. Nginx fastcgi_cache, Redis, and
Using Nginx fastcgi_cache for page and browser, redis for object cache
3. WP Super Cache and Autoptimize Plugin for image cache
Install WordPress WP Super Cache and Autoptimize Plugin for website speed improvement.
Note: Don’t Use Any WordPress Plugin that require read/write to mysql database and 404 Redirect Plugin it will make your website can’t achieve this result.
Here is the Test Result with 1500 client per second with loader.io