Sometimes when you create a product with multiple attributes in Magento 2, you may end up with the error message “Invalid Form Key. Please refresh the page.”

To get rid of this message, you need to increase the value of max_input_vars in php.ini file. By default, this value is set to 1000. You should set it to 5000 or 10000. To do that, follow these steps:
- Log in to your website server using ssh
- Go to the folder containing php.ini and open this file by vi
- Edit the value of max_input_vars to 5000 (or create it if it doesn’t exist yet). Then, press ESC key and type :wq to save the file.
- Restart your Mamp or Apache. Now you can save your newly created product without any problem.
See more:
Magento 2 Error: One or more indexers are invalid
Warning: Your Magento folder does not have sufficient write permissions
[…] more: Magento 2 “Invalid Form Key” Magento 2 Error: One or more indexers are […]
[…] See more: Warning: Your Magento folder does not have sufficient write permissions Magento 2 “Invalid Form Key” […]
[…] See more: Magento 2 System Requirements Magento 2 “Invalid Form Key” […]
Thank you.You saved my time
You’re welcome!