Bypassing Admin Credentials

We have a user that edits our WP Engine sites using Local. All of our sites use SSL, so she is unable to utilize the ‘localhost’ setting routing mode. She’s prompted often for admin credentials when needing to make changes to the host files. Is there a way to avoid her needing elevated credentials and still edit the SSL sites using Local?

Hey @CalebCarroll – Welcome to the Local Community Forums!

Right now, editing the Hosts file will always require elevated credentials. Because of this, you have basically two options:

  1. Use the “Site Domains” router mode instead of localhost so that the site in Local can be worked on over HTTPS.

  2. Use localhost router mode, but instead of using HTTPS, disable any HTTPS plugins as well as run a search-and-replace to update https://example.local to regular http like http://example.local

Thanks for the response, @ben.turner!

I had a couple of questions that were brought up to me:

Will we have to run the search-and-replace commands every time an update is pushed to the site?
Where will the command need to be run?

@ben.turner,

I figured out where to run the search-replace command. But, I’m a little confused about the need to do it if I’m using localhost router mode. The site URL automatically utilizes HTTP instead of HTTPS. Would I need to run this before switching router modes?

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

Sorry for taking too long to reply!

It definitely depends on the site, and the specific mix of plugins/themes. I’ve found that for most WP sites, the urls that are stored within the DB include the protocol, so you’ll need to search for:

https://live-site-url.com

to

http://localhost:10008

Of course, this shouldn’t need to be done if using Connect, or when dragging and dropping a zip backup of the site onto Local. Local should be able to use the correct search/replace settings!