HERE IS THE NEXT ENTRY copied from my FC Support Ticket…
Ivan Rachev - FastComet Support Staff - 13th Sep 2021 (20:38)
Hello,
Apologies Jennifer, you can test the domain via hosts file by adding the following in the file:
45.79.48.52 pejs.us www.pejs.us
You can find more information on where to find the file, depending on the operating system of your device, in the guide below:
> https://www.fastcomet.com/tutorials/getting-started/local-hosts-file
Regarding the steps that I have done above, they are:
1. I have used SSH connection to execute the commands, or you can also use the in-built Terminal tool in cPanel.
2. Then I have gone to the ghost installation directory, in your case:
[namespac@txpro17 ~]$ cd PEJS
[namespac@txpro17 PEJS]$ pwd
/home/namespac/PEJS
[namespac@txpro17 PEJS]$ ghost ls
┌───────────────┬─────────────────┬─────────┬───────────────────────┬──────────────────┬──────┬─────────────────┐
│ Name │ Location │ Version │ Status │ URL │ Port │ Process Manager │
├───────────────┼─────────────────┼─────────┼───────────────────────┼──────────────────┼──────┼─────────────────┤
│ GHOST-O-MATIC │ ~/ghost-o-matic │ 4.10.2 │ stopped │ n/a │ n/a │ n/a │
├───────────────┼─────────────────┼─────────┼───────────────────────┼──────────────────┼──────┼─────────────────┤
│ PEJS │ ~/PEJS │ 4.13.0 │ running (development) │ https://pejs.us/ │ 2371 │ local │
└───────────────┴─────────────────┴─────────┴───────────────────────┴──────────────────┴──────┴─────────────────┘
[namespac@txpro17 PEJS]$
You can find it under the Location field after typing ghost ls, as shown above.
3. Then, I tried to start it via ''ghost start''' as seen in my reply above, which prompted the error with the Ghost version.
4. In order to increase the Node version, I had to install NVM on your account by running these commands:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source .bashrc
nvm install --lts
Then checking the node version via:
[namespac@txpro17 ~]$ node -v
v14.17.6
I should mention that this is currently possible only on some of our servers, due to the operating system that they are running, so in case the new node version generates errors, then that means that a change of the server is required. In time all servers will be migrated to a newer operating system, however, that is currently being slowly done, so there are still servers using CentOS 6.
On such servers, the node version can be changed by creating a dummy NodeJS instance via cPanel > Setup NodeJS and simply choose the version:
> https://prnt.sc/1s3da18
After which, copy and paste the following in the SSH session:
> https://prnt.sc/1s3dcxy
You will need to change the directory to your ghost for the next step again.
5. After the node version is done, in your case, I had to update the Ghost application in order to install the missing binary files as mentioned by the error:
Message: The installed node version has changed since Ghost was installed.
Help: Run ghost update 4.13.0 --force to re-install binary dependencies.
The command is:
ghost update 4.13.0 --force
6. I had to then go to the following directory:
cd content/theme
and created a symlink to the files of the casper theme, as it was missing in your case using the command:
ln -s /home/cPaneluser/ghostapp/current/content/themes/casper casper
In your case the command looked as follows:
ln -s /home/namespac/PEJS/current/content/themes/casper casper
The path is different on the different Ghost applications, so that is something to consider. The symlink looks as follows once done:
> https://prnt.sc/1s3du46
===========================
I would like to note that the errors could be seen by running:
ghost log
===========================
7. Now regarding the Stripe webhooks and the production mode, I found out the following guide that can help you migrate the SQLite database of your website to MySQL in order to switch to production:
> https://stanislas.blog/2019/09/migrating-ghost-sqlite-to-mysql/
Simply, you need to export the data of your website from the backend, which is why I needed the login details to:
https://pejs.us/ghost/
Then create a MySQL database via cPanel > MySQL Databases Wizard as described here:
> https://www.fastcomet.com/tutorials/cpanel/create-database
Copy the file config.development.json via SSH, FTP or File Manager to:
config.production.json
And replace:
"database": {
"client": "sqlite3",
"connection": {
"filename": "./content/data/ghost.db"
}
}
============
with:
"database": {
"client": "mysql",
"connection": {
"host": "mysql.host",
"port": 3306,
"user": "ghost",
"password": "thisisnotmypasswordbtw",
"database": "ghost"
}
},
As mentioned by the guide. In the guide after } at the end, there is not a comma, which should be added in order to avoid a syntax error. Above I have added it as you can see, so you can simply copy it from there. Of course, these values should be changed to:
"host": "localhost",
"user": "DATABASE USER",
"password": "DATABASE PASSWORD",
"database": "DATABASE NAME"
=================
The rest can be found in the guide, however, simply create a new user in the backend, delete all default contents and then import the JSON file that was created in the beginning. You can also create a backup of the whole Ghost directory using cPanel > File Manager > Compress or simply coping it to another place.
After that is done, the ghost should be working on production mode. However, in your case, the Stripe webhooks will need to be disabled in order to run it in development mode and proceed with the migration to MySQL.
Pretty much that is the whole process, Jennifer, even though I tried a couple of other things in order to make it work however since they were unsuccessful, I did not listed them. And, if you share that information, it is worth mentioned that each website is unique and even though that can serve as a base to troubleshooting or moving to production mode on our servers, there could be errors or obstacles that I have not encountered now, or do not come to mind.
We are remaining at your disposal of course, no matter the issue, and will gladly help you in any way we can.
Best Regards,
Ivan R.
Technical Support Team
--
Website: https://www.fastcomet.com/
Facebook: https://www.facebook.com/fastcometcloud/
Twitter: https://twitter.com/fastcometcloud/