Cannot open local site using DevKinsta

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.

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.

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.

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

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:

; 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.

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_prepend_file = ''

Regards,

Alessandro

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.

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_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

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!

1 Like

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

Cheers,
Agus

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