Is there any way to configure Local to set new sites to use https/ssl by default, rather than having to manually trust the SSL cert for each one, and manually change the site’s siteurl
and home
values in wp_options
(or the site’s settings) to use https
rather than http
?
I would also like to know this. + If I now go to https:// manually I get a number added the first time I go to /wp-admin and I get this number “:10065/wp-admin/” added to the url. Why is that? I think it also has to do something with this issue.
It sounds like your Router Mode is set to Localhost. If you change it to Site Domains by going to Preferences>Advanced>Router Mode you should see the domain names change after.
For anyone else coming to this thread with SSL issues, we have some help articles here that go over SSL in Local for more detail on recent changes and troubleshooting steps.
Hi @Nick-B thanks for the quick reply. I have checked your setting and it was already set on this router mode: Site domains.
At the moment I have to do all this to make it work like a normal local install (using macOS):
- install site through wizzard
- Click trust on the SSL screen
- Open keychainaccess
- Search for new local domain
- Double click, change settings to always trust
- Close, fill in password
- Go back to wplocal > Database
- Open adminer > Go to wp options
- Change home_url and siteurl from http to https
- go to /wp-admin/plugins install better search and replace (- Sometimes the firs wp-admin has a portnumber and when I remove it after that it usually does not do it again)
- Replace all http for https
And then it works correctly. Do you know why it cannot just directly force the https like on Mamp Pro for example?
Hey @Ruben1 – I agree that this can get tedious. We do have a few open feature requests for making HTTPS in Local better, you might want to up-vote them to get them prioritized:
- Open site with https when SSL is enabled
- HTTPS option when adding a new site
- Automattic HTTPS / SSL Provisioning
In the meantime, I know that under Mac, the security settings are such that you need to manually add the key to Keychain every time. As for changing the URL within the DB, one thing you might consider doing is use wpcli
to do the search and replace. This would mean that you don’t need to edit things in Adminer or install the better search-and-replace plugin.
To run a search-and-replace with wpcli:
- Click the “Open site shell” button in Local
- In the terminal that opens, type the following command (be sure to use your site’s domain and note the
s
difference inhttp
/https
)
wp search-replace 'http://mysite.local' 'https://mysite.local'
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.