Fresh install OK, upgrading PHP 5.4 -> 7.3 fails with “Use of undefined constant WP_CONTENT_DIR”

On my HostGator shared hosting with a CPanel option to set PHP per domain, if I turn on PHP 7.3 (or other 7.x versions) for my existing blog I get an error page:

Warning: Use of undefined constant WP_CONTENT_DIR – assumed ‘WP_CONTENT_DIR’ (this will throw an Error in a future version of PHP) in /my_site/public_html/wp-includes/load.php on line 141
Your PHP installation appears to be missing the MySQL extension which is required by WordPress

If I Google this, all the advice is about how to install mysqld, but it’s surely already installed as doing a fresh install of WordPress on a separate sub-domain works perfectly under PHP 7.3, so I must be missing something in my older site’s WordPress wp-config.php, perhaps. Looking at working and failing versions, though, I cannot see an obvious difference.

Go to Source
Author: Ken Y-N