• I upgraded to WordPress 3.9 yesterday but now I cannot post comments on the site. I get the following error:

    <b>Notice</b>: Undefined variable: _SERVER in <b>(URL)/wp-comments-post.php</b> on line <b>8</b>

    I have tried reinstalling 3.9 without success. I have also reverted to the default twentyfourteen theme and disabled all plugins which also has no effect.

    Can anyone suggest what might have gone wrong? The portion of code in wp-comments-post.php it is referring to reads as follows:

    if ( ‘POST’ != $_SERVER[‘REQUEST_METHOD’] ) {
    header(‘Allow: POST’);
    header(‘HTTP/1.1 405 Method Not Allowed’);
    header(‘Content-Type: text/plain’);
    exit;
    }

  • The topic ‘Cannot post comments after WordPress 3.9 upgrade’ is closed to new replies.