How to fix “Invalid Form Key. Please refresh the page.” error on Magento Backend

So you’re also having this “Invalid Form Key. Please refresh the page.” error and not able to login to your newly installed Magento Backend interface? No worries in this short article we will learn how to fix it.

There are number of reasons behind this and different solution works for different people so lets closely go through some of them.

Solution # 1: Use Database to save session
Often it seems that the “files” method to store session doesn’t work due to file permissions or other related issues so you can switch to Database method by making the change in app/etc/local.xml
Search for:

< ![CDATA[files]]>

and replace with:

< ![CDATA[db]]>

Save the file and sessions will now be stored in the database instead of files. Although you might see performance issues if you are running a large web store or multi sites with great number of products.

Solution # 2: Files & Folders Permission
So instead of switching to Database method for storing sessions we discussed above you make sure the folder /var/cache have the right permissions (0755 should be enough though but it has been noticed that some servers require 0777 on those folders), and writable to the user running php so magento can create new session files in that folder. if folder is not writable you are more likely to encounter the error.

Solution # 3: Core Config Data Table
For many users the problem lies in database. There are 2 of the possible fixes written below, if this is really a database issue.
Please note: If you find multiple entries for the following be sure to only use the default one or the one you want to change because resetting/removing the wrong entry might break your magento webstore completely.

  1. Reset the following:
    Browse core_config_data table (you might have to add the db/table prefix)
SELECT * FROM `core_config_data` WHERE `path` = "web/cookie/cookie_domain";
Set the above path value to null
SELECT * FROM core_config_data WHERE path="web/cookie/cookie_path";

set the value to above path to /

  1. Delete the following entries
    If the above code not help you then deleting the following entries from core_config_data table will help fixing the issue.
DELETE FROM `core_config_data` WHERE `path` = "web/cookie/cookie_domain";
DELETE FROM `core_config_data` WHERE `path` = "web/cookie/cookie_path";

Solution # 4: Cookies, Cache issue
If nothing mentioned above works for you don’t give up it’s more likely a bad Cookie issue. The simple solution is to delete cache, cookies from your browser. Also its nice to clear up magento cache if it doesn’t hurt you.

Please feel to reach to us if you don’t get it fixed.

Sign Up To Get The Latest Digital Trends

Our Newsletter

Related Posts

7 Advantages of Node.js to Startups You Must Know

Node. js is an open source server-side JavaScript run-time based on chrome’s V8 JavaScript engine. This has resulted in receiving lots of attention in the startup domain because of its peculiarities and advantages. Alright, let’s look at the benefits of Node now. js and why Startups should embraces it. Fast and Scalable Performance Node. js…

Why Machine Learning is Essential for Predictive Analytics

We have seen that Smart corresponding Design is available in KJ quarterly at KJ Internet Magazine http://www.kj-internetmagazine.de/ Now let’s turn to analyses of predictive analytics – definition, application, and significance. Modern economy and many industries and organisations demand analysis of complex time series data to forecast future trends or behaviors. This is actually where predictive…

Top 10 Cyber Security Jobs in 2023

Introduction Cyber security has emerged as one of the crucial areas of study in the contemporary society due to the dynamically increasing threats to the individual and group data. Today, when the number of years has become more than two thousand and twenty-three, the need for specialists in this field is growing rapidly. This article…

How to Design Websites That Convert: Tips from the Pros

When you are developing website you do not only want a site to look attractive, but it must be functional. That means making visitors customers, subscribers, or leads. But how do you make sure that your site is performing that exact role? Before we continue further, here are some proven tips and tricks to building…

What Is Software Quality Assurance, and Why Is It Important?

As software development has advanced at a faster and more unpredictable pace, it has become crucial to ensure that the software that reaches the customers, meets all the qualities of a good and efficient software. This is where Software Quality Assurance (SQA) comes in for aid throughout the process of software development. SQA is the…

How Turing Is Leveraging AI for Matching and Evaluating Developers?

The importance of skilled developers does not fade over time, in relation to the fast growth of technology. IT specialists within every sphere are in constant search of the best developers to achieve their corporate initiatives in digital areas. This quest, however, is not without its challenges and thus, the remaining sections of this paper…

GitLab vs GitHub: Similarities, Differences, Features, Use Cases, and More

In the dynamically transforming world of creating software, the management of various versions remains a crucial asset. Source control tools especially with Git repository have proved to be a central virtual infrastructure for collaborative coding. There are many tools for managing Git repositories; however, GitLab and GitHub are well-known leaders in this sphere. This is…

3 Most Popular Kubernetes Distributions for Compact Container Management

Kubernetes is now the go-to container orchestrator in this constantly growing environment of containerization or microservices architecture. It means that Kubernetes helps to avoid numerous problems connected with deployment, scaling, and management of present-day applications. However, the management of Kubernetes and the cluster itself is a complex task, which is why special Kubernetes distributions were…

