Whether you’re creating your own website or developing a WordPress website for a client, probably you’re doing it first on your localhost. In most cases, you or your client will ask you to run the online website with an SSL certificate for more security and higher rankings in Google.
In the past, I struggled to create a successful SSL certificate on my localhost setups and I bet you struggled too. Now, I’ll show you ‘easily’ how to run HTTPS on localhost for WordPress.
Run HTTPS on Localhost for WordPress
As I promised, you’ll not have to run any scripts or write any single line of code. All you need is to download and install Local by Flywheel. Local is a WordPress development tool. It has a ton of features and you can read about it in our in-depth review.
Once you install Local, create your first site. (Detailed instructions can be found here)
Mostly, your created local installation will have this URL
To create the SSL certificate for your website, open Local and select your website. Under SSL tab, click the ‘Trust’ button.
Then, login to your website and go to
Settings -> General and add the HTTPS version of your website by changing
https:// and save the changes.
Instantly, WordPress will log you out and ask you to login again using the new HTTPS connection.
Congrats! You could run HTTPs on localhost for WordPress successfully.
Already Have a Local WAMP/MAMP Website?!
You might be asking, what if I have my site is already running using WAMP or MAMP. Don’t worry, there are many ways to migrate your website to Local. You can do it manually, or by using the Duplicator plugin as shown in this guide.
Taking into consideration that Local provides you with a simple interface to manage/create your databases.
That’s all, hope you find this guide helpful. If you have any quesitons, please don’t hesitate to use the comments section below!