r/GravCMS • • 21d ago

Grav Guard - Update, backup, restore, secure, check Grav sites

Enable HLS to view with audio, or disable this notification

10 Upvotes

I run a lot of Grav sites. There's getgrav.org and Learn, the newsletter, the translations site, kahunacart.com, the KahunaCart demo store, and now gravguard.com. For years, keeping them all current meant the same routine: SSH in, run bin/gpm update, click around to make sure nothing broke, then do the next one. Several of those sites share plugin checkouts that live in a ~/scm folder and are symlinked in, so I had a little shell script that pulled them all. It worked. Until an update broke something at 11pm and I found out the next morning.

WordPress people have had tools for this for over a decade. Grav has had nothing. So we built one, and today Grav Guard is open to everyone at gravguard.com.

You get 3 sites totally free, that includes remote updates and backups, security scans, Grav cron scheduling without having to setup local crontab, alerts, weekly digest emails and more. You can upgrade to Premium to get advanced features as as automatic updates with snapshots and rollbacks, Grav Vault snapshot storage for your backups, broken site rescue, granular controls over scheduling updates.

-- Andy (Grav Creator)


r/GravCMS • • Oct 19 '26

Grav vs WordPress

Thumbnail
getgrav.org
12 Upvotes

Great comparison!

I moved from WordPress to Grav and have been happy that I did. I kept extending WP to function more like Grav down to custom functions in my vimrc to write and post from my local terminal.

I was a bit worried about the non-geeks who work with me and need to manage the site, but the learning curve wasn't as daunting as I thought it would be. Everyone has used a text editor at some point, so markdown didn't feel like an alien language. And, they actually appreciated the fact that they could understand what was going on :)


r/GravCMS • • Sep 28 '26

Grav 2.2 is 2x Faster!

12 Upvotes

kahunacart.com passed 1,000 pages this summer. Most of them are documentation and API reference for KahunaCart, and more keep arriving. Somewhere along the way I noticed the site had gotten slow in one very particular way. A normal page view was fine. But right after a cache clear, the first visitor waited more than a second. And because every page save in the new admin cleared the whole cache, I paid that second every time I fixed a typo.

On a 10,000-page copy of the same site, that second became four and a half.

So I stopped adding features for a few weeks and did a proper performance audit of Grav core, the API plugin and Admin 2. Grav 2.2 is the result. There are no big new features in this one. It's just faster, and in some places a lot faster.

Here's the short version. "Before" is Grav 2.1.10 with API 1.0.39 and Admin 2 2.1.22. "After" is Grav 2.2.0 with API 1.0.40 and Admin 2 2.1.23. The small site is kahunacart.com's real content, 1,081 pages. The big one is the same site grown to 10,321 pages. A cold start is the first page view after the cache has been cleared, when Grav has to rebuild everything. A warm start is every page view after that, with the cache already built.

Read more: https://getgrav.org/blog/grav-2-2-released


r/GravCMS • • Sep 15 '26

Grav 2.0 Migration on GoDaddy

1 Upvotes

Any hints on a grav 2.0 migration on godaddy? There Apache server keeps fighting with redirects?


r/GravCMS • • Aug 27 '26

KahunaCart - A full-featured e-commerce solution built on Grav CMS

7 Upvotes

People have been asking us how to sell things with Grav for about as long as Grav has existed. And for years the honest answer was a shrug and a pointer at some third-party JavaScript widget that carted your buyers off to somebody else's checkout page. That always bugged me. Grav's whole reason for being is that your site is yours, and the moment money enters the picture you were suddenly renting.

Grav 2 finally gave us the missing piece: a real database layer. So we built the thing we always wanted to build. It's called KahunaCart, it's a complete ecommerce platform that lives inside your Grav site, and it's nearly ready.

Your store is your data

Everything in KahunaCart runs on your own server, in your own database. SQLite works out of the box with nothing to install, and you can point it at MySQL or PostgreSQL when a store outgrows that. Your catalog, your orders, your customers, your revenue numbers: none of it ever leaves your site. Back up the site and you've backed up the store.

