How to install Ghost CMS on my VPS

Okay, so you’re not set up properly. This is what I would like you to do. Take your time and don’t miss a step. If you encounter any errors, stop, and post here.

sudo rm /etc/nginx/sites-enabled/default
sudo systemctl stop mariadb
sudo apt purge mariadb-*

Confirm you uninstalled MariaDB, by executing the following. If successful, there will be no output.

sudo dpkg -l | grep mariadb

Now we will remove all traces of MySQL.

sudo apt purge mysql-*

Once again, let’s check that this worked.

sudo dpkg -l | grep mysql

Now we will tidy up.

sudo apt autoremove
sudo apt autoclean
sudo rm /etc/apt/sources.list.d/mariadb.list

We can install MySQL8 now.

sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql.service
sudo mysql_secure_installation

When prompted, type n for password validation, and y for all other questions.

Now, let’s pause a moment. I’d like you to confirm this worked before we do a little SQL, and reinstall Ghost.

1 Like