This guide installs Grav on a self-hosted Linux server.
curl - URL handling (used by GPM)ctype - Used by symfony/yamldom - Used by newsfeedgd - Graphics library for image manipulationjson - Used by Symfony/Composer/GPMmbstring - Multibyte string supportopenssl - Secure sockets (used by GPM)session - Used by toolboxsimplexml - Used by newsfeedxml - XML supportzip - Used by GPMInstall a LAMP (Linux, Apache, MySQL, PHP) or LEMP (Linux, Nginx, MySQL, PHP) stack:
Ubuntu/Debian (LAMP):
sudo apt update
sudo apt install apache2 php php-xml php-mbstring php-curl php-gd php-zip php-intl php-ctype php-dom php-simplexml php-openssl php-session unzip
RHEL/CentOS:
sudo dnf install httpd php php-xml php-mbstring php-curl php-gd php-zip php-intl unzip
Download Grav from the official GitHub releases:
cd /tmp
wget https://github.com/getgrav/grav/releases/download/1.7.49/grav-admin-v1.7.49.zip
Extract Grav to your web root:
sudo mkdir -p /var/www/grav
sudo unzip grav-admin-v1.7.49.zip -d /var/www/grav
Ensure the content and cache directories are writable by the web server:
# Set ownership (adjust for your web server user)
sudo chown -R www-data:www-data /var/www/grav
# Set directory permissions to 755
find /var/www/grav -type d -exec chmod 755 {} \;
# Set file permissions to 644
find /var/www/grav -type f -exec chmod 644 {} \;
Apache: Create a virtual host pointing to /var/www/grav. Ensure mod_rewrite is enabled.
Nginx: Configure server block with PHP-FPM, root pointing to /var/www/grav.
Open http://YOUR-SERVER/grav in your browser.
If you downloaded the Grav + Admin package, access the admin panel at http://YOUR-SERVER/grav/admin and create your admin user.
See Grav Configuration for configuration guidance.
See Grav Security for hardening guidance.
Prefer automation? See these Ansible setup options:
Prefer containers? See Grav Docker Setup.
Stuck on a step or need custom configuration? We provide paid consulting for Grav deployments, from basic setups to enterprise configurations.