Increase site speed for wordpress site and eliminate error establishing connection to database

December 22, 2014 1.2k views

I have a 10gb droplet running a wordpress site. I've always had the 'error establishing connection to database' error, which I discovered came from mysql crashing (no idea why). Every time it happens I have to restart mysql and the site comes back online. I figured it was due to low memory and followed the swap file tutorial -- still have the problem.

Additionally, the site has significantly increased in traffic (10x growth in the past week) but still under 5k visits a day. This has resulted in site slowdowns and a higher frequency of the database error (up to 5 times a day, unbelievably frustrating) Should I upgrade my droplet to a larger size? How can I increase site speeds and eliminate the database error (all login credentials in wp-config are correct).

1 Answer

Would you mind providing a link to your wordpress site ?
You could try installing mysqltuner to optimize your mysql settings.

Have another answer? Share your knowledge.