WordPress Database errors on DigitalOcean

WordPress Database errors on DigitalOcean

The new droplet on Digital Ocean has been working really well. Much faster than bluehost, but I am getting an outage about once every two weeks. The droplet seems to hang with a “no database connection” message.

I normally just restart the droplet, but it is not good. The bluehost site would stay up for years literally with no issues. So time to debug.

https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/ is a good place to start. Says that when this happens, try the administration user interface located at `/wp-admin` to see if perhaps there is a problem with database corruption. A good idea.

To repair it, you need to hack at your wp-config.php and add the line

define(‘WP_ALLOW_REPAIR’, true)

Then you go to `wp-admin/maint/repair.php` and you can fix your database

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: