3 questions from a newbie


Please let me ask 3 questions. And sorry for stupid questions and bad English.

  1. Does Frontity use Wordpress as a Headless CMS?

  2. If frontend to be displayed through Frontity, do I have to host the site on Wordpress separately? That is, there will be 2 sites - 1 through Frontity and another on Wordpress (backend).

  3. Is Frontity a static site generator? If every time I publish new articles on Wordpress. Do I have to generate a website every time? I had a similar experience with Jekyll.

And can I host Frontity on a shared hosting / VPS? Or do I need to use paid SAAS services?

1 Like

Welcome to the community @zhandosweb! :slight_smile:

To answer your questions quickly:

  1. Yes
  2. Yes
  3. No

Now I will try and explain as I understand it. You can find better information in the docs though at: https://docs.frontity.org/#how-does-frontity-work

Frontity is headless and uses Wordpress as the CMS. Ordinarily, Wordpress operates through PHP where when someone requests the website, the PHP processes the request on the server and sends the requested site back to the user in HTML.

Frontity on the other hand, is built using React, but not on the PHP server side. It runs headless on its own Node server where it packages the web app that you build and prepares it to be sent to the requested user in HTML in the smallest form factor possible. There are quite a few benefits to this, such as increased load times, etc. Now the content of the website such as pages, blog posts, etc. are loaded using Wordpress’s REST API to take the data from Wordpress and to show it on the Front-End. No need to generate a new website as the content is always available on the REST API.

In short, you are free to scale as you need your front-end while keeping it completely free from your Wordpress (back-end).

Again, someone from the team may be able to explain better than I can. Another good resource is: https://blog.frontity.org/seo-for-headless-wordpress-themes/


Thank you very much for the answers! Short answers are what I need :slight_smile:

  1. The following is written in the documentation: * It’s rendered dynamically . This means people don’t have to rebuild the HTML each time they modify or publish something.

How it works? If I write an article on Wordpress, will it automatically appear on the Fontity website? I don’t need to regenerate the entire site, or push separate pages like on Jekyll? How long does a new page appear on the Frontity site? Is it configured through CRON?

  1. As for SEO. I read the articles: https://blog.frontity.org/seo-for-headless-wordpress-themes/. Also on the forum, I saw a topic: Avoid SEO problems with multiple domains (like in Now)

SEO support is very important for me, I’m working with my SEO sites. And we will get 2 sites with the same content. And both of them will be indexed in Google.

How will this affect SEO? Can a Wordpress (backend) site be closed on the server-side? And somehow organize HTTP authorization? Or something similar. The main thing is that no one except the parser can get to the test site.

You suggest pointing Canonical to the current site? I mean link to site on Frontity (from the Wordpress site). But it’s not effective solution.

For example, Yoast SEO always points Canonical to its own site. And I need to change all the links to the new domain (Frontity) through the database.

And the fact that 2 identical sites are available for Google index is unpleasant.

No problem!

For the first question, as soon as the page/post/etc is posted, it gets added to the REST API, at that point, Frontity’s request should get it within the next few seconds. I have noticed that it can take as much as 5 seconds to load the new content, but it would depend on the internet speed and size of the content I would presume. Either way, a push like Jekyll is not required and it is not configured through a CRON, but through JS.

As for the second question about SEO. You could potentially password protect the WordPress hosted site, as long as the JSON file for the REST API is still available for Frontity to pull content from.

edited after the fact - I found an plugin for wordpress named Password Protected which allows access to the REST API. This may be the solution you are looking for.

Otherwise, you can add canonical links through Yoast manually if you want to on the WordPress hosted site, and if I am not mistaken, there is talk of adding Yoast Support to Frontity which may address this issue?

Good one @ShaGui, that can work.

I was about to recommend this theme: https://wordpress.org/themes/nude/ but for some reason it includes the <?php wp_head(); ?> code, so it gets the canonicals from Yoast.

No good.

Another viable option is to add 301 redirections with the Redirection plugin.

You have to

  1. Add new redirection.
  2. Choose the REGEX option.

  1. Use this source URL that matches any url that is not wp-admin, wp-json, wp-login
  1. Use your Frontity domain as Target URL, followed by $1, which is the pathname and query:

I’ve just tested it in https://test.frontity.io and works great (it is disabled now).

Looking into the future:

We are already thinking how to solve this, among other things, with our PHP theme.

It’ll have some modes:

  • Display a warning with a link to the Frontity site.
    Like Nude, but without any head tag.
  • 301 redirects to the Frontity site.
    Like the solution I posted using Redirection.
  • PHP Theme Bridge.
    Instead of being a PHP theme per se, it simply does a HTTP request to the Frontity server to get the final HTML, then it echos that HTML as if it were generated by PHP.

So there will be an official solution for this problem :+1:

1 Like