You ever remember seeing a screen likeΒ Error Establishing a Database ConnectionΒ on your site. This can happen for various reasons, but often users donβt know that their site is down. Also that page itself looks pretty ugly in itself. In this article, we will show you how to customize your database error page in WordPress. We will also show you how to setup a notification for every time your website goes down due to a database error.
Open a new file and save it as βdb-error.phpβ. Paste the following content inside that. Then upload the file in your /wp-content/ directory.
Source:Β CSS Tricks
If you want email notifications, then comment out the mail line. To comment it out, you have to remove // before the mail function. Feel free to customize the landing page however you like. Use theseΒ 404 design inspirationsΒ as a start.