Categories
WordPress

Warning: Header may not contain more than a single header, new line detected in XXX

home_url和site_url的值有错误,

WordPress – Header may not contain more than a single header

Problem: Warning: Header may not contain more than a single header, new line detected.

Case:There is a space after the site or home URL.

Fix:
Method 1 (recommended)

  1. Click Settings in your WordPress DashBoard.
  2. Click on General.
  3. Make sure that their isn’t a space after the two URLs in the WordPress address (URL) and Site address (URL) text fields.

Method 2

  1. Login to phpMyAdmin
  2. Go to the wp_options table.
  3. Find and edit the records for “siteurl” and “home”, make sure they do not have any spaces after.

Or optionally, on Method 2, you can go into phpMyAdmin and run this SQL query(replace www.domain.com with your domain):
UPDATE wp_options SET option_value=’http://www.domain.com’ WHERE option_name=’siteurl’ OR option_name=’home’;

http://support.hostgator.com/articles/specialized-help/technical/wordpress/wordpress-header-may-not-contain-more-than-a-single-header

Leave a Reply

Your email address will not be published. Required fields are marked *