Local is requesting administrative privileges to modify yout /etc/hosts files

Hi everyone, I use Local from time to time for school projects and it used to work just fine.
Today, while trying to creat a new site, I faced a problem that I can’t see to find a solution for… WHen I creat a new site, a message saying “Local is requesting administrative privileges to modify yout /etc/hosts files” appears. It also appears when I try to delete the site that was not even really created in the first place

I tried looking up for awnsers on here because other people had this issue, but the given awnsers did not work for me.

Can anyone help me ? Thank you in advance

(sorry for my english, I’m French)


Steps :

Launch local, create a new site


System Details

Last version

Windows 11
Version 10.0.22631 Build 22631

Update :

I added “127.0.0.1 test.local” in my hosts file, THEN created a new site named test.local and it finally worked, the site can be created in Local.

Sadly, it still doesnt work… when I click on “wp admin” or “open site” ,the site can’t be find on my browser. I also can’t trust the SSL, because when I click on “trust”, I have the same issue with local requestiin administrative privileges.

I don’t think that the site doesn’t work because of the SSL, because when a type http://test.local it doesn’t work either

hope anyone has a solution, thank you all!

  1. Try to Run Local with Run as administrator option. When you go to desktop shortcut Properties, go to Compatibility and select Run this program as administrator
  2. Check if hosts file is read only.

Are you seeing this UAC pop up when you see the notification about requesting admin privileges?
68f1c6da7a1e5c8587825393b6acf037550130d7_2_690x431

I don’t get this pop up on my computer, Local is failing to successfully use command prompt because this pop up doesn’t show. This is my thread about it, which so far has only received one support reply asking if I did something I already listed I did… I’m curious if you’re experiencing the same issue as your experience sounds similar to mine and they don’t seem to have anything addressing it.

Hi everyone, sorry for the late awnser :

" 1. Try to Run Local with Run as administrator option. When you go to desktop shortcut Properties, go to Compatibility and select Run this program as administrator
2. Check if hosts file is read only."

I tried that and it didn’t work :frowning:

Graywaren, I don’t think I had this pop-up either. I had help from a friend, he told me that I may have declined this kind of pop up without paying attention and that it might be why it doesn’t work, but if that’s the case I have no idea how to find a way to allow it.

But, little update :

My friend helped me find a (partial) solution, in preferences>advanced>Router mode, i put local host and it works, my site runs.
Still, I have a new problem, the WP admin seems to work, I installed plugins and started to work, then I created a new page and… it doesnt work, just opens a white page with nothing on it, same thing if I try to edit the exemple pages.

1 Like

Hi @KEEEmma

When you see those blank pages if you open up the dev tools console do you see any error codes in there?

Some other things that could be at play here:

  • Plugin conflicts: try disabling all plugins and then see if you still get the white pages
  • Theme conflict: Try changing your theme and see if the same thing happens
  • Performance issues: Try some of the steps in our guide here including the Windows specific items Troubleshoot: Performance Issues - Local

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