Hi,
Line 20 uses $_SERVER[‘DOCUMENT_ROOT’], causing the same problem as line 21.
Line 21 would be better to get the public folder.
A solution would be using a relative path starting from the __DIR__ or __FILE__ (dirname(__FILE__)) constant.
For example:
$wordpress_loader = __DIR__ . ‘/../../../wp-load.php’;
or
$wordpress_loader = dirname(__FILE__) . ‘/../../../wp-load.php’;
Even better would be using a WordPress endpoint.