Frequently Used SSH Commands Cheat Sheet for AWS LightSail and WordPress

SSH Codes / Shortcuts

This is the cheat sheet I created from needing to set up new WordPress MultiSite and Single Site instances in the AWS LightSail Cloud platform.

AWS LightSail Bitnami SSH shortcuts I frequently used:

Retrieve the WordPress password.

cat bitnami_application_password

Move into htdocs directory.

cd apps && cd wordpress && cd htdocs

Edit the wp-config.php file

cd apps && cd wordpress && cd htdocs && sudo nano wp-config.php

Set Domain for New Instance WP Multisite

  1. After your Lightsail browser-based SSH session is connected, enter the following command to change the directory to /opt/bitnami/apps/wordpress:
    cd /opt/bitnami/apps/wordpress
  2. Enter the following command to define the primary domain name for your WordPress Multisite instance. Be sure to replace <domain> with the correct domain name for your WordPress Multisite.
  3. sudo ./bnconfig --machine_hostname <domain>

    sudo ./bnconfig --machine_hostname

Restart the Web server.

sudo /opt/bitnami/ restart apache

Remove Binami Banner from the bottom left corner.

Remove the banner link to the Bitnami Info page, follow these steps:

sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1

If that doesn’t work, remove manually using:

$ cd /opt/bitnami/apps/wordpress/conf
$ sudo nano httpd-app.conf

Localize this line:

Include “/opt/bitnami/apps/wordpress/conf/banner.conf”

And replace to this one (just comment the line):

#Include “/opt/bitnami/apps/wordpress/conf/banner.conf”

then Restart Web Server:

sudo /opt/bitnami/ restart apache

Setup SSL:

sudo /opt/bitnami/bncert-tool

(you may need to update the plugin, just follow directions and then re-run the command.)

Then enter the domain list to cover (space-separated, www. and non-www. versions)

Set Main Instance Domain Name from IP Address .xip Single WP

sudo /opt/bitnami/configure_app_domain --domain


sudo /opt/bitnami/configure_app_domain --domain

I hope this helps!

– NR

Leave a Comment