Deploying Wordpress on Aws Lightsail and enabling HTTPS.
Tags: webdev, wordpress, awslightsail, cybersecurity
Published: 2022-12-07 20:33:01

Lightsail is a powerful virtual server and one of the easiest way to launch and deploy your web apps and websites.
This saves you from building a site from the scratch at the snap of your fingers because as developers time is critical.
You can deploy wordpress in Lightsailand authenticate with the following steps.
 Log into the lightsail console and create an instance


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7pxrb9nw9z3cob13vk85.PNG)
 Choose your prefered instance and image and blue print,select your instance location and your availability zone

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1ytfr4mk9eo9ky9r6j3.PNG)

Go on to choose the plan you want and can afford

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxqsfcailore0nwakzf0.PNG)
Go ahead and create your wordpress blue print deployed on lightsail instance
The next step is to connect to you instance through the SSH so you can get the Wordpress password

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lz8uucue6w1pd2e1klvk.PNG)
It results to this SSH  session where you run the 
cat $HOME/bitnami_application_password

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5e5newyth8rcm4yfnnlh.PNG)
This retrieves the application password and you sign into wordpress by using the public IP address going to the browser using this url http://PublicIpAddress/wp-login.php replacing "PublicIpAddress" with the public address IP of the instance


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4lma5afle4dp1omd0ju.jpg)


You go ahead to sign in to your wordpress site.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9aczwupe6v8a82rgkb9q.PNG)
There you are! signed into your administration dashboard of your wordpress website.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bh74qnnngl779itlpt1h.PNG)  
You need to attach a permanent IP address which is the static IP address because the public IP changes when you start and stop the instance then you connect the static IP to the instance.You find this under networking,name it then create.

Go ahead to create your DNS ZONE this is also found under networking to and map a domain to the lightsail instance.To deloy checkout the tutorial [https://aws.amazon.com/getting-started/hands-on/launch-a-wordpress-website/](url)

 Websites security gains the trust of users and you can achieve this by enabling Hyper text Protocol Secure (HTTPS) on your WordPress site .The assurance of encrypted data transfer on the website is gives the assurance of security.
 The Bitnami HTTPS configuration tool (bncert) is used enable HTTPS on your Certified by Bitnami WordPress instance on Amazon Lightsail. 
The tool requests certificates only for the domains and subdomains that  specified when making your requests
To enable the tool ,you will connect to the instance via SSH and it opens when you are successfully connected


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vz5gqg0z84qoe9sz0i8a.PNG)

Enter the following command to run the tool to ascertain it is installed 
sudo /opt/bitnami/bncert-tool this is the output



If it informs about an updated version,accept download then re-run the command again.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kv8hzkvco4csv5kfj35.jpg)


It will proceed further asking you to enter your primary domain name and alternate domain names separated by a space as shown.It would also ask how you want your website to be redirected.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jtvutkampvg6cef2tnjw.PNG)

Answer with a yes and continue
This was the website before it was encrypted


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pfz96iygrodhzo75p9dv.PNG)

When bcert tool enabled encryption

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot9zptdf63pqv012vm76.PNG)

The website after http has been added

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v8ijqmpnvmxzan81s6dn.PNG)