Solution:
There’s numerous ways to try and prevent such a thing from happening.
The first would be to place your site behind CloudFlare to ensure that the high traffic isn’t a DDoS attack. Cloudflare is free to signup too and will offer you some form of protection.
The second would be to ensure your database is as clean as possible, if it has a tonne of things in there that are of no use this can cause problems for you with query load times etc.
The third would be to download a plugin called WP Super Cache, this plugin will help massively with your site speed.
You then need to take a look at your host provider. This one’s important. Without a good host, a spike of traffic will see your site plummet. Yes, they will cost more, but you’ll not regret it when your site traffic is high and your site remains online.
These are just some steps you can take to try and improve your sites uptime. If you wish to take it even further I’d suggest Googling high traffic causing database to crash WordPress for other ways of downtime prevention.