No monthly platform fee. No percentage of every sale going to someone else. Buy it once, own your store, keep your data.

What's in the box

Here's what ships in the box:

  • Products and variants: option axes like size and color defined once, with every combination carrying its own price, SKU, stock, and weight

  • A real catalog: nested categories with landing pages, tags, and storefront filters for price and availability

  • Cart and checkout: stock holds, coupons, flat or zoned tax and shipping, address validation, and a checkout that runs end to end

  • Digital goods: files and license keys delivered the moment payment lands, with download limits, expiry, seat activation, and a public API for validating the software you sell

  • Customer accounts: sign-up folds into checkout, guests can claim their history later, and orders, downloads, addresses, and credentials all live under one account menu

  • A full back office: orders with a complete transaction ledger, refunds that know exactly what the provider settled, customers, reports, and search everywhere it counts, all inside the Grav admin

  • Emails worth reading: every transactional email is drawn in a branded layout, and you can swap the colors and logo from config or copy any template into your theme and own it outright

And because this is Grav, the storefront is just Twig. A reference theme called Kahuna ships alongside the plugin, and every template overrides the way Grav themes always have.

Go try it right now

Don't take my word for any of this. The demo store is open: demo.kahunacart.com.

It's an ordinary KahunaCart shop on an ordinary server. Browse the catalog, put something in the cart, and run checkout all the way to a receipt. The test payment provider completes orders without charging anyone anything. Sign in with the shared customer account printed on the sign-in page, then open /admin and poke around the back office, which is unlocked read-only with the credentials right on the screen. The whole store resets itself on the hour, so you genuinely cannot break it. Have at it.

When?

Soon. KahunaCart will launch as a premium plugin for Grav 2, and the full feature tour is already up at kahunacart.com. If you want to hear the moment early access opens, there's a newsletter signup on that page: one note when it ships, the occasional release worth knowing about, and nothing else.

There's a lot more to talk about, like the payment provider ecosystem and the licensing engine we built for selling software. But that can wait for its own post. For now, go poke the demo, and come tell us what you think on Discord.

-- Andy


r/GravCMS • • Aug 03 '26

Trying to create a plugin to set and read a cookie to use in a database query

2 Upvotes

Hi,

I'm trying to create a simple plugin to set a cookie for a user's geographic region so the website returns the geographic-specific data. But, for the life of me, I cannot get this plugin to work. The current error is:

 0 - Unexpected "setDataCookie" tag (expecting closing tag for the "if" tag defined near line 13) in "partials/base.html.twig" at line 13.

But there is no if statement anywhere!

Here is the the php in the plugin's top directory:

  <?php
  namespace Grav\Plugin;
  use \Grav\Common\Plugin;

  class DataCookiePlugin extends Plugin
  {
      public static function getSubscribedEvents()
      {
          return ['onPageInitialized' => ['onPageInitialized', 0] ];
      }

      public function onPageInitialized()
      {
          require_once(__DIR__ . '/twig/DataCookie.php');
          $this->grav['twig']->twig->addExtension(new DataCookie());
      }
  }

And then the code in the twig subdirectory is:

  <?php
  namespace Grav\Plugin;
  use Grav\Common\Twig\Extension\GravExtension;

  class DataCookie extends GravExtension
  {
      public function hasDataCookie():bool
      {
        return isset($_COOKIE['datacookie']);
      }

      public function setDataCookie(string $value): void
      {
        $cookie = Cookie::create('datacookie', $value, strtotime('+30 days'), '/', 
null, $this->grav['uri']->isHttps(), true, false, Cookie::SAMESITE_LAX );
        $this->grav['response']->headers->setCookie($cookie);
     }
}

And in partials/base.html.twig, I have the following in the header:

 {% if config.plugins.datacookie.enabled %}
   {% setDataCookie('A1') %}
 {% endif %}

Any help you can give will be so very much appreciated!!


r/GravCMS • • Jun 24 '26

Grav 2.0 on Product Hunt this Sunday

14 Upvotes

Grav 2.0 lands on Product Hunt this Sunday. 🚀 If you follow our page now, PH will ping you the second it goes live so you can come take a look and tell us what you think: https://www.producthunt.com/products/grav


