googlewordpress

Install the WP-DBManager plugin

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

Approach A: Bitnami installations using system packages

If you install WP-DBManager you must add the htaccess example provided by the plugin into the wordpress-htaccess.conf file and you must create an empty .htaccess file in the backup-db directory to pass the plugin checks. To do it, run the commands below:

$ echo '<Directory "/opt/bitnami/wordpress/wp-content/backup-db">' >> /opt/bitnami/apache2/conf/vhosts/htaccess/wordpress-htaccess.conf
$ cat /opt/bitnami/wordpress/wp-content/plugins/wp-dbmanager/htaccess.txt >> /opt/bitnami/apache2/conf/vhosts/htaccess/wordpress-htaccess.conf
$ echo "" >> /opt/bitnami/apache2/conf/vhosts/htaccess/wordpress-htaccess.conf
$ echo '</Directory>' >> /opt/bitnami/apache2/conf/vhosts/htaccess/wordpress-htaccess.conf
$ touch /opt/bitnami/apps/wordpress/htdocs/wp-content/backup-db/.htaccess

Finally, once you activate the plugin in your WordPress dashboard, you must ensure that in the plugin DB Option the mysql and mysqldump paths are correct. For example, use the paths /opt/bitnami/mariadb/bin/mysql and /opt/bitnami/mariadb/bin/mysqldump.

Approach B: Self-contained Bitnami installations

If you install WP-DBManager you will need to create the /opt/bitnami/apps/wordpress/htdocs/wp-content/backup-db directory. To do it, you must connect to your machine through SSH, and run this command:

$ mkdir /opt/bitnami/apps/wordpress/htdocs/wp-content/backup-db

Once you have done it, you must add the htaccess example provided by the plugin into the htaccess.conf file and you must create an empty .htaccess file in the backup-db directory to pass the plugin checks. To do it, run the commands below:

$ echo '<Directory "/opt/bitnami/apps/wordpress/htdocs/wp-content/backup-db">' >> /opt/bitnami/apps/wordpress/conf/htaccess.conf
$ cat /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-dbmanager/htaccess.txt >> /opt/bitnami/apps/wordpress/conf/htaccess.conf
$ echo "" >> /opt/bitnami/apps/wordpress/conf/htaccess.conf
$ echo '</Directory>' >> /opt/bitnami/apps/wordpress/conf/htaccess.conf
$ touch /opt/bitnami/apps/wordpress/htdocs/wp-content/backup-db/.htaccess

Finally, once you activate the plugin in your WordPress dashboard, you must ensure that in the plugin DB Option the mysql and mysqldump paths are correct. For example, use the paths /opt/bitnami/mysql/bin/mysql and /opt/bitnami/mysql/bin/mysqldump.

Last modification September 7, 2021