Magento 2.x – “Invalid Form Key. Please refresh the page.” when saving a product

Hi Everyone,

If you are trying to save a product on your admin panel, and getting the following error message “Invalid Form Key. Please refresh the page.” don’t enter in panic.


You will only need to change a little configuration on your php.ini file. Lets add the following (or change the value if its already on there):

Afterwards, remember to restart your apache server:

You will now be able to try again, and the error should be fixed.