As per OP’s comment:
Yes, I have self signed using OpenSSL, now I have the site opening on HTTPS but in browser it still says connection not secure where it is showing HTTPS in the address bar.
In that case, it sounds like some links are being called through HTTP while other are being called on HTTPS, giving you mixed content issues. Before you do anything, remove the FORCE_SSL_
function that you added in your wp-config.php
:
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);
Than, try the following steps using the Search Replace DB tool to ensure everything is pointing to HTTPS:
- Go and download Interconnect IT’s Database Search & Replace Script here
- Unzip the file and drop the folder in your localhost where your WordPress is installed (the root) and rename the folder to
replace
(screenshot) - Navigate to the new folder you created in your browser (ex:
http://localhost:8888/wordpress/replace
) and you will see the search/replace tool - Enter your HTTP URL in the search for… field and the HTTPS URL in the replace with… field, for example:
- Search:
http://localhost/wordpress
- Replace:
https://localhost/wordpress
- Search:
You can click the dry run button under actions to see what it will be replacing before you execute the script. Once you’re done be sure to remove the /replace/
folder.
Also, I’d consider looking into the Remove HTTP plugin which will automatically scan your website and remove both HTTP and HTTPS protocols from your URL links. This way it will ensure that your website doesn’t have any mixed-content issues.