Today I am working on one WordPress project. The site is very simple. No extreme plugins are on the site. What I did, I just migrate the database (using WP Migrate DB plugin) and transfer all WP files to my computer. Then I just edit the database login in wp-config.php. After that, go to site URL. Yeap, everything is working perfectly. Then I go to login URL (yourdomain.com/wp-login/) and enter the WP login. I expect to see the WP dashboard page but wait, the site is redirected to home page. No matter what I try, it ends up the same. WHY?
Next, I try to add ‘/wp-admin/’ after yourdomain.com. I do this after I log in. I get the error message says Sorry, you are not allowed to access this page. But the production site never showed this error before. WHY?
Hmm, after migration, I can view the site but I can not access the WP dashboard. After that, I check the wp-config.php file and I notice the table prefix setting is not the same as the production site.
Here how it looks like.
Production site => $table_prefix = ‘586xDJU’;
My localhost => $table_prefix = ‘586xdju’;
The production site is Linux and Linux is case-sensitive. The production site creates the table prefix with mixing between lowercase and uppercase. While my computer is Windows and it is not case-sensitive. It turns all table names to lowercase. This is the issue that causes the access denied to WP dashboard in my case.