It can be done, but it’s a fair amount of work, and it’s not free.
You must first purchase a domain name and make sure the domain is parked. Then you must purchase the cheapest SSL certificate you can find for the domain name. After you have the domain and SSL certificate, you must edit the Apache httpd.conf file in Xampp to create a virtual host for the domain and to install the SSL certificate. And finally, you must edit your local system’s HOSTS file to map the domain name to localhoat.
You will then be able to access the domain name locally, and SSL will work correctly.
Despite the amount of work involved, this is by far the best way to create a new site locally. When you are ready to take the local site live, all that’s needed is to move the certificate/files/database to the host server, edit the wp-config.php file to add the correct database credentials, and flip the domain DNS to the host server. No database edits will be required because the domain name will not change.
Hi,
Tried that, did not work. After making the mod, tried starting Apache and got this error message.
“[Mon Jan 29 14:37:23.313281 2018] [ssl:warn] [pid 8896:tid 592] AH01909: http://www.example.com:443:0 server certificate does NOT include an ID which matches the server name”
Here is my vhost mod
“##<VirtualHost *:443>
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot “C:/xampp/htdocs/nbd.test”
##ServerName nbd.test
##ErrorLog “logs/nbd.test-error.log”
##CustomLog “logs/nbd.test-access.log” common
SSLEngine on
SSLCertificateFile “conf/ssl.crt/server.crt”
SSLCertificateKeyFile “conf/ssl.key/server.key
##</VirtualHost>”
Hope you will continue to help.
Regards
Drachsi