Magento Admin Invalid Form Key


Posted by Andrew McCombe on Wed May 30, 2018

Problem

I Recently came across a situation where I couldn’t log in to the Magento admin area, getting ‘invalid form key on admin’.

Solution

Check the core_config_data table for web/cookie/cookie_domain and make sure that value is the same as your domain.

Update the database, clear Magento’s cache, clear your browsers cookies and try logging in again.