0

I have wordpress multsite dev environment running in LAMP on my Ubuntu 20.04 machine. I have recently decided to migrate my dev environment to a vbox vdi running debian 10.5, lamp,and ISPConfig.

My old dev site has a self-signed SSL certificate, meanwhile my new dev site runs on http.

I updated the table prefixes, url's etc and there no redirecting issues within wordpress (i.e correct migration), however the self signed ssl certificate from the old dev site is causing ssl errors in my web browsers whenever I try to view the new dev site.

the old dev site was located at https://localhost.example.com
whereas the new dev site runs at http://tester1.example.com

The web browsers keep attempting to load https://tester1.example.com

My question(s) is:

1.) what can I do to the new dev site to so that web browsers won't confuse it with the old dev site and stop trying to load it on https://tester1.example.com (drop certain tables, edit vhost, etc.?)

2.) If necessary, is there a terminal command that I can use to remove the self-signed certificate or do I need to go into /etc/ssl/ and manually delete it?

thanx

1
  • I haven't run SSL on apache so this isn't an "answer" - but check the vhosts and ssl settings on your web server. I don't think that wordpress generally cares about https vs http. My best guess is the redirect from port 80 to 443 is active.
    – Journeyman Geek
    Commented Oct 30, 2021 at 8:29

1 Answer 1

0

I'd suggest the easiest way of getting round this problem is to enable https on the new site. HTTPS is a best practice, and if you revert back to HTTP you are making headaches for yourself later.

That said, you can fix your problem by doing a search and replace for "https://localhost.example.com" with "http://tester1.example.com" on your database. The best way to do this is to get a tool "wp-cli", and then do a search and replace with the command

  wp search-replace "https://localhost.example.com" "http://tester1.example.com" 

Run from the directory of your Wordpress install, as the wordpress user (or, if you like to live a bit dangerously, as root, add the flag --allow-root)

You may be able to just dump your database and do a search and replace with your favourite text editor or SED and import that, but this is does not always work - something to do with Wordpress serialising some data and this command not handling it. I used to do it that way, and pulled my hair out on 1 particular site which stopped working as a result until I learned the correct way to do it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .