1. Knowledge Base
  2. >
  3. Results
  4. >
  5. WordPress - Header May Not Contain More Than a Single Header

WordPress - Header May Not Contain More Than a Single Header

The following error is caused by a space after the site or home URL in the WordPress database:

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

To fix this error, you can make changes to the site or home URL from within the WordPress Dashboard or through the WordPress installation's database.


Fix URLs within the WordPress Dashboard (Recommended)

To fix the home and site URLs from within the WordPress Dashboard:

  1. Log in to your WordPress Dashboard.
  2. In the left-hand menu, navigate to Settings, then click on  General.

    WordPress General Setting

  3. In the WordPress address (URL) and Site address (URL) fields, ensure there are no spaces after the URLs.

    WordPress Home &s Site URL

  4. Click Save Changes.

Fix URLs within phpMyAdmin

Option 1: Manually Edit Database

To manually edit the site and home URLs within your WordPress database:

  1. Log in to cPanel.
  2. In the Databases section, click on the phpMyAdmin icon.

    HostGator cPanel phpMyAdmin

  3. From the left menu, select the database for your WordPress installation.

    WordPress Database Name

  4. From the left menu, select wp_options.

    WordPress Options

  5. Find and edit the records for siteurl and home, ensuring that there are no spaces after the domain name.

    Home and Site URL

Option 2: Run an SQL Query

As an alternative to manually editing the database as described above, you can run an SQL query in phpMyAdmin to update both fields (site and home) at one time. To do this:

  1. Log in to cPanel.
  2. In the Databases section, click on the phpMyAdmin icon.

    HostGator cPanel phpMyAdmin

  3. From the left menu, select the database for your WordPress installation.

    WordPress Database Name

  4. From the top menu, click on the SQL tab.

    SQL Tab

  5. In the text box, enter the following query, replacing www.domain.com with your domain:
    UPDATE `wp_options` SET option_value='http://www.domain.com' WHERE option_name='siteurl' OR option_name='home';
  6. Click on the Update button.

    SQL Query

  7. Click on Go at the bottom right.

Need additional assistance? Please contact us via phone or Live Chat so we can assist! HostGator's Support is here to help.