WordPress with AWS Lightsail

Amazon Lightsail is a simple and cheap way to install a WordPress in just a few minutes. The installation takes less than 10 minutes and paying less than $5 USD per month. Lightsail is a “next-next-finish” or “click solution” to host simple applications like WordPress, Magento, Nginx or just a server with Linux or Windows.

The plan starts from $3.50 USD for a 512MB, 1 vCPU, 20GB. With full access over the instance and with SSH enabled. Lightsail provides the feature to create new instances from a snapshot, too cool to be real. See plans and prices.

Steps for the installation

1 – Select the instance location

2 – Select the instance platform between Linux or Windows

3 – Select the application

4 – Choose plan

5 – Create an instance name and tags

This process takes a few minutes. Now Amazon AWS is provisioning your brand new instance with the selected configuration. After this process, you can access your new WordPress blog.

The Instance details

6 – Connect in your instance using SSH

It is easy to connect into the instance using SSH terminal in your web browser. Click on the button “Connect using SSH” to open SSH terminal. The command below is to retrieve the WordPress password for the admin user “user”.

cat bitnami_application_password

The browser SSH terminal is handy but has limitations. It is easy to connect using SSH terminal on Mac/Linux or to use Putty for Windows. Download the certificate to SSH your instance. Click on the Account Page link

For the SSH connection is necessary to download the certificate. Without this certificate is not possible to connect in the instance.

Click on the download option to retrieve the LightsailDefaultKey.pem. Copy it to a folder of your choice. To avoid the error below is necessary to need to grant the correct permissions to the certificate file LightsailDefaultKey.pem

The authenticity of host '34.243.143.146 (34.243.143.146)' can't be established.
ECDSA key fingerprint is SHA256:LGI6TDbm4DL+gSpPQXVnU6L2r8zhx59C7+MCs/D0h1A.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '34.243.143.146' (ECDSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'LightsailDefaultKey-eu-west-1.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'LightsailDefaultKey-eu-west-1.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "LightsailDefaultKey-eu-west-1.pem": bad permissions

The command below is to grant the permissions.

sudo chmod 0644 LightsailDefaultPrivateKey-eu-central-1.pem

Connecting into the instance using SSH terminal. Run the command replacing the IP for your own instance IP address.

ssh bitnami@ip_address -i LightsailDefaultKey-eu-west-1.pem

Login into your new WordPress admin

First, you need to retrieve the password generated by Bitnami. Connect into your instance via SSH and run the command below. It prints out the default user password. Now you can log in to the WordPress using the credentials “user” and the password retrieved from the command below.

cat bitnami_application_password

Don’t forget to change the password after your first access. Go to your profile and change the password or create a new admin user and delete the old one it is to avoid malicious connections into your WordPress application.

Disabling Bitnami banner

The Bitnami banner is displayed at the bottom right corner of the page. This banner will show some information regarding your WordPress setup

SSH the instance and run the commands below

sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1
sudo /opt/bitnami/ctlscript.sh restart

To point your new WordPress to a DNS server is better to configure a static IP. Select the “Networking” tab and then click on “Create static IP” button.

Connect into your DNS Server Provider like Hostgator and place the entries below.

@ IN A ip_address
www IN ip_address

Now you have your own WordPress instance and it took less than 10 minutes.



Leave a Reply

Your email address will not be published. Required fields are marked *