# Cannot open local site using DevKinsta

**URL:** https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682
**Category:** Application Support
**Created:** [August 25, 2022, 3:44am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682 "2022-08-25T03:44:57Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![ikuko-k](https://avatars.discourse-cdn.com/v4/letter/i/e274bd/32.png) [@ikuko-k](https://community.kinsta.com/u/ikuko-k)
#### Post date: [August 25, 2022, 3:44am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/1 "2022-08-25T03:44:57Z")

</div>

Hi! I’m having trouble using DevKinsta.  
I have created new site by importing from my Kinsta site, but cannot open local site.  
( ‘Failed to load resource: the server responded with a status of 500 ()’ ← got this error on my browser console.)

I deleted my local site once and recreated it again, but couldn’t resolve it.

How can I resolve this?  
Thanks.

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [August 25, 2022, 4:16pm UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/2 "2022-08-25T16:16:32Z")

</div>

Hi @ikuko-k, thanks for reaching out! If you’re getting a 500 error it means some code or plugin on your site is producing the error. You can check your site’s error logs in `~/DevKinsta/logs`

I’ll mention that a usual culprit is WordFence. If that’s the case you will just need to disable the offending plugin before you try to pull the site to DevKinsta.

Please let us know if that isn’t the case! Also feel free to private message your error.log file to me if you need help figuring out where the issue is.

---

<div class="post-metadata">

### Author: ![ikuko-k](https://avatars.discourse-cdn.com/v4/letter/i/e274bd/32.png) [@ikuko-k](https://community.kinsta.com/u/ikuko-k)
#### Post date: [October 12, 2022, 7:28am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/3 "2022-10-12T07:28:53Z")

</div>

Hi! @Kevin , thank you for your reply.  
Sorry for my late reply.

I have disabled the WordFence as you said.  
But was the same as before.  
I will send you my log file by private message.

Thanks.

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [October 12, 2022, 4:42pm UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/4 "2022-10-12T16:42:15Z")

</div>

Thanks @ikuko-k, that’s strange that the error is still complaining about WordFence. Try going to your `/wp-content/plugins` directory on the DevKinsta site and delete/rename the WordFence directory. What I see from the error in your error.log is that something is trying to load `wordfence-waf.php` using the path from from MyKinsta instead of DevKinsta.

I’ve seen WordFence do thisa few times before like here: [Imported Kinsta Site Blank - #3 by anthonynickerson](https://community.kinsta.com/t/imported-kinsta-site-blank/1654/3)

---

<div class="post-metadata">

### Author: ![Orphiex](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@Orphiex](https://community.kinsta.com/u/Orphiex)
#### Post date: [January 18, 2023, 9:35am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/5 "2023-01-18T09:35:38Z")

</div>

I’m experiencing the same issue; I think I found where the problem is coming from. It seems to be occurring in the `.user.ini` file, with the following code:

```auto
; Wordfence WAF
auto_prepend_file = '/www/our_website/public/wordfence-waf.php'
; END Wordfence WAF

```

It looks like the `auto_prepend_file` address isn’t being updated when DevKinsta pulls to local. I can probably fix it by manually modifying the path in the local file, and correcting it before pushing to MyKinsta staging/live.

Of course, you can also fix it by locally _removing_ the `.user.ini` file altogether, but I’d prefer a neater solution.

What’s the correct path to insert here? I assume that it should be `/localname/wordfence-waf.php`, but I’d like to be sure.

---

<div class="post-metadata">

### Author: ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)
#### Post date: [January 18, 2023, 11:39am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/6 "2023-01-18T11:39:53Z")

</div>

Hi @Orphiex, welcome to DevKinsta community!  
If you don’t have the wordfence-waf.php file (used by the plugin called Wordfence) in your site’s folder, the `auto_prepend_file` value can be left empty as in:

```auto
auto_prepend_file = ''

```

Regards,

Alessandro

---

<div class="post-metadata">

### Author: ![Orphiex](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@Orphiex](https://community.kinsta.com/u/Orphiex)
#### Post date: [January 18, 2023, 3:59pm UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/7 "2023-01-18T15:59:49Z")

</div>

I actually _do_ have the `wordfence-waf.php` file in the site folder, and I’d like to point the `auto_prepend_file` to the right direction, but as long as I can actually work with the site locally, it’s a solution that works.

---

<div class="post-metadata">

### Author: ![Agus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/agus/32/1515_2.png) [@Agus](https://community.kinsta.com/u/Agus)
#### Post date: [January 19, 2023, 1:26am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/8 "2023-01-19T01:26:16Z")

</div>

Hello @Orphiex Judah,

If you really want to point that `auto_prepend_file =` to the `wordfence-waf.php` file in your site folder in question, then you may want to point it to something like this:

```auto
 auto_prepend_file = '/www/kinsta/public/yourlocalsitename/wordfence-waf.php'

```

where " `yourlocalsitename` " is the site folder name created on your local computer.

Please kindly test if it works with that path above.

Cheers,  
Agus

---

<div class="post-metadata">

### Author: ![Orphiex](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@Orphiex](https://community.kinsta.com/u/Orphiex)
#### Post date: [January 19, 2023, 4:46am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/9 "2023-01-19T04:46:13Z")

</div>

Beautiful, looks like it works. This way, I can test changes with WordFence in the WP-admin of the local site without accidentally getting redirected to the WP-admin of the live site. Thanks!

---

<div class="post-metadata">

### Author: ![Agus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/agus/32/1515_2.png) [@Agus](https://community.kinsta.com/u/Agus)
#### Post date: [January 19, 2023, 4:57am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/10 "2023-01-19T04:57:19Z")

</div>

Awesome! Glad to hear that it works for you @Orphiex 😃  
Sounds good then! You’re most welcome!

Cheers,  
Agus

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)
#### Post date: [January 23, 2023, 9:38am UTC](https://community.kinsta.com/t/cannot-open-local-site-using-devkinsta/1682/11 "2023-01-23T09:38:40Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
