Hugo + Flarum forum platform

Hi All,

I have a Hugo static website and I would like to host it on netlify or Forestry due to performance. However, I want to integrate a PHP based forum engine (Flarum) within the site like, The mentioned two is for only static site, not php.

How can I solve this? The easiest would be a VPS, I know, but I have no experience in it.

Many Thanks!

Hi. It may not be possible on those services.

I use PHP for the following script on my website:

This script goes in /static/ directory in my Hugo project, and I just make an AJAX call to this script.

Then on server, of course you’d have to configure PHP env.

You could put the PHP software in /static and host it there, if you are hosting yourself on a VPS or something.

Since you want to host on Netlify or Forestry, they are I think static site hosts only, and probably do not allow php or python or a back-end.

This maybe of more help:

You can host the forum elsewhere, and link to it. You can put it on a VPS on etc. or forward to that forum host.

1 Like

This isn’t really a hugo thing.

As you’ve already mentioned, Netlify is for static sites only, so it doesn’t have a PHP interpreter connected to its web server. doesn’t host anything, it’s a frontend for SSGs.

What I’d do is run your PHP software on a different system (a VPS or web host which provides dynamic tools like a database, PHP, CGI etc.). And make redirect to your forum, by creating a file - static/forum.html - and use html redirection to send visitors to your forum.

1 Like

Hash, funkydan, thank you very much for your reply!

Thanks for the idea, I would go for the idea that host the forum elsewhere and forward the visitors over there.

Btw. What’s your opinion about netlify, forestry? Which one do you guys prefer? What the benefit comparing to a digitalOcean VPS for instance?


Netlify and Forestry are two different tools.

Netlify is a hosting platform. (They also have an open sourced Content Management System.) The benefit over a VPS would be price and ease of use - they’ve got all the things you need for running a Jamstack site baked in.

Forestry is a content management system.

I use Netlify to host a few sites. And I’ve gone with forestry as my CMS of choice…though in my current workflow I generally use command line tools on my local machine.

1 Like

Put the forum on a sub domain like and host it somewhere else instead. Then simple add links between them. This will be far easier and allows each system and host to do what they are best at.

1 Like

Thank you, I will do it! However, the sub domain is better from SEO perspective than As far as I know, it’s not better, even worse and need to stick to /forum structure. What do you think?

There’s no clear answer here. Some SEOs will argue that it’s better to do one over the other.

Google’s smart enough to realize they’re both part of the same entity, with some caveats. See this YouTube video from Google.

Hugo’s forum isn’t the best place to for SEO questions. Feel free to DM me if you have more questions and I’ll try to help.

Thanks for your feedback guys! Angel, I have a question, if you don’t mind, I’ll ping you. How can I reach you out?

On discourse you can DM someone by clicking their name and message. Just sent you a note. Best of luck