Step 1: Install OpenSSL
- Download OpenSSL: OpenSSL is a tool used to create SSL certificates. You can download it from OpenSSL’s official website.
- Install OpenSSL: Run the installer and follow the on-screen instructions. Make sure to add OpenSSL to your system’s PATH during installation.
Step 2: Create a Self-Signed SSL Certificate
- Open Command Prompt: Press
Win + R, typecmd, and hit Enter to open the Command Prompt. - Navigate to OpenSSL Bin Directory: Use the
cdcommand to navigate to the OpenSSL ‘bin’ directory. For example:cd C:Program FilesOpenSSL-Win64bin - Generate Private Key: Run the following command to create a private key:
openssl genrsa -out localhost.key 2048 - Generate Certificate Signing Request (CSR): Create a CSR using the private key:
openssl req -new -key localhost.key -out localhost.csr
You will be prompted to enter details like country, state, organization, etc. For ‘Common Name’, use ‘localhost’. - Generate Self-Signed Certificate: Use the CSR to create a self-signed certificate:
openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt
Step 3: Configuring WAMP to Use the SSL Certificate
- Copy Certificate Files: Copy the
localhost.keyandlocalhost.crtfiles to the Apache directory in WAMP (e.g.,C:wamp64binapacheapache2.4.41conf). - Edit Apache Configuration:
- Open the
httpd.conffile located in the Apache directory. - Ensure that the SSL module is enabled (remove the
#at the start of the line):LoadModule ssl_module modules/mod_ssl.so - Add the following lines at the end of the file to configure SSL:
<VirtualHost *:443> DocumentRoot "c:/wamp64/www" ServerName localhost SSLEngine on SSLCertificateFile "conf/localhost.crt" SSLCertificateKeyFile "conf/localhost.key" </VirtualHost>
- Open the
- Restart WAMP: Restart WAMP to apply the changes.
Step 4: Accessing Your Site with HTTPS
- Open Your Browser: Navigate to
https://localhost. You might see a security warning because the certificate is self-signed. Proceed to access your site.
Conclusion:
By following these steps, you’ve successfully created a self-signed SSL certificate and configured WAMP to use it. This setup will allow you to run WordPress and other applications over HTTPS on your local Windows machine, providing a more realistic environment for development and testing.
2026 local SSL refresh
A self-signed certificate is useful for local WAMP development, but it is not a production certificate. Use it to test HTTPS-only cookies, mixed-content fixes, redirects, secure admin workflows, and plugin behavior before deploying to a real host with a trusted public certificate.
Before changing Apache config, back up the WAMP virtual host and SSL files, keep private keys out of shared folders, and document how to remove the local trust entry later. After setup, test localhost, the chosen local hostname, browser certificate details, WordPress Site URL settings, and any redirect rules so the local environment does not mask a production HTTPS problem.
Related Fix I.T. Phill reading
- Why SSL matters for your website
- Domain, DNS, SSL, and business email setup
- Ubuntu LEMP WordPress install guide