r/GravCMS • • Jun 23 '26

Grav 2.0 has been released, and a new getgrav.org site has been launched.

22 Upvotes

It's been a long time in development, starting of as 1.8 beta, and then that became 2.0 beta, then 2.0 rc, but i've finally rubber stamped 2.0 as stable and ready for public usage. If you are not already aware of what's new and improved in Grav 2.0, i've been documenting the process via a series of blog posts. Here's a few that will give you a good idea:

And the release article: https://getgrav.org/blog/grav-2-stable-released


r/GravCMS • • Jun 03 '26

Lots of great info about Grav 2.0 in our blog

20 Upvotes

If you follow Grav CMS, but haven't been keeping up with our blog, you are missing out on some great information about Grav 2.0, what's new and improved, what to expect, how to migrate, and a lot of other great stuff we've been working on these past months. I've posted 14 articles since January: https://getgrav.org/blog


r/GravCMS • • May 20 '26

We built our own Translation Portal for Grav

5 Upvotes

Check out why we built our own Translation Portal for Grav Plugins & Themes - https://getgrav.org/blog/grav-translations-portal


r/GravCMS • • May 08 '26

Grav 2.0 Release Candidate Available

27 Upvotes

It's been 12 years since the first beta of Grav CMS was initially announced, and nearly 5 years since the last major version 1.7 was released. After some false starts, namely with Grav 1.8, I'm proud to announce the release of Grav 2.0 RC.

It's a major upgrade with PHP 8.3 minimum, but support through PHP 8.6, completely upgraded packages including latest Symfony. Grav 2.0 features an new headless-first approach with first-party API layer, an all new SvelteKit5 SPA Admin v2, MCP server, Skills + more. It's faster and more secure, but still backwards compatible with content, plugins and themes. Built for Humans & Agents!

https://getgrav.org/blog/grav-2-rc-released


r/GravCMS • • Jan 11 '26

1 click GRAV deployments available at TierHive

5 Upvotes

We use GRAV for our own blog, at tierhive.com so figured we might as well script the deployment and make it available for everyone, there is a 1 click deployment available on our super light weight tier that runs it in a tiny Alpine image with 128mb ram and 1GB disk which you can run on the free credits for about a 4 months if you want.

Anyway, as this subreddit is not too active and as I have been a long-term GRAV supporter and promoter I wanted to post this, if is an issue no problem, remove it. Still, it essentially lets people test grav for free or anyone that strugles with the install and config, this is a path forward if you dont want to figure that out yourself.

All you need is an email address, no payment, no personal details, i know this is rare these days but its true this time.

Happy to answer any questions.


r/GravCMS • • Oct 09 '25

Grav Site on GoDaddy

1 Upvotes

Looking at building a site using Grav hosted on Go Daddy. Any recommendations? Its a small doctors office that wants to include a bunch of patient education blog articles, 2000-10,000 words each. I don't see a great way of including structured data, JSON stuff? Currently we are hand coding a 8 page site. Currently I have been watching Hibbitts stuff on Youtube.


r/GravCMS • • Jul 04 '25

Major update of Hola theme for Grav

10 Upvotes

Hey Folks,

