Upgrading PHP version results in “Use of undefined constant WP_CONTENT_DIR” warning?

Here’s what worked for me: My Hostgator WordPress site was throwing the same error until I commented out the top-level .htaccess file. Like so:

I commented out the PHP default settings

My website is a subdomain, so it had it’s own .htaccess, so that’s where the php version was specified (cpanel did this automatically). I didn’t have to edit wp-config.php or anything else.

In the comments of this post is where I found this solution:

https://wordpress.org/support/topic/php-7-3-errors/#post-12720824

Leave a Comment