Chris Mendez in Wordpress, AWS, EC2, LightSail

Bitnami WordPress Cheatsheet for AWS Lightsail

I'm currently working on two WordPress websites that have been pre-configured by Bitnami within a Virtual Private Cloud. Below are a few select commands I use all the time but only found them while scouring through forums and comment boxes. I hope this collection helps other WordPress managers save time.

How to install

Pick one:

Bitnami Specific Tricks

Remove Bitnami branding.

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

Change machine hostname.

sudo /opt/bitnami/apps/wordpress/bnconfig --machine_hostname  

Files, Paths, Directories

Apache Specific

Apache error logs.

nano /opt/bitnami/apache2/logs/  

Virtual Host.

nano /opt/bitnami/apache2/conf/bitnami/bitnami.conf  

WordPress Specific

Access wp-config.php

nano ~/apps/wordpress/htdocs/wp-config.php  

Access wp-content directory.

cd /opt/bitnami/apps/wordpress/htdocs/wp-content/  

Themes directory

cd /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/  

Plug-ins directory.

cd /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/  


Path to pre-installed SSL certificate.


Path to pre-installed private key.


Redirect non www to www.

Bitnami disables .htaccess by default files for security and performance reasons (Source, Source 2). Therefore, you can make edits in one of two other places.

Location 1

The first path is


Location 2

Open up bitnami.conf.


Add this VirtualHost

<VirtualHost _default_:80>  
  # Bitnami applications installed with a prefix URL (default)

<VirtualHost *:80>  
    Redirect permanent /


Restart Servers

Restart everything.

sudo /opt/bitnami/ restart  

Restart Apache only.

sudo /opt/bitnami/ restart apache  

Restart MySQL only.

sudo /opt/bitnami/ restart  mysql  

Ownership and Permissions

Plugins Directory

I see this error happen from time-to-time. You try to install a plug-in and you get an error about not being able to create a directory. More often than not, it has to do with permissions.

Change ownership.

sudo chown -R bitnami:daemon wp-content/  

Change permissions.

sudo chmod -R g+w wp-content/  


This topic is slightly more complex so I created a dedicated tutorial. Read more