Grav CMS

This article is a mashup of a couple of pages taken from the Grav CMS official documentation.

What is Grav?

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. Although Grav follows principles similar to other flat-file CMS platforms, it has a different design philosophy than most.

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

  • Twig Templating
  • Markdown
  • YAML
  • Doctrine Cache
  • Symfony Event Dispatcher
  • Symfony Console

Grav's Place in the Universe

There are many powerful open source CMS solutions for building complex websites. Some of the more commonly used ones are Joomla, WordPress, and Drupal. The downside of these platforms is that they have a steep learning curve associated with them. This requires a significant amount of your time - and this may be the time that you do not have.

These platforms provide a wealth of features and functionality that you can extend with a wide variety of open source and proprietary plug-ins and themes. These extensions and themes are themselves often feature-packed, requiring more knowledge and time on the part of the developer yet.

In the end, you often find yourself creating a website that requires many plugins and extensions from many different vendors. This can make your design overly complicated and difficult to maintain over the long term.

Grav tackles the problem differently. It focuses primarily on your content and turns your content structure into a navigable site. The underpinnings of Grav are simple, yet via extensive events, you have complete control over every step in the Grav workflow.

This solution allows simple plugins to quickly and easily add powerful functionality. Using Grav also leads to a rapid development environment with an installation process that takes seconds, including a straightforward content creation method with a minimal learning curve. All of this contributes to making Grav friendly to the designer, the developer, and the end user.

To get a basic site up-and-running requires minimal Web development experience. If you dig a little deeper, you will discover that there is very little Grav cannot accomplish.

Requirements

Grav is intentionally designed with few requirements. You can easily run Grav on your local computer, as well as 99% of all Web hosting providers. If you have a pen handy, jot down the following Grav system requirements:

  • Web Server (Apache, Nginx, LiteSpeed, Lightly, IIS, etc.)
  • PHP 7.3.6 or higher
  • hmm... that's it really, (but please look at PHP requirements for a smooth experience)!

Grav is built with plain text files for your content. There is no database needed. A PHP user cache such as APCu, Memcached, or Redis is highly recommended for optimal performance. Not to worry though, these are usually already part of your hosting package! Web Servers

Grav is so simple and versatile that you don't even need a web server to run it. You can run it directly off the built-in PHP webserver, as long as you're running PHP 7.3.6 or later. Testing with the built-in webservers is a useful way to check a Grav install and perform some brief development, but it is not recommended for a live site or even for advanced development tasks. We've outlined how in our Installation guide. Even though technically you do not need a standalone web server, it is better to run one, even for local development. There are many great options available:

Mac

  • MacOS 10.14 Mojave already ships with the Apache Web server and PHP 7.1, so job done!
  • MAMP/MAMP Pro comes with Apache, MySQL and of course PHP. It is a great way to get more control over which version of PHP you are running, setting up virtual hosts, plus other useful features such as automatically handling dynamic DNS.
  • AMPPS is a software stack from Softaculous enabling Apache, PHP, Perl, Python,.. This includes everything you need (and more) for GRAV development.
  • Brew Apache/PHP is an alternative approach that allows a fully configurable installation with various PHP versions.

Windows

  • Laragon portable, isolated, fast & powerful universal development environment for PHP, Node.js, and more. It is fast, lightweight, easy-to-use and easy-to-extend.
  • XAMPP provides Apache, PHP, and MySQL in one simple package.
  • EasyPHP provides a personal Web hosting package as well as a more powerful developer version.
  • MAMP for Windows is a long-time Mac favorite, but now available for Windows.
  • IIS with PHP is a fast way to run PHP on Windows.
  • AMPPS is a software stack from Softaculous enabling Apache, PHP, Perl, Python,.. This includes everything you need (and more) for GRAV development.
  • Linux Subsystem is a great way to Run a linux-like environment on Windows

Linux

