Grav has intentionally been 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:
Grav is built with plain text files for your content. There is no database needed.
A PHP user cache such as APC, APCU, XCache, Memcache, Redis is highly recommended for optimal performance. Not to worry though, these are usually already part of your hosting package!
Even though technically you do not need a standalone Web server, it is better to run one, even for local development. Luckily there are many options depending on your platform:
Even though most distributions of Apache come with everything needed, for the sake of completeness, here is a list required Apache modules:
mod_rewritemod_ssl (if you wish to run Grav under SSL)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.
Although IIS is considered a webserver ready to 'run-out-of-box' there are some changes that need to be made. To get Grav to run 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.
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:
gd (a graphics library used to manipulate images)curl (client for URL handling used by GPM)openssl (secure sockets library used by GPM)zip extension support (used by GPM)mbstring (multibyte string support)xml (XML support)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.
apcu for increased cache performanceopcache for increased PHP performancexcache alternative to apcu, not as fast, but still pretty goodyaml PECL Yaml provides native yaml processing and can dramatically increase performancexdebug useful for debugging in development environmentFor Grav to function properly your webserver needs to have the appropriate file permissions in order to write logs, caches, etc. When using either the CLI or GPM, the user running PHP from the command line, also needs to have the appropriate permissions to modify files.
By default, Grav will install with 644 and 755 permissions for files and folders respectively. Most hosting providers have configurations that ensure the webserver running PHP will allow you to create and modify files within your user account. This means that Grav runs out-of-the-box on the vast majority of hosting providers.
However, if you are running on a dedicated server, or even your local environment, you may need to adjust permissions to ensure your user and your webserver can modify files as needed. There are a couple of approaches you can take.
In a local development environment, you can usually configure your webserver to run under your user profile. This way the web server will always allow you to create and modify files.
Change the group permissions on all files and folders so that the webserver's group has write access to files and folders while keeping the standard permissions. This requires a few commands to make this work (note: adjust www-data to be the group your apache runs under [www-data, apache, nobody, etc.]):
chgrp -R www-data .
find . -type f | xargs chmod 664
find . -type d | xargs chmod 775
find . -type d | xargs chmod +s
umask 0002
Although you can get away with Notepad, Textedit, Vi, or whatever default text editor comes with your platform, we recommend using a good text editor with syntax highlighting to make things easier. Here are some recommended options:
Another option if you primarily work with just creating content, is to use a Markdown Editor. These often are very content-centric and usually provide a live-preview of your content rendered as HTML. There are literally hundreds of these, but some good options include:
Although there are many ways to deploy Grav, the simplest is to simply copy your local site to your hosting provider. The easiest way to accomplish this is with an FTP Client. There are many available, but some recommended ones include:
Found errors? Think you can improve this documentation? Simply click the Edit link at the top of the page, and then the icon on Github to make your changes.
Powered by Grav + with by Trilby Media.