• Resolved 2bears

    (@2bears)


    Hi all. Migrating a site from one host to another. The domain URL is the same on both.
    Tried using Updraft and Duplicator (to migrate the site), tried a manual rebuild of the site on the new server. But keep getting the following error msg: “ERROR: Cookies are blocked due to unexpected output” when using example.com/wp-login.php and the blank white screen when any other URL is used (ie; example.com/wp-admin/options-permalink.php).
    Front end works fine unless the www. is used in the URL (gives blank screen on front end) but the admin logon just shows the error. I have disabled all plugins with no luck. Debug mode doesn’t show anything. Searched and searched – Running out of ideas. Really appreciate some help.
    Site is here – site front end (bottom right button goes to blog)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter 2bears

    (@2bears)

    Found the problem – Child theme had a functions file with ?> at the end.
    Removed that and all appears to be working again. Still not sure why it worked on the old host but not the new one?

    I’m unable to login also and received the same error message. I’ve deleted my cookies on another browser to see if it will then work but got nothing.

    jjkob

    (@jjkob)

    Thank you so much for this thread! I had the same error, and deleting “?>” from the end of my child theme’s “functions.php” file also got my site working again.

    That said, I am a php noob and had my doubts about this solution as the “?>” I removed did not appear extraneous (i.e., I now seem to have one more opening “<?php” than closing “?>” in the file). Can you please explain why “functions.php” should not include the closing “?>” syntax?

    Thread Starter 2bears

    (@2bears)

    Hi jjkob
    Glad it helped.
    The reason is explained very clearly in this post –

    https://hardcorewp.com/2013/always-omit-closing-php-tags-in-wordpress-plugins/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Admin logon Error – Cookies are blocked due to unexpected output’ is closed to new replies.