Many distributions of Linux already come with Apache and PHP built-in. If they're not, the distribution usually provides a package manager through which you can install them without much hassle. More advanced configurations should be investigated with the help of a good search engine. Apache Requirements Even though most distributions of Apache come with everything needed, for the sake of completeness, here is a list of required Apache modules:

  • mod_rewrite
  • mod_ssl (if you wish to run Grav under SSL)
  • mod_mpm_itk_module (if you wish to run Grav under its own user account)
  • You should also ensure you have AllowOverride All set in the <Directory> and/or <VirtualHost> blocks so that the .htaccess file processes correctly, and rewrite rules take effect.

IIS Requirements

Although IIS is considered a web server ready to run 'out-of-the-box', some changes need to be made. To get Grav running on an IIS server, you need to install URL Rewrite. This can be accomplished using Microsoft Web Platform Installer from within IIS. You can also install URL Rewrite by going to iis.net.

PHP Requirements

Most hosting providers and even local LAMP setups have PHP pre-configured with everything you need for Grav to run 'out-of-the-box'. However, some Windows setups, and even Linux distributions local or on VPS (I'm looking at you Debian!) - ship with a very minimal PHP compile. Therefore, you may need to install or enable these PHP modules:

  • curl (client for URL handling used by GPM)
  • ctype (used by symfony/yaml/Inline)
  • dom (used by grav/admin newsfeed)
  • gd (a graphics library used to manipulate images)
  • json (used by Symfony/Composer/GPM)
  • mbstring (multibyte string support)
  • openssl (secure sockets library used by GPM)
  • session (used by toolbox)
  • simplexml (used by grav/admin newsfeed)
  • xml (XML support)
  • zip extension support (used by GPM)
  • For enabling openssl and (un)zip support you will need to find in the php.ini file of your Linux distribution for lines like:
  • ;extension=openssl.so
  • ;extension=zip.so
  • and remove the leading semicolon.
  • Optional Modules
  • apcu for increased cache performance
  • opcache for increased PHP performance
  • yaml PECL Yaml provides native yaml processing and can dramatically increase performance
  • xdebug useful for debugging in a development environment

You can learn more from the Grav CMS official documentation.

This article is a mashup of a couple of pages taken from the Grav CMS official documentation.

What is Grav?

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. Although Grav follows principles similar to other flat-file CMS platforms, it has a different design philosophy than most.

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

  • Twig Templating
  • Markdown
  • YAML
  • Doctrine Cache
  • Symfony Event Dispatcher
  • Symfony Console

Grav's Place in the Universe

There are many powerful open source CMS solutions for building complex websites. Some of the more commonly used ones are Joomla, WordPress, and Drupal. The downside of these platforms is that they have a steep learning curve associated with them. This requires a significant amount of your time - and this may be the time that you do not have.

These platforms provide a wealth of features and functionality that you can extend with a wide variety of open source and proprietary plug-ins and themes. These extensions and themes are themselves often feature-packed, requiring more knowledge and time on the part of the developer yet.

In the end, you often find yourself creating a website that requires many plugins and extensions from many different vendors. This can make your design overly complicated and difficult to maintain over the long term.

Grav tackles the problem differently. It focuses primarily on your content and turns your content structure into a navigable site. The underpinnings of Grav are simple, yet via extensive events, you have complete control over every step in the Grav workflow.

This solution allows simple plugins to quickly and easily add powerful functionality. Using Grav also leads to a rapid development environment with an installation process that takes seconds, including a straightforward content creation method with a minimal learning curve. All of this contributes to making Grav friendly to the designer, the developer, and the end user.

To get a basic site up-and-running requires minimal Web development experience. If you dig a little deeper, you will discover that there is very little Grav cannot accomplish.

Requirements

Grav is intentionally designed with few requirements. You can easily run Grav on your local computer, as well as 99% of all Web hosting providers. If you have a pen handy, jot down the following Grav system requirements:

  • Web Server (Apache, Nginx, LiteSpeed, Lightly, IIS, etc.)
  • PHP 7.3.6 or higher
  • hmm... that's it really, (but please look at PHP requirements for a smooth experience)!

Grav is built with plain text files for your content. There is no database needed. A PHP user cache such as APCu, Memcached, or Redis is highly recommended for optimal performance. Not to worry though, these are usually already part of your hosting package! Web Servers

Grav is so simple and versatile that you don't even need a web server to run it. You can run it directly off the built-in PHP webserver, as long as you're running PHP 7.3.6 or later. Testing with the built-in webservers is a useful way to check a Grav install and perform some brief development, but it is not recommended for a live site or even for advanced development tasks. We've outlined how in our Installation guide. Even though technically you do not need a standalone web server, it is better to run one, even for local development. There are many great options available:

Mac

  • MacOS 10.14 Mojave already ships with the Apache Web server and PHP 7.1, so job done!
  • MAMP/MAMP Pro comes with Apache, MySQL and of course PHP. It is a great way to get more control over which version of PHP you are running, setting up virtual hosts, plus other useful features such as automatically handling dynamic DNS.
  • AMPPS is a software stack from Softaculous enabling Apache, PHP, Perl, Python,.. This includes everything you need (and more) for GRAV development.
  • Brew Apache/PHP is an alternative approach that allows a fully configurable installation with various PHP versions.

Windows

  • Laragon portable, isolated, fast & powerful universal development environment for PHP, Node.js, and more. It is fast, lightweight, easy-to-use and easy-to-extend.
  • XAMPP provides Apache, PHP, and MySQL in one simple package.
  • EasyPHP provides a personal Web hosting package as well as a more powerful developer version.
  • MAMP for Windows is a long-time Mac favorite, but now available for Windows.
  • IIS with PHP is a fast way to run PHP on Windows.
  • AMPPS is a software stack from Softaculous enabling Apache, PHP, Perl, Python,.. This includes everything you need (and more) for GRAV development.
  • Linux Subsystem is a great way to Run a linux-like environment on Windows

Linux

Many distributions of Linux already come with Apache and PHP built-in. If they're not, the distribution usually provides a package manager through which you can install them without much hassle. More advanced configurations should be investigated with the help of a good search engine. Apache Requirements Even though most distributions of Apache come with everything needed, for the sake of completeness, here is a list of required Apache modules:

  • mod_rewrite
  • mod_ssl (if you wish to run Grav under SSL)
  • mod_mpm_itk_module (if you wish to run Grav under its own user account)
  • You should also ensure you have AllowOverride All set in the <Directory> and/or <VirtualHost> blocks so that the .htaccess file processes correctly, and rewrite rules take effect.

IIS Requirements

Although IIS is considered a web server ready to run 'out-of-the-box', some changes need to be made. To get Grav running on an IIS server, you need to install URL Rewrite. This can be accomplished using Microsoft Web Platform Installer from within IIS. You can also install URL Rewrite by going to iis.net.

PHP Requirements

Most hosting providers and even local LAMP setups have PHP pre-configured with everything you need for Grav to run 'out-of-the-box'. However, some Windows setups, and even Linux distributions local or on VPS (I'm looking at you Debian!) - ship with a very minimal PHP compile. Therefore, you may need to install or enable these PHP modules:

  • curl (client for URL handling used by GPM)
  • ctype (used by symfony/yaml/Inline)
  • dom (used by grav/admin newsfeed)
  • gd (a graphics library used to manipulate images)
  • json (used by Symfony/Composer/GPM)
  • mbstring (multibyte string support)
  • openssl (secure sockets library used by GPM)
  • session (used by toolbox)
  • simplexml (used by grav/admin newsfeed)
  • xml (XML support)
  • zip extension support (used by GPM)
  • For enabling openssl and (un)zip support you will need to find in the php.ini file of your Linux distribution for lines like:
  • ;extension=openssl.so
  • ;extension=zip.so
  • and remove the leading semicolon.
  • Optional Modules
  • apcu for increased cache performance
  • opcache for increased PHP performance
  • yaml PECL Yaml provides native yaml processing and can dramatically increase performance
  • xdebug useful for debugging in a development environment

You can learn more from the Grav CMS official documentation.

🥰
Welcome back!

👋
You've been logged out.