How do I Force HTTPS in Grav CMS?

Grav allows you to force SSL (HTTPS) usage within the configuration file or admin plugin. Note that Grav recommends in a Github thread to use the .htaccess file instead for faster website performance. Below we enable HTTPS using SSH or the admin plugin.


Force SSL in CLI

  1. Log into cPanel File Manager or FTP.
  2. Navigate to the /user/config folder.
  3. Open the system.yaml file.
  4. Change force_ssl: false to true.
  5. Save your changes.

Force SSL with Admin Plugin

  1. Log into Grav.
    Force SSL in Grav
  2. Select Configuration.
  3. At the bottom, select Yes beside Force SSL.
  4. Press Save at the top.

After this, configure scheduled backups. Learn more about Grav in our Support Center. Want another option to improve caching in Grav? Optimize your Grav website performance with our WordPress Hosting (not just for WordPress) and Nginx Cache Manager.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!