Haven’t slept from last evening,know why? Exams got over and was prepared to do some real blogging.
But then I am not as lucky as you or may be you are not as lucky as me, Because I have had a real tough night searching for solution of one thing and that is what I am going to tell you about.
Before I begin let me make it clear the points that I stress upon are real worth as if I WOULD have followed them,would have been seeping tightly now (Of course with Mr Furhead(My Rat)
Things to do before you upgrade WordPress to latest version
- Make a complete backup of your data base(I know it takes time and bandwidth,but then why take chances to repent later)
- If you are using Thesis then you surely need to make a full backup of it as well.
- Never ever use note pad to edit any Php codes(You will come to know in a moment what it does to your Php codes)
So you upgraded have to wordpress and voila everything went fine and that’s it-If you fall in to this list of folks then please do keep visiting this blog or simply bookmark this page as who knows when you may need these tips about wordpress warning messages.
And if you are from the few lucky champs who are getting these error’s
Warning: Cannot modify header information – headers already sent by (output started at /home/what/public_html/wp-content/themes/thesis_/functions.php:1) in /home/what/public_html/wp-includes/pluggable.php on line 868
The file names (highlighted) may be different but the real culprit in this case is notepad and the error lies in your functions.php file or any file that you have edited in a note pad.
Note:-As I Know how these error crept into my php files I have deliberately reproduced them by simlply editing these files in note pad.
Here are a couple of screen shots of a view at php(after being edited in notepad) in note and stlyemaster(Now my only coding software)
Notepad viewsee the pink arrow-No bad codes visible
Stylemaster ViewStylemater shows the hidden bad codes
As you can see these the code in the first line is visible only in stylemaster and not in notepad.
This is where I Was caught and was getting agitated.
Now here are some way’s to get rid of these wordpress errors and warnings that I know of:-
- Open your function.php file in a reliable coding software and remove the hidden codes as shown in the picture above.(Worked for me)
- Open you wp-config.php file ( located in your wordpress root directory) and remove all the spaces before php tags.
What I Mean to say here is remove any spaces including any blank lines,just press delete till you reach the opening or closing php tags.Leave NO Blank spaces before <? php Leave NO space or blank lines after ?> code
Perhaps there may be many more methods to deal with this wordpress problem but these two are the only ones that don’t ask you to mess up your php codes.
After you follow these steps you may get another error from your wordpress blog,simply check the name of the first file again and remove the crap out of their.
Here I am telling you again do not use note pad to edit your .php files.
Hope this helps you and in case none of these work for you(I am sure that first one works like a charm) then please take note the of first file mentioned in the error/warning and just open it in your code editing software(not notepad)..
Get Free Blogging updates in your Email