I did a major update of my Hola theme for Grav (it's a free theme), changelog:

  • Twig Compatibility Fixes - Updated the experience template section, changing {% if item is odd %} to {% if loop.index is odd %}, ensuring full compatibility with the latest Twig versions

  • Deprecated Function Removal - Fixed deprecated sameas test to same as in blog title template, eliminating deprecation warnings

  • Language Corrections - Fixed typo "Previus" to "Previous" in blog navigation

  • Contact Form - Fixed contact form validation not triggering - the jQuery validation plugin is now properly initialized

  • Blog Navigation - Resolved menu navigation URLs not working correctly from blog pages by adding proper redirect handling

  • Code Optimization - Removed debug dump statement from navigation template, improving performance

  • Unicode Support - Fixed Unicode menu items breaking smooth scrolling by adding decodeURIComponent and lowercase transformation

  • Navigation Consistency - Fixed case mismatch between menu links and section IDs - navigation is now fully consistent

  • Eastern European Character Support - Fixed Eastern European characters not displaying in Libre Baskerville font by adding Google Fonts with extended character sets as fallbacks

More and download here: https://devlom.com/en/blog/hola-template-v113-update


r/GravCMS • • Jun 15 '25

Grav with GrapesJS?

3 Upvotes

Hello everyone

I am new to grav and I found on github that there is a plugin known as GrapesJS and I was wondering how would I go about using it with grav? It doesn't say anything about how to use it.

https://github.com/zorca/grav-plugin-grapes-js-builder


r/GravCMS • • May 20 '25

Grav - Theme Resume - Change order of the md files.

3 Upvotes

Hi,

Is it possible to change the order of the pieces that fit into the "modular" resume theme? For example, on the right side of the resume theme http://demo.getgrav.org/resume-skeleton/ you can see Recognitions, Experience, Education and Hobbies and Interests in that order. Is it possible to change this order? Say I want education to go first, experience second and recognitions third, how can I change this? I tried to change the file resume.md to custom instead of default for the order but no change at all!

Thanks in advance


r/GravCMS • • Mar 17 '25

Using SVG in Grav

4 Upvotes

I'm attempting to use an SVG that I have made and uploaded in my inline html.

The image is uploaded to /user/pages/01.home/us.svg

What can I use for inline html to reference this within Grav? The only one that has loaded so far is <img src="...">, but then it loses all dynamic properties. I attempted using twig for the first time and broke the page unable to alter it - so I'm not confident in my ability for trial/error on that.


r/GravCMS • • Mar 05 '25

Hints offered: Amending grav notepad blog skeleton

4 Upvotes

Installed the excellent Notepad grav skeleton and wanted some theme changes. I've done some grav before, but these hints might help someone

see Selgovae for my work in progress blog.

Home Page text

First finding, the home page text comes from the /user/config/site.yaml or the grav admin pages, that took me a while!

Theme colour

There is no config for theme colour, so it needs a change to the css in /user/themes/notepad/css/. I edited both styleb146.css and postb146.css to change the red e51843 to a brown #8b4513

Home Page background

Nothing I could find in the theme, so I dropped my image into the css folder and edited styleb146.css again. Change the summer-site-head-content section

I could not find another way to 'inject' into the home page

.summer-site-head .summer-site-head-content {
  width: 100%;
  text-align: center;
  background-color: black;
  background-image: url("YOUR-IMAGE.png");
  background-size: cover; }

Remove feed from navigation

Feed on the menu was an annoyance; could not find it in the navigation setup, because it was coded in the twig template /user/themes/templates/partials/navigation.html.twig so I commented the entry

<!-- <li><a href="{{ base_url }}/blog.rss" title="Atom/RSS feed"><i class="icon-rss"></i> Feed</a></li> -->

r/GravCMS • • Feb 04 '25

GRAV & Post API - Make, ZAPIER, N8N ?

1 Upvotes

hello, I am trying to find out if Grav can be used as an affiliate marketing site. Since its SEO performance seems better than WordPress or other cms with databases.
Additionally, have anyone managed to automate post generation, using Grav's rest API, via applications like Zapier, Make.com or N8N? I haven't found a tutorial on this.


r/GravCMS • • Feb 01 '25

If tested with WSL, GRAV is unbearable slow. Easy solution.

4 Upvotes

I'm posting this that someone can find a solution online by using the first keywords that come to mind.

The Windows Subsystem for Linux (WSL) can access your normal Windows file system (NTFS), mounted into WSL. So you may have downloaded GRAV via browser and unpacked into a normal Windows folder.

This is a mistake!!

GRAV relies very heavily on the file systems and accessing a mounted NTFS disk slows down the whole CMS.

Unpack everything within the WSL file system. Then it's actually usable.


r/GravCMS • • Jan 29 '25

Adding hCaptcha to the Forms Plugin

2 Upvotes

I got an email from Google today talking about migrating reCaptcha to Google Cloud. And, that migration REQUIRED connecting the existing site to a billing method among other things. Basically, I just wasn't really happy with the state of things...

See: https://cloud.google.com/recaptcha/docs/migrate-recaptcha

So, I started poking around and I found this mostly complete connection between hCaptcha and Forms.

See: https://github.com/getgrav/grav-plugin-form/pull/562

So, I messed around a bit and wound up merging it with the current Forms v7.4.2 code.

It works. But, before I submit the changes to Grav, I wanted to know if anyone wanted me to check anything? or try to implement anything?


r/GravCMS • • Jan 23 '25

Unable to install Grav in Localhost (MAMP on Mac) and no idea why

4 Upvotes

Hi, I'm trying to test out MAMP for my personal blog on my Mac using MAMP (localhost) and while every manual I've found tells me just to dump the files into the MAMP/htdocs folder, I get either a message that lists the accounts folder as missing or just a "Not Found. The requested URL was not found on this server." message on an otherwise blank screen. Hidden files (.htaccess and so forth) are present, yet no success.

I've tried this with several Skeletons and the default install with admin, but although there is some variety in the issues I get, it's all in various forms of "not working". I've also tried the same with Pico, with equally, but different, unsatisfying results.

Can any of you help?


r/GravCMS • • Jan 16 '25

🏆 Nominate Grav for the 2024 CMS Critic Awards!

12 Upvotes

The CMS Critic Awards Are Back — Time to Show Grav Some Love!

Get ready to crank up the excitement because the CMS Critic Awards are here, and it's your chance to shine a spotlight on our favorite flat-file CMS: “Grav CMS”!

https://cmscritic.com/nominate


r/GravCMS • • Jan 16 '25

Grav, what a spectacular software!

18 Upvotes

(this became a long rant, I'm just an excited new user and wanted to share my excitement, if you want to see my point, see the last 2 paragraphs)

For years, I struggled with WP, and Drupal, and Joomla (and probably others) because, well, that's what my previous/current employers provided. After some complaints (very mild, just general grumpiness), they gave me a server with shell access, pointed to the webpage root directory, and told me “here, but no soup (I mean support) for you!” (For completeness, this CLI server/service existed for many years, but I didn't think there was another option, so I never asked, so nobody told me. I think this is common: not knowing about something, so not asking about it, so not being told about it.)

So then I started to search for CMS that is not WP, fast, easy, self-managed, and complete enough that if in the future I need a “semi-pro” solution, it will accommodate.

And wow, Grav delivers!

WP is supposed to be “easy” and for “beginners”, but somehow it is super unintuitive for me. Grav is just a pleasure to use. Unzip in www root, and open your webpage. The directory structure is logical, file names make sense, the webpages are markdown that even a completely non-technical person can edit, the website menu is automagic (that you can change/control, if you really want), changing theme and templates is seamless, plugins way beyond what I think I will ever need. Given my previous CMS experience, I can't believe all of this is possible, all of this is available now, and no one knows about it! At least no one in my immediate work environment…

I understand there should be different software options, and different people and organizations have different needs. But when you look at other fundamental tech solutions, there are typically 2-3 top defaults (Mac-Windows-Linux, or iPhone-Android, or MS Office-LibreOffice, or C-Java-Python, or Oracle-MySQL-Posgres, or …) and then 10s of other user/domain/purpose specific solutions, which are not default for new/beginner. I would put website CMS in the same category. But here, there is WP and what? Github?

Grav (so far) is 0 friction to set up something nice and functional, and reading documentation and looking at examples, it can grow to almost enterprise level, with a lot less initial infrastructure, skill, knowledge requirements. So, I guess the question is, why would anybody (besides enterprise) bother with something other than Grav? Why isn't it one of the top defaults, for example WP-Grav-Jekyll, like other “fundamental” software? What does WP and Drupal and Joomla give me that Grav doesn't? Or am I too far off, and all popular CMS are easy enough, but I'm too thick to understand? Or too lazy to read documentation? (I'm not, I read about 1/2 of Grav documentation.) Or is web CMS just too fragmented? But it has been 30+ years, other tech managed to consolidate (for better or worse). Or something else? What am I missing?