I've migrated my client's Craft site to a new host. On the front end the site is fine and working as it should.

The problem is with the Craft admin area. I can login, but once logged I can’t access anything other than the main dashboard screen. Clicking any of the links within the dashboard brings up the login screen.

One thing I did try was to remove the cpTrigger I’d set in /craft/config/general.php. For a moment I thought this had worked. I could access other areas of the dashboard, but then the dashboard logged me out after a minute or so.

I’ve seen a few other posters with similar issues and have tried solutions that worked for them…

I’ve delete the contents of craft/storage/runtime.

I’ve checked the file permissions of craft/storage/runtime. They are currently set to 774.

I’ve tried adding the following to craft/config/general.php:

'overridePhpSessionLocation' => false As described here - Craft constantly logging out from admin area

and also:

'overridePhpSessionLocation' => true

As described here - Migrated Server, Now Getting Logged Out Constantly

I’ve tried 'requireMatchingUserAgentForSession' => false too.

Nothing has worked so far.

Is there anything else I could try?

I understand this is likely to be related to permissions for where session files are stored. Are there any questions I should be asking the the hosting company in relation to this? The site is on a shared hosting account.

Any help or advice with this much appreciated.

* An update... *

I looked at /admin/utils/phpinfo in the dashboard to check where session.save_path is pointing.

By default it's set to /tmp.

If I add 'overridePhpSessionLocation' => true to craft/config/general.php, the session location is set to:


That looks a bit odd to me? There are two paths – the craft path and the default session path below it. Is that correct?

  • Re: your update, that's normal. The first value is the application's current value (Craft), the 2nd is the default global value. It's more clear if you call phpinfo() from a script directly.
    – Brad Bell
    Commented Nov 21, 2017 at 16:41

4 Answers 4


Just a question; are you on a Nginx server? I had a similar issue before with a client site. the Nginx configuration was removing the cookies when it cached the page, which redirected to the login page after logging in.

  • I'm not sure if it's an Nginx server or not. I'll contact the hosting company and find out.
    – Dan B
    Commented Nov 21, 2017 at 15:03

I'm not sure if 774 would be enough permissions on that folder. If the web server is not running as the account user (via ruid or suexec/suphp), or is not in the same group as the account user then it will not be able to write to it. Just throwing it out there.

  • I tried 777 as a test and that didn't work either.
    – Dan B
    Commented Nov 21, 2017 at 15:04

Sounds to me like a server config issue. The site worked in one place, you moved it, and now you have this issue.

If it's an Nginx server, this may be helpful: Nginx-Craft

  • I'll contact the hosting company to see if they can help with regards to the server config. I'll find out if it's an Nginx server too.
    – Dan B
    Commented Nov 21, 2017 at 15:07

I contacted the hosting company and they managed to fix the issue. They whitelisted the cookie name in their varnish caching system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.