# Imported site redirects to live site for wp-admin login

**URL:** https://community.kinsta.com/t/imported-site-redirects-to-live-site-for-wp-admin-login/302
**Category:** Application Support
**Created:** [February 1, 2021, 4:14pm UTC](https://community.kinsta.com/t/imported-site-redirects-to-live-site-for-wp-admin-login/302 "2021-02-01T16:14:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![gfitech](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@gfitech](https://community.kinsta.com/u/gfitech)
#### Post date: [February 1, 2021, 4:14pm UTC](https://community.kinsta.com/t/imported-site-redirects-to-live-site-for-wp-admin-login/302/1 "2021-02-01T16:14:16Z")

</div>

**Q: Date/Time this occurred (Provide your time zone also)**  
**A:** 11:00 AM EST

**Q: DevKinsta Version**  
**A:** Version 1.0.1 (1.0.1.1173)

**Q: OS Version**  
**A:** macOS Catalina 10.15.7

**Q: Docker Desktop Version**  
**A:** 3.1.0 (51484)

**Q: Were any error codes or messages observed? If so, what were they?**  
**A:** No

**Q: Detailed Description of the Problem**  
**A:** When I click the WP Admin button in DevKinsta for a site I’ve imported from our live Kinsta site, I am redirected to the WP Admin login page on the live site rather than the .local site. As a result, I cannot use WP Admin in DevKinsta.

[main.log](https://community.kinsta.com/uploads/short-url/cuEPPlTjmxCTpyZf80gZMJcmsW9.log) (425 Bytes)

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [February 1, 2021, 8:26pm UTC](https://community.kinsta.com/t/imported-site-redirects-to-live-site-for-wp-admin-login/302/2 "2021-02-01T20:26:42Z")

</div>

Hi @gfitech . Thanks for trying out DevKinsta!  
Does the site happen to have the URL within the `wp-config.php` file? May need to review the home and site URL within options table as well which can be reviewed via [Database Manager](https://kinsta.com/knowledgebase/devkinsta/database-manager/). I suspect that the URL may not have been replaced to use the `.local` address either from code or contained within the database.

---

<div class="post-metadata">

### Author: ![gfitech](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@gfitech](https://community.kinsta.com/u/gfitech)
#### Post date: [February 1, 2021, 8:51pm UTC](https://community.kinsta.com/t/imported-site-redirects-to-live-site-for-wp-admin-login/302/3 "2021-02-01T20:51:00Z")

</div>

Good catch! Actually, this seems to be something of the same issue as the other bug I reported - some of our site config, including the URL, lives in wp-config-env.php and so that still contains the Kinsta cloud URL and not the local URL for the WP\_HOME, WP\_SITEURL, and WP\_CLI\_DOMAIN config.

So it generally looks like we’ll have trouble using DevKinsta for our live site if we’re following this pattern of keeping the environment variables outside of wp-config.php, is that right?

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [February 2, 2021, 4:36pm UTC](https://community.kinsta.com/t/imported-site-redirects-to-live-site-for-wp-admin-login/302/4 "2021-02-02T16:36:21Z")

</div>

Right, it doesn’t yet support custom wp-config.php configurations but we’ll look into getting this in as a feature. Thanks for submitting this!

---

<div class="post-metadata">

### Author: ![gfitech](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@gfitech](https://community.kinsta.com/u/gfitech)
#### Post date: [February 2, 2021, 4:49pm UTC](https://community.kinsta.com/t/imported-site-redirects-to-live-site-for-wp-admin-login/302/5 "2021-02-02T16:49:06Z")

</div>

Great, thanks Michael. I’d love to see this added!

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [March 3, 2021, 5:44pm UTC](https://community.kinsta.com/t/imported-site-redirects-to-live-site-for-wp-admin-login/302/6 "2021-03-03T17:44:34Z")

</div>


