Updated 4/17/2023: Revised command code in light of another user's suggestion to use recursive -R. Also, note to not use the forwardslash for your Grav directory.
After over a decade of dormancy, my website running on outdated WordPress and SQLite to bypass the need for MySQL finally had too many upkeep issues. In looking to port it over to a new system, I decided to try Grav. Grav is a flat-file CMS so it does not need MySQL to run as WordPress does. https://getgrav.org/ Now, I just need to slowly add back the old content and figure out the features of Grav.
So far, it has been easy to setup. However, I did run into some undocumented issues trying to set it up with NearlyFreeSpeech. Some of NearlyFreeSpeech’s security measures proved problematic for Grav installations. I saw a few posts where people tried and ultimately gave up on NearlyFreeSpeech to switch to another webhost.
However, after trying it out, I think I have figured out the primary issues that have hindered previous setup attempts on NFS. For those of you trying to setup Grav on NearlyFreeSpeech, here are a few things I have figured out that may not be readily apparent.
NearlyFreeSpeech Runtime Errors
The fundamental problem with Grav and NearlyFreeSpeech was runtime errors after copying everything over to the site. On the Grav documentation, the only suggestion is that there are permission problems with the octal settings. However, that is not the actual problem with NearlyFreeSpeech. Instead, the problem is who the assigned group is and you will have to change this. To do this:
Once you make this change, Grav should be able to run without issue.
--
Problem and Workaround: Adding Custom Logo
One quirk with NearlyFreeSpeech and Grav that I was not able to cleanly resolve was updating the website logo. For whatever reason, the owner/group of the custom logo temporary file was running into permissions problems. I tried what others online talked about in terms of changing umask settings without success.
If you have already run into this error and cannot delete the file in NFS, you can “repossess” the files through NFS. In the NFS Site Manager, there is a “Repossess” option on the right side menu. Type in the directory you want and it will repossess all files within the folder. Once you do this, you will be able to delete the files.
Solution: To resolve this, I ended up just going with the simple solution. I created an SVG file for the logo and renamed it to match the default SVG file. I then just replaced the default SVG file. One minor note if you have not used an SVG file before. If your uploaded SVG somehow has artifacting where additional stuff is being displayed, open the file in notepad to take a look at the code. Some software may introduce additional text that causes an issue with Grav’s displaying.
--
Icon in Your Browser Tab - Favicon
Same as the custom logo issue, replacing the default favicon is the simplest way to get your favicon in place. Depending on the theme you use, there may be a default icon or logo in your browser tab. This is the favicon, which is a 32 pixel x 32 pixel logo saved in a png file format. The default favicon should be saved in your theme’s images folder. In Quark (Grav’s preloaded theme), the favicon is in:
[wherever Grav is installed]/user/theme/quark/images
You can either just rename your new favicon to replace the “favicon.png” file (easiest) or redirect to your new favicon. Refreshing in your browser may not be sufficient to update the favicon after updating your favicon. If so, you will need to delete your browser cache to get the new favicon to display.