This year was a great year for me and traffic have been pouring to some of my sites. However, this also leads me to a lot of issues encountered on the website. From regular server downtimes, slow responding websites to frequent server restarts. I am really concerned about it and made some changes on my site and to my server to adapt to the new challenges of traffic craze.
Here are some of the things I’ve done to cope with these changes.
- I upgraded my database server from MySQL 5.6 community edition to Percona 5.6. Percona is a MySQL drop-in that contains features which can only be found on the enterprise edition of MySQL. Honestly, I did get a hard time tweaking the configuration of my MySQL but then with the tips I found from Percona’s blog, I finally tune it to the music that I want for my site. I really like its hot backup script (Percona XtraBackup) as it made the backup routine much simpler and easier.
- I optimized the custom SQL query in my theme. Tweak it to execute much faster and utilize memcached to cache complicated queries.
- I disable and delete permanently all the plugins that I am not using. It saves me disk space and speed up my site because it removes all unnecessary WP actions that the site does not actually need.
- Subscribe to Cloudflare Pro and activates WAF (Web Application Firewall). It costs me about $20 for the first site and $5/site for the other sites. CF’s WAF helps me block unnecessary traffic from bots and malicious attacks.
- I installed varnish in front of my website. Varnish is a HTTP accelerator that really speed up my site. Read more about Varnish 3 with WordPress at Bleuken.com.
- I disabled the built-in WordPress cron (WP-CRON) and replace it with the actual cron which I configure to execute every 5 minutes.
- I utilized the SSD features of DigitalOcean to drastically improve the loading of one of the project I’m handling, specifically the www.serzf.com. Click on the site to see how fast it is compared to other WordPress sites.
Right now, I am still encountering some slow down specially if I’m running bulk inserts for the site but these steps dramatically improve the loading of each site and it made my site to handle much more traffic compared to the previous configuration of my server. I am still working some tweaks to improve the “write” routines of my site and I’ll add them here later on my next update.