Magento Admin Invalid Form Key

May 30th, 2018

Warning: This post is 5 years old. Some of this information may be out of date.

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.