Folks, even after I set up SSL the ‘admin’ and ‘view site’ links point to the HTTP version. Is there some way to default them to SSL when available?
If you’re talking about the “Trust” button on the “SSL” tab, that only trusts the certificate to bypass browser warnings. It doesn’t force HTTPS.
To change the site to HTTPS, I recommend following the instructions here: https://make.wordpress.org/support/user-manual/web-publishing/https-for-wordpress/#implementing-https-for-wordpress
Optionally, you can use WP-CLI and use the
search-replace command to change all URLs to
https like so:
wp search-replace 'http://example.local' 'https://example.local'
Note: to use WP-CLI with Local, right-click on a site in the sidebar, and then go to “Open Site Shell.” Once the terminal window opens, you can run commands like the one above.
Thanks for the prompt reply Clay. Both the URLs in the settings page point to the https location. The site is just created and has nothing added to it (plugins/content). However when I click the ‘view site’ button in Local it still takes me to the http version and not the https version. Is that redirection issue, or can Local always point to the https version?
Aha! That makes sense.
The links from Local to the site are set to always use
http but I can see how that’s not ideal. When clicking “View Site” does it properly redirect from HTTP to HTTPS?
Nope it does not. I wish they would point to https once I’ve trusted the certs so that way I do not need to setup a 301 or anything…
Interesting, WordPress should be redirecting to
https as long as the settings in Settings » General reflect that.
Without your 301, does it just stay HTTP or do you get an error of some type?
THe ‘admin’ button redirects to https. The ‘view site’ button however, results in a page without the padlock (just says, ‘not secure’)