TechnologyWordPress

How to fix error Uh-Oh! Could not update hosts file local

In this guide, I am going to fix error Uh-Oh! Could not update hosts file local fixed It appears that Local by flywheel is popular recently in building a virtual environment for localhost WordPress.

1- I have read lots of posts with users experiencing the exact problem. However, have yet to come across a post that has a solution.

Uh-Oh! Could not update hosts file

Changing Router Mode

Some additional steps we need to do for the site to work with the new Router Mode. If the router mode is changed.
Local by flywheel will occasionally verify to see if the domain within the database matches what it thinks the domain should be. If those are different, it wills popup you to fix it. In the situation of switching to localhost router mode, Local will search for testsite.local and replace it with the appropriate port number, something like localhost:10004.
The blow screenshot that walks through changing the Router Mode and then you can click the Fix It button to update the domain within the database.

warning missing hosts entry

Fix error Uh-Oh! Could not update hosts

2- Select the … button and then select preference.

local by flywheel menu

3- Under preference select advanced, next to router mode select localhost.

local by flywheel router mode

4- Next to show develop menu, select the button and then click apply.

local by flywheel show develop menu

5- Click on x button to close the preference window.

local by flywheel advanced

6- Click on FIX IT “warning! This site’s WordPress URL settings do not match the local set in local.

Flywheel settings do not match the host set in local

7- Now you can see the error disappear.

local by flywheel sites

8- The read-only attribute in the host file located in c:\windows\system32\drivers\etc we need to unchecked attribute read-only.
Press Windows button + R from your keyboard, type c:\windows\system32\drivers\etc, and then press enter.

run command

9- Right-click on hosts and then choose properties.

hosts file location

10- Under general tab, unchecked read only checkbox next to attribute and click ok.

hosts properties

Jamil Parvez

Jamil Pervez works as a Network Administrator, based in Kuwait with a Primary focus on Microsoft technologies. Microsoft Certified MCSE, MCTP, MCITP, CCNP, CCIP, CCVP with 20 years of experience in administering Windows Servers, Exchange, VMWare, Veeam B&R, Veritas BackupExec.

Related Articles

Leave a Reply

Back to top button