Tech-Fit Technologies - WP Errors
How to Fix Warning: Cannot modify header information – headers already sent Error Message in WordPress

After transferring my WordPress site to a new server, I received this error when trying to log in to the WP-Admin panel

Warning: Cannot modify header information – headers already sent by (output started at /home/nnnick/public_html/nickroshon.com/wp-content/plugins/wp-security-scan/scanner.php:63) in /home/nnnick/public_html/nickroshon.com/wp-includes/pluggable.php on line 890

I had no idea what that means, but without being able to log in to the Admin panel it was a little hard to get rid of it. At first I thought about just going in and deleting the plug-in referenced above and seeing if that would work (it did work, although there were many other plugins that were also causing this error, as well as the theme itself, which I didn’t want to delete!). Given I didn’t want to delete all of my plugins as well as the theme itself, I began exploring other options.

Upon doing a Google search for this error, I found many helpful articles, but none that were quite helpful enough – they give tips, but some of the details were a bit fuzzy. This post on WPContempo, as well as these two posts on the WordPress.org forums (1) and (2) were helpful, and explained that:

You likely have an extra white-space or line at the beginning or end of your WP-Config file. Open your WP-Config file and delete an extra white-space at the beginning or end of the file, then delete it.

That is mostly correct, but a little unclear and didn’t totally fix my problem. Here is the dumbed down explanation.

  1. You probably do have extra lines at the beginning or end of a file, although it isn’t necessarily your WP-Config file. If your error message looks like mine above, it is in a specific file related to a plugin, theme, or another add-on to your WordPress install, although it’s possible your WP-Config file also has extra white space too. During the transfer of your site, some of your files (for whatever unknown reason) grew a few mysterious empty lines at the beginning or end, which screws everything up…  
  1. To find the files with the extra lines, look at the error message itself, as it will tell you exactly which file is causing the issue. At the example at the top of this post, “Warning: Cannot modify header information – headers already sent by (output started at /home/whatwhat/public_html/mydomain.com/wp-content/plugins/wp-security-scan/scanner.php:63) in /home/whatwhat/public_html/mydomain.com/wp-includes/pluggable.php on line 89″ the part bolded is the cause of your problem. It is telling you the Scanner.php file has an extra space on line 63, which happened to be the last line of the file (and sure enough, it was blank).
  2. To fix it, either connect to your site via FTP, or through the File Manager in your cPanel (note: connecting via FTP is better as the cPanel may add extra lines itself, although I had no problem doing this through the cPanel myself). Within either your FTP or cPanel File Manager, navigate to the location of the file causing the problem (public_html/mydomain.com/wp-content/plugins/wp-security-scan/) in this example, and then open the file name referenced (scanner.php). Look for the line number after the colon, again in this example line 63. Remove the extra lines starting at that line number, and then save the file and close it.
  3. Try reloading your WP-Admin page. Chances are you’ll see the same error message again, only a new file is causing the problem…repeat steps 2-3, looking for that exact file and line number and removing spaces. With one of my rather customized blogs I had to do this probably 10 times before I could get rid of all the error messages, but eventually, I had corrected all of them, and am now able to log in to my WP-Admin just fine!

And that’s it – I hope this was helpful to others out there that may have had some problems like me. It is definitely something you can figure out, even if you’re not an expert programmer – you just need a little patience as it is a tedious process of hunting for extra spaces and lines.

Don't wait. Just go for it - idea.
Act now on your idea!!

Whenever you get an idea you need to act on it as soon as possible. Waiting will not yield any results. From the minute you get it and you think you’re onto something, that’s the time you’re supposed to act. One thing we have to realize is that when humans were created they were made into thinking beings, so to anyone on the face of the planet, ideas are bound to come. The one difference between those who succeed and those who don’t is how soon they decide to act on their ideas.

The great inventors of old began working on their ideas early, even when it wasn’t fully mature. For example, the Wright brothers Orville and Wilbur, made the aeroplane because the idea of a flying machine was in their head, though it wasn’t fully formed, the fact that they started working on it is the reason why we have the Boeing 707 and the Blackbird (fastest plane ) today, who knows the world could be depending on that idea you’re sitting on. Interestingly the Blackbird SR-71 is still the fastest plane ever made since the 1950s, before the computing power we currently have today. Goes to show the depths a human mind can go.

How we started

In starting this company, Tech-Fit Technologies, we were fresh out of University with little to no industry experience bar the 1 year attained during our internships and me (Sindiso) and a friend of mine (Busa) decided, we didn’t have to be sitting around and waiting for jobs to come when we had combined knowledge of electronic engineering and computer science in our heads and we decided to start a company. We definitely knew something about programming, software development, networking and web development, though it wasn’t the deepest knowledge in it but we knew, we had an idea and that was in 2016.

Fast forward 3 years later, 2019 and we a fully functioning company with primary focus on Web development, digital marketing and company branding, we make elegant and professional websites now and have helped a lot of companies gain customers, establish their brands and make a lot of money. The likes of Mashonisa Loans, Silk Beauty Salon, McGeralds and many more but if we hadn’t started back then in 2016 who knows where it may have been.

Great examples

I can give more examples, from the likes of Mark Zuckerberg who knew he had a great idea (debatable) but in the creation of facebook he was certain he was onto something that’s why he didn’t wait until finishing varsity, he started executing it right there and here we are today with Facebook. Steve jobs wanted a smaller computer, he went on and started working on it. Bill Gates was studying law yet he had interest in the computing industry, he didn’t wait, he just went for it. The list can go on and on and to the likes of Amancio Ortega (founder of Zara), Warren Baffet, Jeff Bezos they all those billionnairs had an idea, though not fully formed they worked on it.

I could have given more examples but the idea is this, everything you see on this earth started with an idea. It is safe to say the world is made up of ideas but ideas are nothing if you don’t put work to them. Nike says “Just do it”, Dan Pena says it in a harsher way but you could be sitting on the next solution to change the world, next billion dollar idea but you wouldn’t know unless you take asction . Don’t hesitate, work on it. That’s why we at Tech-Fit Technologies say – Don’t wait, just go for it.

Terms & Conditions

WhatsApp chat