[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Trouble with warning in wordpress after moving from localhost to live server

Posted on 2011-10-10
Medium Priority
Last Modified: 2012-05-12
Hi Experts,

I am having trouble when migrating a wordpress site from localhost to live server on godaddy.  I have done the following:

1) Install a clean version of WordPress on the remote server
2) Move the WordPress databases and change the URL
3) Reinstall plugins instead of copying
4) Copy your theme and uploaded files

After upload, and doing the above, I am getting warning messages:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/e/d/neddynedson/html/easyweb/homecare/wp-content/themes/alliance/inc/right_news_widget.php:44) in /home/content/n/e/d/neddynedson/html/easyweb/homecare/wp-includes/pluggable.php on line 897

Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/e/d/neddynedson/html/easyweb/homecare/wp-content/themes/alliance/inc/right_news_widget.php:44) in /home/content/n/e/d/neddynedson/html/easyweb/homecare/wp-includes/pluggable.php on line 897

Also getting teh same warning messages on two plugins I am using...please advise what the problem could be?  Tried re-activating plugins and disabling still getting problems.
Question by:kasondeneddy
  • 3
  • 3

Author Comment

ID: 36942038
Now I cannot seem to access my wordpress admin, getting error:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/e/d/neddynedson/html/easyweb/homecare/wp-content/themes/alliance/inc/right_news_widget.php:44) in /home/content/n/e/d/neddynedson/html/easyweb/homecare/wp-includes/pluggable.php on line 897

The link is below:

LVL 111

Accepted Solution

Ray Paseur earned 1500 total points
ID: 36942170
Warning: Cannot modify header information ... almost always arises from an attempt to redirect the browser or set a cookie after some browser output has been sent by the script.  It is a law of HTTP that all headers (including cookies) must come first and be complete before there is any browser output at all, even including invisible whitespace.

I do not know why anyone would choose GoDaddy hosting instead of one of the technically competent hosting companies listed here.  Many hosting companies have good tech support.  Fortunately, if you have to change hosts to get good support, the lost money is not significant.  You might consider any of these hosts as alternatives.  They have telephone numbers and the people that answer the phone know what they are talking about.   You can call them up and ask questions or get help installing WordPress.

In any case, a Warning is not a fatal error.  So you might want to use "View Source" and see what the first characters of output were.  You may find a construct like this that can give you trouble.  Note that there is an invisible new-line character between the PHP scripts

<?php $x = TRUE; ?>
<?php $y = FALSE; ?>
<?php setcookie()... etc


Author Closing Comment

ID: 36943188
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 70

Expert Comment

by:Jason C. Levine
ID: 36943210
There's definitely some issue with that particular widget.  Which one is it?
LVL 111

Expert Comment

by:Ray Paseur
ID: 36943237
Why did you close this question with a bad grade?  Why not engage in a little dialog with the experts?  We want to help, but we cannot if you won't work with us here!

Author Comment

ID: 36945443
I used ob_start() inside the functions page, and the pages with those warnings coming up, I gave a B rating cause I looked into warning header issue and found an alternate solution which worked.  
LVL 111

Expert Comment

by:Ray Paseur
ID: 36945871
Suit yourself.  OB_Start() is a little like putting black electrical tape over the "check engine" light on your dashboard.  Something is wrong in this script.  You just don't know what or when it will really blow up.  With a little dialog we might have been able to help you find the real problem and the real solution.  Going forward, you might find EE more helpful if you do not disengage so quickly.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This article discusses how to implement server side field validation and display customized error messages to the client.
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchiā€¦
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month18 days, 22 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question