0

I am used to shared hosting with a cpanel. I have just started learning VPC and can't seem to wrap my head around how lightsail Bitnami Wordpress (the one-click installation) instance work.

MySql database:
The MySql database costs $18/month.

  • Is it a separate database from Wordpress?
  • Does the Bitnami Wordpress installation come with it's own database?
  • When we do a Wordpress backup, without creating the MySql database instance, how does the backup of Wordpress database work? Will it not backup?
  • Or with the snapshot, we do not have to do the usual Wordpress backup?
  • If I have the MySql database instance, will the Wordpress installation automatically work with the MySql database?
  • If I have multiple Wordpress Instances (not multi-site Wordpress), do I have to create an individual MySql database for each?
  • With the Bitnami Wordpress Instance, can I add a cpanel to it?

Thanks

Organic Heart
  • 157
  • 1
  • 8
  • "Database" has multiple meanings -- The server; the MySQL instance; the set of tables (WordPress vs MyTable vs ...). – Rick James Mar 25 '20 at 16:23

1 Answers1

2

Bitnami Engineer here,

  • Is it a separate database from Wordpress?

No, the Bitnami WordPress solution in Lightsail is a SingleVM deployment where Apache, PHP and MySQL are included inside the same instance.

  • Does the Bitnami Wordpress installation come with it's own database?

We configure the database (create a new user and database for WordPress) and configure the application to use it. It has basic information about the WordPress' admin user when you deploy it. Of course, you can configure WordPress to use a separate MySQL database.

  • When we do a Wordpress backup, without creating the MySql database instance, how does the backup of Wordpress database work? Will it not backup?

You can create a WordPress backup easily by using the All in One Migration plugin. Once you install it, you can import/export the data in a few clicks

https://docs.bitnami.com/aws/how-to/migrate-wordpress/

  • Or with the snapshot, we do not have to do the usual Wordpress backup?

If you create a snapshot of the instance, and as all the components are included in the same instance, you don't need to take any other backup to save your data. Once you deploy the snapshot you create, the information will be the same than the one you had when creating it.

  • If I have the MySql database instance, will the Wordpress installation automatically work with the MySql database?

WordPress is configured to use MySQL by default. It uses the local database but as I mentioned before, you can use an external database if needed. You just need to change the WordPress configuration at /opt/bitnami/apps/wordpress/htdocs/wp-config.php.

  • If I have multiple Wordpress Instances (not multi-site Wordpress), do I have to create an individual MySql database for each?

If you want to deploy different WordPress apps on top of the same instance, you will need to follow these steps. These steps assume that your application will live in the /opt/bitnami/apps/myapp/ directory:

1) Run the following commands to create the directories and assign the necessary permissions:

sudo mkdir /opt/bitnami/apps/myapp
sudo mkdir /opt/bitnami/apps/myapp/htdocs/
sudo mkdir /opt/bitnami/apps/myapp/conf
# Copy the WordPress files to this htdocs folder and configure the permissions            
sudo chown -R bitnami:daemon /opt/bitnami/apps/myapp/htdocs/
sudo chmod -R g+w /opt/bitnami/apps/myapp/htdocs/

2) Create and edit the /opt/bitnami/apps/myapp/conf/httpd-prefix.conf file and add the line below to it:

Alias /myapp/ "/opt/bitnami/apps/myapp/htdocs/"
Alias /myapp "/opt/bitnami/apps/myapp/htdocs/"
Include "/opt/bitnami/apps/myapp/conf/httpd-app.conf"

3) Create and edit the /opt/bitnami/apps/myapp/conf/httpd-app.conf file and add the content below to it. This is the main configuration file for your application, so modify it further depending on your application’s requirements.

<Directory /opt/bitnami/apps/myapp/htdocs/>
    Options +FollowSymLinks
    AllowOverride None
    <IfVersion < 2.3 >
    Order allow,deny
    Allow from all
    </IfVersion>
    <IfVersion >= 2.3>
    Require all granted
    </IfVersion>
</Directory>

NOTE: If your application uses .htaccess files, you should change the AllowOverride None option to AllowOverride All. Find out how to move the .htaccess file content to the main server configuration file.

4) Once you have created the files and directories above, add the following line to the end of the main Apache configuration file at /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf, as shown below:

Include "/opt/bitnami/apps/myapp/conf/httpd-prefix.conf"

5) Restart the Apache server:

sudo /opt/bitnami/ctlscript.sh restart apache

You should now be able to access the application at http://SERVER-IP/myapp.

More information here: https://docs.bitnami.com/aws/apps/wordpress/administration/create-custom-application-php/

  • With the Bitnami Wordpress Instance, can I add a cpanel to it?

The Bitnami solution doesn't use the system's packages. All the services are inside the /opt/bitnami folder so I don't know if cpanel supports that. We do not provide support for it by the way.

Jota Martos
  • 326
  • 1
  • 4
  • Thanks! the All-In-One doesn't back up database separately. I tried with other plugin like backupbuddy, the database backup is not supported like I have used it with other wordpress applications either. Is this because of the bitnami setup? Does it mean we can't backup just the database only without using the managed Mysql instance? – Organic Heart Mar 14 '20 at 23:02
  • I don't know if there is a specific plugin to backup the database. You can ask the app's developers to know more about that. Why don't you want to use the All in One plugin to backup the entire information of your site? – Jota Martos Mar 18 '20 at 14:21
  • Thanks. AIO doesn't allow editing it seems? There are many plugins that backup the theme, database and content separately but they don't work with bitnami. Maybe is just how I work, I find it faster to backup only the database and it makes editing easier too. Most of the time, only the database requires editing, hence a backup while everything else remains the same. – Organic Heart Mar 20 '20 at 11:42