The Mastodon MarketPlace droplet comes with Nginx and Postgres SQL. The Nginx part is pretty straight forward however the SQL one - Postgres is not. Having said that, there are certain ways to do so.
Firstly, you’ll need to create an Nginx configuration file for your new domain. If you are uncertain how to do so, I’ll recommend using the following DigitalOcean tutorial:
As for the Postgres SQL part by default WordPress supports only MySQL and MariaDB. Having said that, there is a way to actually go around it, will use the Fork version of PG4WP. You’ll need to do something like the following (after you’ve added your Nginx configuration and pointed your domain to your droplet):
Create Database and User in your PostgreSQL
sudo su - postgres
create database your_database;
create user your_user with password ‘your_password’;
grant all privileges on database your_database to your_user;
tar -xzvf latest.tar.gz
rm -rf latest.tar.gz
Download and configure the Fork version of WP4PG in your WordPress directory
cd wp-content // go to wp-content
git clone https://github.com/kevinoid/postgresql-for-wordpress.git
mv postgresql-for-wordpress/pg4wp Pg4wp
rm -rf postgresql-for-wordpress
cp Pg4wp/db.php db.php
Configure the wp-config.php
/** The name of the database for WordPress */
define('DB_NAME', 'your PostgreSQL database name will go here');
/** MySQL database username */
define('DB_USER', 'your PostgreSQL database username will go here');
/** MySQL database password */
define('DB_PASSWORD', 'your PostgreSQL database password will go here');
/** MySQL hostname */
Run the Install Script
Point a web browser to start the installation script.
If you placed the WordPress files in the root directory, you should visit: http://example.com/wp-admin/install.php
If you placed the WordPress files in a subdirectory called blog, for example, you should visit: http://example.com/blog/wp-admin/install.php
Having said all of that, before actually starting this process, make sure to have a backup of your droplet!
Another thing, this is a workaround. In a perfect environment, I wouldn’t recommend using it and just create a new droplet.