I recently moved my Drupal 7 site to a new hosting server and I'm stuck at the login page. As soon as I try and log in, I get directed back to the same page, but the URL changes from /user
to /user/1
, which leads me to believe that I am actually logged in, but I'm not being forwarded to the correct page.
I tried cleaning my cache, emptying the cache tables in the DB but nothing helped.
Any ideas?
EDIT: To make things a bit more clear, I've used the specific server for various other Drupal 7 sites, so I know for a fact that the server configuration is not at fault here.
However, in February 2022, the Drupal 7 EOL date was extended again to November 2023. Going forward, there will be an annual evaluation on whether community support for Drupal 7 will be extended.
I suspect your $cookie_domain
in /sites/default/settings.php
is incorrect.
Try making it match your new domain and ensure there's a leading dot .
$cookie_domain = '.mydomain.co.uk';
Sometimes problems relating to logging in after a site migration can be because mod_rewrite was enabled on the first machine but not the second. A simple way to test this is to use the ?q= URL format (http://site.localhost?q=user) and see if you can log in like that. If that works then you can either disable clean urls from within the Drupal interface, or enable mod rewrite in Apache.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With