Follow @BPSPro

WordPress Error – Warning: Cannot Modify Header Information wp-config.php Error

1 Comment RSS Site Feed Author: AITpro Admin
Published: May 14, 2010
Updated: October 6, 2012

The orginal question was regarding a generic WordPress error “Warning: Cannot Modify Header Information…wp-config.php error”.  The answer contains troubleshooting steps you should take to find the root cause for the WordPress wp-config.php error message.

These are the top 3 most likely problems that are occurring.
1. Before checking the other 2 possiblities check to see if your WordPress website has been hacked first. Open your WordPress website in Firefox and use Firebug to look at what scripts are loading. View the page source code to look at your code. Typically hackers inject XSS script into the bottom of your WordPress web pages and WordPress .js files.
2. You have “whitespace” somewhere in your code in the WordPress wp-config.php file.
To fix this find and remove the whitespace from the file. Read the error message carefully. It says “output started at …” followed by a file name and a line number. It gives you the file and code line to look at. That is the file and code line you need to edit. Ignore the second file name it is just telling which “include” file was called after the problem already occurred with the original file. The first file is the one you have to edit, not the second one. It looks like it is your WordPress wp-config.php file. one thing to note is that the second file is wp-login.php so this could indicate that you have incorrect SQL DB info in WordPress wp-config.php.
3. This is the least likely answer as this would typically generate a 500 server error instead of a header error. Check your WordPress header.php file for coding errors and manually deactivate any login plugins like Theme My Login or other simlar login plugins. Manually deactivate WordPress plugins by FTP’ing to your WordPress website plugin folder and renaming the plugin folders. Just add an underscore in front of the plugin folder names. Now once your WordPress login plugin has been manually disabled try and access your admin login > http://www.yourdomainname.com/wp-admin/admin.php. If you can’t get in now then manually deactivate ALL of your WordPress plugins and try again.
4. Assuming that all your attempts to access WordPress have failed you will need to login to your host’s control panel and go to MySQL and export (make a WP DB backup) your WordPress SQL Database because you are most likely going to have to reinstall WordPress again. After you have installed WordPress again it should be safe to import (restoring your WP database) your exported SQL DB back into the new SQL DB that was created for you when you reinstalled WordPress. CHECK THAT SQL DB FOR ANYTHING THAT SHOULD NOT BE THERE!!!! Typically hackers will generate a new table that piggy backs your WordPress SQL DB instead of putting malicious table data directly into your WordPress SQL DB. Look for any unusual table names and clear all data from that or those tables. Good luck.
Official WordPress Editing wp-config.php Resource Page

Tags: ,

Categories: Wordpress Tips - Tricks - Fixes

1 Comment to “WordPress Error – Warning: Cannot Modify Header Information wp-config.php Error”


  1. […] Plugins You Will Ever FindTop 10 most useful WordPress PluginsTop 10 most useful WordPress PluginsWordPress Error – Warning: Cannot Modify Header Information wp-config.php Error #logo .site-title, #logo .site-description { display:block; } body […]


Skip to toolbar