#StackBounty: #wp-admin #url-rewriting #redirect #dashboard Prevent /wp-admin/ from redirecting to homepage?

Bounty: 50

I have copied a wordpress instance from production to my local. After getting the public side of the site up – public homepage, pages, and blog posts -, I cannot access /wp-admin/ because that url always redirects to the / homepage. I have tried:

  • Updating the siteurl and home to “tk.local” (homepage and posts work fine)
  • Implementing a local self-signed ssl cert (in case it was an https problem.)
  • Switching themes (switched fine, problem still persists)
  • Setting debug constants in wp-config.php
  • Removing debug constants in wp-config.php

Here is a curl of wp-admin:

curl -Ik https://tk.local/wp-admin/
HTTP/1.1 301 Moved Permanently
Server: nginx/1.16.0
Date: Wed, 24 Jul 2019 17:27:39 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/5.6.40
X-Redirect-By: WordPress
Location: https://tk.local/
Last-Modified: Wed, 24 Jul 2019 17:27:39 GMT
Expires: Wed, 24 Jul 2019 18:27:39 GMT
Pragma: public
Cache-Control: max-age=3600, public
ETag: "d41d8cd98f00b204e9800998ecf8427e"
Strict-Transport-Security: max-age=63072000; includeSubdomains
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-uri: /wp-admin/

Obviously on the production copy the wp-admin url works. Throughout it all, it 301 redirects from https://tk.local/wp-admin to https://tk.local/
How can I prevent it from redirecting?

Get this bounty!!!