How to get site URL if database is disconnected?
One option is setting the site’s URL in the wp-config.php file itself. This effectively overrides the siteurl option that’s otherwise stored in the database, but it also means you can reference the URL without doing a query. From the Codex: It is possible to set the site URL manually in the wp-config.php file. Add these … Read more