Error cookies blocked after migration

Hi there,

I am unable to succesfully migrate a website to a new server (same domain)
After migrating it (I have tried both manually (export of db and files --> import into the new server) and with all in one migration plugin) I am unable to login.

at the url mydomain/wp-admin the page is blank
at the url mydomain/wp-login.php I get an error message about my cookies blocked
It happens with any browser.

Since fortunately I was already logged in with firefox before moving the dns. Somehow I can access the beckend. I just have to be careful not to close that browser. Loggin in again would not be possible (I tried and I had to migrate again)

I have created a user for you. Hope you can find a way to log in and guide me in the right direction to solve it.

Hi Carlo,

Thanks for reaching out.

I’m not seeing any cookie related error, but a lot of warnings about deprecated functions and headers info. Are you moving an old site to a new system? Or a new site to an old system?

For that, I recommend manually upgrading your Wordpress core as it seems outdated and not working on the current system https://codex.wordpress.org/Upgrading_WordPress#Manual_Update

Then deactivate the plugins related to Achievement widgets, though I’m not sure what it’s since it says it’s deprecated since 4.3.0, perhaps you’re on very old Wordpress?

Thanks!

Hi Rad,

thanks for replying,

  • are you saying you were able to login at mydomain/wp-login.php (see the right domain in the previous secure note)?
  • I am moving from an old server to a new one
  • at the moment of moving, wordpress version in the website was the latest
  • I’ve just tried to manual update but now I am not able to login anymore even with firefox
  • If I try to login with chrome / Explorer / Edge, I still got the cookie blocked error
  • Can you see the error right now? Or can you login? (…/wp-login-php)

Hi Carlo,

No, we cant login because of this error:



Please do this: login to your server via FTP and navigate to this directory /public_html/yourdomain.com/wp-content/ and rename the plugins folder, this will deactivate all your plugins. Now try to login, if it works then you know its a plugin that is causing the issue,

Navigate back to /public_html/yourdomain.com/wp-content/ and rename the folder back to plugins, then back to your admin dashboard > plugins, activate the plugins one by one and see which plugin cause the error.

If that did not work, please go back to FTP and navigate to this directory /public_html/yourdomain.com/wp-content/themes/pro-child/ find the file functions.php, open/edit it (but keep a backup of it), and make it a clean slate, remove all your custom functions in there, the issue could be coming from there. The content of your child theme’s functions.php file should only this:

<?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X Pro in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );



// Additional Functions
// =============================================================================

Actually, do the functions.php file first before the renaming of plugins folder to save you from re-activating the plugins if in case the issue is really coming from the custom functions.

If none of that works please provide us FTP credentials in a secure note so we can take a closer look.
By the way, how did you migrate your site? what plugin did you use?

Thanks,

Thank you Rad, test done.
To be clear, I also added 2 previous step.
Here’s what I did:

  • back to the OLD SERVER:
    – Deactivated and deleted the Wpachievement plugin
    – Deactivated some non primary plugins
    – Deleted most of the deactivated plugins
    – updated all the plugins and the wp core. To be sure everything was up to date

OUTPUT OF DEBUGGING (Wp_debug set on true) : No error messages showed up, absolutely clean

– exported the site with all in one wp migration
– changed the dns ip, pointing to the new hosting server

  • NEW HOSTING SERVER (By the way, it’s the same provider)
    – deleted all the db tables and the files’ main directory
    – installed a brand new wordpress installation
    – installed all in one wp migration plugin
    – imported in all in one migration plugin the file previously exported
    – when importing was done, got the usual success message, saying to save twice permalinks settings
    – click on the link in order to save permalinks but got blank page
    – I am not able to login again
    – Error message: Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/xxxx/wp-content/themes/pro-child/functions.php:1) in /home/xxxxx/public_html/xxxxxx/wp-includes/pluggable.php on line 1223
    cleaned functions.php and inserted the code provided by you: no success
    renamed plugin folder: no success

Please find in the secure note the ftp credentials I have prepared for you.
Thank you again for your support

Hi Carlo,

Perhaps the FTP is for different folder or site? The child theme functions.php is correct and I added a code to see if it’s taking effect and it’s not. That could be the reason why the fixes aren’t working, it’s added on different FTP.

Thanks!

Hi Rad, I double checked, it’s the right ftp:

With the credentials I gave to you, I tried this:

  • with the plugins folder renamed as temppluginstemp, the menu (that is ubermenu) shows only the following shortcode " [ubermenu config_id=“main” menu=“3”] "

  • with the plugin folder correclty named (plugins) the top central menu works correctly again (I corsi, per le aziende, chi siamo)

Maybe your changes did not take effect since the plugin folder’s name was still temppluginstemp?
Now I correclty renamed it again. Could you try again?
You could also double check yourself that if you rename the plugin folder yourself, the top menu should again show [ubermenu config_id=“main” menu=“3”]

EDIT: I have just noticed that

  • if the site url starts with http --> the page is blank
  • if the site url starts with https --> the page is visibile, but /wp-login.php shows the blocked cookies error message

Thank you

Hello Carlo,

I have change the name of your child theme so that we can log in. The problem now is that the given WP credentials is not working for us. Could you please double check and give us the updated WP login credentials?

Thank you.

Hi @RueNel,
I could login and recreate your user as in the first securenote with same password.
Tested it and working.
Could you try again please?

Thank you

Hello Carlo,

I have logged in and check again. I was able to logged in.
I found this:

Please check your site again.

Hi @RueNel,

I have double checked the original functions.php (I took it from the old server installation)
It’ really weird, since opening it with dreamweaver there is no blank space.
Then I copied / pasted the content from the functions.php you uploaded into the old file, replaced your file with the old one (but with your content, so it was supposed to be working) and… broken site again…

It’s something I cannot explain but, anyway, here what I did next, in case someone else should have the same problem:

  • downloaded a new “official” child theme folder from themeco’s website
  • backed up style.css and functions.php from my webiste (the only 2 files I had customized)
  • replaced the entire child theme folder
  • opened the old functions.php and copied just the customized part into the new functions.php
  • copied and pasted the style.css file into the new folder (replacing the new file)

Now everything i s working.

Thank you guys for your precious support… as usual :slight_smile:

Glad it’s now working and thanks for sharing. Maybe it’s due to your editor and there are hidden characters. Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.