Popular Selenium Interview Questions and Answers for 2023

In the area of software development, interviews remain some of the most important events or steps of the process. Entering a new year of 2023, Selenium continues to be one of the go-to tools for web automation testing, thereby increasing the importance of Selenium-based interview questions. No matter an individual is professional Selenium tester, or,…

Infrastructure as Code (IaC): A Beginner’s Guide 2023

My friends, welcome to the world of Infrastructure as Code also known as IaC where the traditional process of manually creating and setting up the infrastructure’s are no more valid and the powerful tool of automation takes the helm. In this tutorial for starters, we will talk about what IaC is, why it is important,…

What Is Nest.js? Why Should You Use It?

Nest. js has been stirring up the field of Node rather successfully. JS development, and, if you are a developer or thinking of developing web applications using Node. JS, you may be wondering what all the commotion is all about. Let us explore in details about Nest in this article. js to introduce it to…

Things to Expect When Transitioning from an Individual Contributor to a Software Professional

Introduction The goal of shifting from an individual contributor to a software professional is quite a leap in every person’s career path. It is a shift from implementing given processes where one is a mere coder to carrying out procedures that define leadership, teamwork, and conceptualization. However, this transition is hardly devoid of possibilities for…

Implementing CRUD Operations in Web Development: A Tutorial

Introduction Are you fire up to move forward to getting familiar with the basics to web development? But when there is discussion of CRUD then it is time to get down to business. If it’s your first week or your 100th day, it’s crucial to know about CRUD operations. CRUD (Create, Read, Update, Delete) is…

Leveraging User-Generated Content to Enrich Your Tutorials

Introduction UGC has been discovered in the current generation as a very useful tool for improving on the online tutorials. But first, let’s define what exactly UGC means and why it should be incorporated into the educational material. And now let’s go deeper into the idea of using UGC and how it can help you…

Types of Animation: A Comprehensive Guide

As you go through this piece, you will be able to understand different aspects that relate to animation. Animation is one of the fascinating and amongst the most flexible categories of media that is in constant development. Whether one is interested in over cominging an animator or just interested in knowing the types of animation,…

Mastering Video Editing: Tutorials for Aspiring Editors

Video editing is a wonderful process, which shows one a whole world of opportunities in terms of creativity. Whether you’re a young filmmaker, social media lover, or simply a person who wants to remember some important moments of life, knowing how to edit movies can take your videos to a whole new level. Okay, get…

Color Theory in Design: How to Choose the Right Palette

Have you ever opened a new painting or writing project and been completely lost for what color to pick? You’re not alone! Just as with many things in design, color theory may seem confusing when you are first approaching it, but it is a very strong concept that you should learn. Well, there’s a bunch…

Master Watercolor Painting Techniques with These Easy Steps

Are you willing to start your journey with watercolor painting? Watercolor can be one of the most satisfying mediums due to a range of beautiful washes and rich colours. From a novice wishing to start the journey to one looking to optimize their performance, these steps will help you get there. Time for you to…

Boost Productivity with Notion: A Beginner’s Guide

On the job, day by day or in everyday life keeping track of everything is quite challenging due to the present fast pace life. Be it work responsibilities, assignments, or even basic day planning, the choice of tool greatly can impact the system. Meet Notion – an app that will help you get your work…

Creating Custom Widgets in WordPress: Tips and Tricks

Introduction If there is anything that can revolutionize the personalization of your WordPress site, creating your widgets is an excellent place to start! So now that we know that custom widgets are WiFi enabled widgets that can be downloaded to a mobile device, what do they mean to us? Well, you might consider them as…

How to Teach Kids Coding Using Scratch

Are you concerning about your children the way to get them interested in coding?. As a programming language for kids, Scratch is one of the best out there because it is visually based. It is entertaining, engaging and an ideal resource through which children can develop important skills. And that’s it for now, let me…

Creating a Landing Page Template in Genesis

Today we will learn how to create a landing page template in Genesis framework. In my example I will remove the headers, navigation and sidebars.

Master Public Speaking with These 10 Easy Tutorials

It is one of the most precious skills that one should equip himself or herself depending on the type of career, social events like giving a speech during wedding ,etc. But let’s face reality—it is also one of the creepiest. Don’t worry! With these 10 easy tutorials, you’ll go from shaking to shining on stage….

Learn to Use Apps to Track Your Child’s Academic Progress

When you are a parent, you desire to be more engaged and participate in your child’s learning activities directly. To the great extent, technology helps you to be informed about your child’s academic results in a comfortable manner. Available apps help you monitor your child’s grade, assignments, and the messages sent by the school so…