Wordpress to Grav

Hi, Im not a developer but still would appreciate your answer.

I have a wordpress site which I want to convert to flat CMS in order to speed it up. the website main functionality is a search box that talk to an external API in order to give results. it also has a contact form and text pages.
A developer I talked to says that I cant include PHP based pages in flat CMS.
also ‘flat’ websites can not handle contact forms. Contact forms require some level of server processing to either database the message or pass it on via email.
He mus use Netlify has a built in system to handle forms for flat websites to get around this isssue. Otherwise I have to use another third party service such as formcarry, formspree etc.

is this correct?

@steev It seems that two concepts are being mixed: ‘static sites’ and ‘flatfile CMS’.

Static sites:
The developer you talked to is right with respect to ‘static sites’. These sites are plain HTML (which is static) with or without some Javascript (which brings some dynamics in the browser) and have no server to process any logic. Hosters like Netlify and 3rd-parties like Formspree partly fill in the gap of a missing server.

These extra ‘services’ mostly come with a generous free starter license, but do have a licensing model when outgrowing the starter-level.

Flatfile CMS:
Grav on the other hand is a ‘flatfile CMS’. It uses a PHP server (like Wordpress does) to process logic, eg. processing a contactform. Unlike Wordpress, Grav does not use a database for storing pages/posts, users, configuration and data, but uses flat text files. Hence the name ‘flatfile CMS’.

Which means that…

Unlike Wordpess:

  • All configuration is in flat files which can easily be read and written with any editor.
  • All pages/posts are in flat files which can easily be read and written with any editor.
  • The entire site can be versioned using git and GitHub. ‘Mistakes’ can therefor easily be rolled back.
  • Backup is easy since everything is a simple flat file.
  • There is no performance overhead of a heavy database.
  • Installation is as easy as unzipping a zipfile.

And like Wordpress:

  • There is an Admin panel to edit configurations, users and pages/posts.
  • There is a PHP server to process logic for handling requests and responses.
  • Contact forms can be handled like with Wordpress.
  • External API’s can easily be called and results be processed.

Other advantages of Grav over Wordpress:

  • It is (relatively) young and fresh which means:
    • It is build on the latest frameworks and technologies. This makes Grav small and flexible.
    • It does not carry the overhead of 10 years backwards compatibility like Wordpress does. This makes innovation a lot easier.
  • Results of page processing are cached and reused, which increases performance.

Considering the limited requirements you have mentioned:

  • I see no red flags for a conversion to Grav.
  • I see the following bumps for running your site as a static site at Netlify:
    • The contact-form needs extra attention and a 3rd party for emails.
    • Calling the external search api requires custom Javascript to send the query and parse the results.

Hope this helps…

1 Like

thank you for replying
If I understand correctly, this is good news. grav can support my site.
:slight_smile:

BTW, can you recommend a developer that can do this in a reasonable price?

@steev You might try and ask TrilbyMedia for an indication/quote. They are the people that build Grav.

Or you could ask around here on the forum. Many of the visitors are developers.

Hi, have a look at my experience with WordPress-2-Grav under https://blog.dmr-solutions.com/blog/wordpress-grav-umsteigen (sorry, only in german).

I wish you success,
Ralf