Recently I realized that you could include a db-error.php file in your
wp-content directory from "How to monitor server for error establishing a database connection" that would replace the existing WordPress database error message with something custom. I thought about doing a redirect in db-error.php like:
header("Location: http://vader.com/saber.html"); exit();
but I wanted to replace
http://vader.com with the site URL so this could be portable but after researching I didn't see a way to obtain the site URL without the connection and I per discussions I was told you want to do minimal modifications to the wp.config file. Is there a way to get the site URL without a database connection that could be used in the header redirect?