Headache with SSL and Ghost

As a rule of thumb I always immediately update when there are security patches available. Not so with feature updates.

Recently I saw some interesting features that was included with Ghost so I installed the update I realized a lot has changed since I got disappointed with my site's rejection while applying for google adsense monetization. Truth is my contents aren't really unique and plentiful anyway that's for a different post.

After updating I notice 2 things I cannot successfully renew my SSL. I read it is due to acme.sh changing default certs to zerossl instead of letsencrypt. As a point of argument this change will only have an effect for new installs. Mine was a renewal. But when I checked I actually have both installed in separate folders and the active SSL is the one from zerossl. Everything was fine until last November when it was time to renew.

I followed all the suggestions from various communities (I will post them all here later) but none of them worked for my case. I then searched for google on how to remove ssl certs manually. I thought after removing the certs and applying for a new one all will be okay. Unfortunately that wasn't the case. I thought then that it was acme.sh, I even went as far as installing certbot to be able to install a letsencrypt certificate but no go. So I did the next thing that is guaranteed to work and if you read this up to here you probably have a headache too.

Anyway my solution was to . . .

1. Backup my ghost site's contents.

2. Backup Contents folder of my ghost installation.

sudo cp /var/www/ghost-installation-folder/contents /home/ghost-user/contents

3. Backup mysql database

mysqldump -u [username] –p[password] [ghost-database-name] > [ghost-dump-file.sql]

4. Remove current ghost installation

cd /var/www/ghost-installation-folder
# update system for good measure
sudo apt update && sudo apt -y upgrade
ghost uninstall

5. Check for any remaining folders and delete manually

cd /var/www/ghost-installation-folder 
sudo rm -r *
cd /var/www
sudo chown -R ghost-user:ghost-user ghost-installation-folder
sudo chmod -R 775 ghost-installation-folder

6. Reinstall ghost

cd /var/www/ghost-installation
ghost install

7. Follow all prompts, make sure to enable ssl cert and to use your existing database.

8. Restore your backup from step one. Then backup new content folder using step 2 just use a different name you can then mv or cp old contents folder back.

This should get you up and running soon with valid certs. Hopefully whatever happens you get to have your site back up. This is sort of a long cut but it saves me the trouble of troubleshooting. Enjoy.