Router Changed From localhost to SSL: Live Link Broken

What issue or error are you experiencing?

I might have had previous issues with SSL, since I was already on localhost. My website it essentially done, and I wanted to share an example with the live link, but since localhost is http it would not load all the images. In order to fix this, I switched to SSL successfully (by closing anything on port 80), cleared cache, and tried again. Now, WP Admin and Open Site still work fine, but the live link has 2 problems:

  • The content (images and such) still points to localhost, giving me an error in the console
  • It cannot establish a connection.

Steps I’ve already taken:

  • Clearing cache everywhere
  • Using wp search-replace… I did so on localhost though, and not on the new SSL URL. I have been scared that doing this when I have changed my local URL might lead to other issues.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version: Version 9.2.9+6887

  • Operating System (OS) and OS version: Windows 11


Local Logs

Verbose logs: local-lightning-verbose.log (704.2 KB)

Hi @djmarcopolo

You might need to run S/R again manually or with a plugin while on Site Domains. The first thing you might do is be sure all links are updated from HTTP to HTTPS but also that the localhost domains are updated to the .local one.

More on this here: Troubleshooting Live Links

As I mentioned, I did follow the troubleshooting steps before. I made sure to run S/R again, but I received the same result: “Success: Made 0 replacements.” The live link still does not load when opened in the browser.

Sorry I was confused becaused you mentioned you only did it on Localhost and not under Site Domains.

Are the results the same if you use a different browser or an incognito window?

Did you also check for plugin/theme cache?

I checked all caches and nothing worked, but I did notice the following when I switched from localhost to SSL: Wordpress address and site address in the General Settings have not changed, even though I ran the S/R command.

Something that might be worth testing is doing a reimport of the site. The steps would be like this:

  • Locate the site files on your machine, and save a copy of them to your desktop. If you click Go to Site Folder under your site name it should take you right to where they are located.
  • Once you have those copied, completely delete the site from Local
  • Restart Local/your machine
  • Reimport the site back into Local. You can refer here on how to Restore from only Local site files

Then you could see if that helps clean things up and sets it up with fresh cache/references.

Hi Nick, I quickly made a backup of my website, but is this actually different from reimporting a backup? I have a couple of worries regarding the site you linked, namely that my site folder also contains conf and backups. I also mentioned that in my site settings, the URL is not updated, and I was wondering if the solution would not simply be to update that URL?

Update: I have updated the Wordpress saved URLs to change it to https, and that has worked. Sadly, the live link now gives me a 404 error, but I am guessing that it has something to do with the changed URL that I might need to update in some settings.

Thank you for the updates here @djmarcopolo! Glad you’ve made some progress. The 404 could be related tot he URL changes. Did you inspect the dev console? You might have to go through and run some new S/Rs and flush caches again.