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.
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:
I hope it helps.
- The topic ‘getting blank wp-comments-post.php after posting comments’ is closed to new replies.