Title: getting blank wp-comments-post.php after posting comments
Last modified: August 20, 2016

---

# getting blank wp-comments-post.php after posting comments

 *  [phpsailer](https://wordpress.org/support/users/phpsailer/)
 * (@phpsailer)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/getting-blank-wp-comments-postphp-after-posting-comments/)
 * If you are getting a blank wp-comments-post.php file most probably you have a
   space that is a ” ” in one of your files. Therefore, the last line of wp-comments-
   post.php can’t redirect properly and exit() is returned which means a blank page.
 *     ```
       wp_safe_redirect( $location );
       exit;
       ```
   
 * I am talking about lines above in wp-comments-post.php.
 * Solution:
    Remove the empty space. How to find it? Most probably yo have forgotten
   an empty space or empty line in one of the files that you often edit. In my case
   it was the functions.php of my theme.
 * If you can’t find it the quickest solution will be to put the following line 
   at the very top of your wp-comments-post.php file:
 * `ob_start();`
 * like this:
 *     ```
       <?php ob_start();?>
       ```
   
 * I hope it helps.

The topic ‘getting blank wp-comments-post.php after posting comments’ is closed 
to new replies.

## Tags

 * [blank-page](https://wordpress.org/support/topic-tag/blank-page/)
 * [wp-comments-post.php](https://wordpress.org/support/topic-tag/wp-comments-post-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [phpsailer](https://wordpress.org/support/users/phpsailer/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/getting-blank-wp-comments-postphp-after-posting-comments/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
