This article focuses on installing Ghost Blog directly from Github into Plesk Obsidian.
The screenshot below demonstrates various tools to deploy Ghost Blog on Plesk. The tools are mostly plug-and-play, but there are a few of them.
Step 0 - Manage DNS
The first step is to verify that your domain name is pointing to your DNS. This article will not cover these steps, but there are tons of articles on Google if you query
connect a domain to DNS on Plesk.
Step 1 - Manage SSL Certificates
Plesk integration with Let's Encrypt makes it very easy to create a new SSL certificate for free.
Step 2 - Manage Database
Create a database for the blog itself. You will need the database name, username, and password later.
Step 3 - Build Ghost from Source on Local Computer
yarn global add knex-migrator ember-cli
git clone --recurse-submodules firstname.lastname@example.org:TryGhost/Ghost && cd Ghost
Despite Git posts titled 'No More Grunt', grunt is still used.
npm i grunt --force
npm audit fix --force
This command uses
yarn to install your NPM packages,
knex-migrator to configure your database and
grunt to kickstart even more magic.
npm run setup
Substep A - Build App
This command will compile key files that live in
npm run build
Substep B - Modify for Plesk
Plesk requires an
/app directory so it's just easier to add it in right now.
echo 'scripts-prepend-node-path=true' >> .npmrc
Substep C - Package for Prod
zip file is missing assets files within
/core/built/* so we'll need to build them.
Lets compile your app for production.
grunt release --zip
Step 4 - Manage File Manager
Visit Plesk's File Manager tool and select
httpdocs folder. Drag the
zip file into the directory
Substep A - Upload & extract
You can drag your
zip file over to the
/httpdocs folder within file manager.
When you extract the files, make sure the extracted files are on the
/httpdocs folder (not in a Ghost folder).
Substep B - Create
Create a new file name ```/httpdocs/.npmrc``. Then insert this line of code.
Note: The reason why we're adding a hidden file here –and not in a previous step– has to do with Grunt. Grunt often ignores hidden files but I don't want to mess with Grunt files at all.
Substep C - Create
Create a blank
app folder within
httpdocs. The final result will look like this =>
Substep D - Edit
/core/shared/config/ folder and edit these two files.
Substep E - Edit
Step 6 - Manage Node.JS App
Visit Plesk's Node.JS tool and enable the application.
Substep A - Set Version of NodeJS
Currently, Ghost Blog is using Node version
Substep B - Configure Document Root
/httpdocs/app for Document Root.
Substep C - Configure Application Root
/httpdocs/ for Application Root.
Substep D - Configure Application Startup File
Change the startup file of the Node.js application to
Substep E - Install Packages
Select the "[NPM Install]" button to install the NPM packages Ghost Blog requires.
Substep F - Run Ghost Setup
Select the "[Run Script]" button, type
setup, and select "[Run]" to install and build the application.
Substep G - Restart NodeJS App
Select "[Restart App]" to get things working.
Step 7 - Done!
Visit https://www.mywebsite.com/ghost to complete your application installation.