0

I'm trying to run wordpress/wooCommerce in my local environment (laptop localhost) and the rest api for woocommerce requires https to use (the http version is oauth 1.0a which is a pain in the ass to use).

when I try to install wordpress using ampps under https protocol I get this error: A trusted SSL Certificate was not found which makes the localhost not truested.

how do I go about using SSL in ampps for my wordpress installs?

zero
  • 2,999
  • 9
  • 42
  • 67
  • No certificate authority will certify that you own localhost. You need to get a domain name, buy a cert for that domain name, and create a reference to that cert in your virtualhost config. – kloddant Nov 07 '17 at 15:14
  • is there a way to trick it to think it's secure locally? – zero Nov 07 '17 at 15:44
  • It being run locally and being rendered by using the hostname localhost are two different things. Technically, you could get a cert for example.com and then add example.com to your hosts file on your laptop (C:\Windows\System32\drivers\etc\hosts) so that when you personally request example.com, your laptop sends this request to 127.0.0.1. If you want other people to be able to use the site, then you'll need to give your laptop a static ip address and create a DNS entry for it somewhere so that example.com always maps to your laptop's ip address for anyone in the world. – kloddant Nov 07 '17 at 16:01
  • 1
    This is all a horrible idea, btw. Running a site on your laptop is probably against your isp's terms of service, and you probably won't be able to get a static ip without spending a lot of money, and you need to set up your router to allow this, and your laptop is much more insecure than a remote server. Just get a remote server instead. – kloddant Nov 07 '17 at 16:04
  • no no, the site isn't being run off my laptop, I'm running Wordpress locally for development of plugins and themes. in other words: it's a separate instance of wordpress used for developing wordpress functionality – zero Nov 07 '17 at 16:46
  • Oh, well if that's the case, then yeah, just get an ssl cert for your actual site, and then change your hosts file on your local computer so that requests to your real site point to 127.0.0.1 instead. So for example, if the hostname is example.com, then get a wildcard cert for *.example.com, and change your hosts file so that dev.example.com points to 127.0.0.1. You'll still need to add the port number at the end and set up your local virtualhost config to allow for dev.example.com. – kloddant Nov 07 '17 at 16:54

0 Answers0