1/ Tìm và xoá khoảng trắng đầu trang cũng như cuối trang trong file: wp-config.php, functions.php
=> Bạn kiểm tra lại nếu hết lỗi rồi thì đã oki
=> Nếu chưa hết lỗi bạn làm tiếp theo cách bên dưới:
2/ Upload file: wejnswpwhitespacefix.php trong thư mục gốc trên host của bạn, thường sẽ là thư mục: httpdocs, public_html
3/ Trong thư mục gốc trên host bạn tìm file index.php và thay lại bằng đoạn code bên dưới!
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
include("wejnswpwhitespacefix.php");
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
=> Bạn kiểm tra lại nếu hết lỗi rồi thì đã oki
Bạn có thể xem bài viết gốc của tác giả: https://wejn.org/stuff/wejnswpwhitespacefix.php.html