Knowledge Base

Warning: Cannot modify header information – header already sent by

You are using WordPress website normally, but for some reasons your website meets the issue as follows “Warning: Cannot modify header information – header already sent by ” You are so confused and you don’t have information for knowing how to fix this issue.

In this article, we will describe clearly and find the way to fix this issue on your website.

Reason of issue

This issue usually happens in wp-config.php or functions.php because both files are most frequently edited by users. If you edit a theme file, but it is not function.php file, it’s highly possible that the error is from the file you have just edited.

Solution

Use your FTP program to login to your website.

Navigate to your file, download wp-config.php

Open up wp-configure.php file with your favourite editor, and remove all spaces before “<?php” and after “?>”

Upload and replace.

In addition, if the solution above cannot help you to fix this issue. You are unable to locate the error, and unable to fix it. The issue can come from your third party plugins. You can disable all plugins to see if it fixes your issue. If indeed it’s caused by a plugin, you can start finding it by enabling one plugin at a time and re-loading your website.

After you have found the plugin that’s causing this issue, you will need to disable it and report this issue to the plugin author.

Hopefully, this article will give you solutions to fix Warning: Cannot modify header information – header already sent by issue. Don’t forget to share this article if it is helpful for you.