Hello,
I have an existing WordPress website with over 5000 Articles and we are planning to use frontity. so what you guys recommend for this type of heavy traffic blog? Any thoughts?
we already build a react component for this.
Thanks
Hello,
I have an existing WordPress website with over 5000 Articles and we are planning to use frontity. so what you guys recommend for this type of heavy traffic blog? Any thoughts?
we already build a react component for this.
Thanks
AFAIK, frontity is just like an UI client which grab data from WP endpoint and display it using react. Itâs like a theme for your site. So whether there are 5000 or just 5 posts itâs job is to fetch and display it. Itâs not like Gatsby a SSG which get date and transfer into HTML pages.
Thanks.! But I am more concerned about challenges like pre render, wordpress native comments, previewing draft articles.
What do you mean by pre-render here?
Native comments arenât supported yet but they are working.
You can preview draft posts
@inamkbmail is absolutely right, in Frontity it doesnât matter how big is the site, it just works. If you use a serverless instead of a Node server, you donât need to worry about scaling Node because serverless services autoscale automatically.
If Iâm not mistaken, an official package to support native comments will be included in our next sprint. You can follow the progress on this Feature Discussion topic: Native WordPress comments
The preview will take a bit longer, but we are already working on the design. I have to open an official Feature Discussion topic for that, but you can read about our ideas in Does Frontity support Wordpress post preview? until then. Itâs definitely one of our top priorities for this Q2. Of course, your editors can use the preview of your PHP theme until then. It wonât be the same, but at least they will see something
Thanks for your reply. do we use any library for state management like redux?
Yes, Frontity has its own state manager, called internally Frontity Connect.
Thanks for quick reply!
In current frontity scenario we need to change our current wordpress url to different one for rest api right? So what exactly happens to wordpress site after the deployment?
Can we use this Library for react component (obviously we can use it ) it supports emotion.sh https://github.com/rebassjs/rebass. Any Recommendations?
Thanks
Nothing will happen to the WP site itâll be just available on a different URL.
Check docs here https://docs.frontity.org/learning-frontity/styles. I found no specific criteria of using âemotionâ instead of youâll import itâs package from frontity package as theyâve got merged into frontity.
Hi @mosamlife
You need to keep the WordPress site even after youâve deployed your Frontity site as Frontity will fetch all its content from the WordPress site. The authors, editors, and maintainers of your content will continue to use the WordPress admin pages for managing the content that appears in your Frontity site.
If you donât want the WordPress site to be visible to visitors you could activate a very minimal theme that just has a styles.css file with the requisite header info, and an index.php that outputs either blank page or a âNothing to see hearâ type of message, just in case anyone inadvertently
finds their way to the WordPress site.
That I already know. for that I am thinking to use underscore theme for this
@luisherranz @mburridge Thanks for the quick reply! one question though Should I wait for theme bridge or just continue with current frontity version?
Hi @mosamlife
If youâre happy to have your WordPress install on a separate domain/sub-domain, with your Frontity site on your primary domain, then you donât need to wait for the theme bridge.
At present this is the configuration that we recommend anyway.
Rather than using Underscores, which provides much more than you need, you could try Nude with is a minimal theme specifically designed for âheadlessâ sites:
Yea I just read that Thanks for the reply @mburridge. can you please tell me what is benefits to use theme bridge over the current one?
Hi @mosamlife
Please take a look at this discussion: Theme Bridge.
In brief, some of the advantages are:
However, there are disadvantages too:
So If performance is more concerned than we can use current stack. correct?
Hi @mosamlife
Our current recommendation is the âDirect to Frontityâ installation.
https://docs.frontity.org/installation-and-deploy/possible-architectures#direct-to-frontity
Great conversation here guys
Yes, the Theme Bridge is not available yet, only a proof of concept.
Iâd like to take this opportunity to outline some facts about the performance of WordPress, Frontity and other similar JS frameworks.
I have noticed that a lot of times the term performance is used to refer to server response time (SRT) and that is not correct, so I think itâs necessary to understand the difference.
The SRT is the amount of time it takes for the browser to receive a response, usually the HTML.
If you generate a LightHouse report, you will get a performance score, measuring this (as of v6 of LH):
You can read more about all these metrics here: https://web.dev/performance-scoring/ (the docs of LH are actually pretty good).
First Contentful Paint is the only metric affected by SRT and it works more or less like this:
As you can see, having a good SRT is important, but itâs not the only factor.
Frontity bundles everything together in the initial HTML to avoid the additional requests. It works more like this:
Frontity also applies other optimizations apart from that, but I guess that is the most important for this metric.
That doesnât mean you need a good SRT, you do.
So now, what is a good SRT?
LightHouse docs say it will fail if it is higher than 600ms:
This audit fails when the browser waits more than 600 ms for the server to respond to the main document request.
In CMSâs like WordPress we are dealing with static content (the content is the same for all the visitors), so the best to improve the SRT is by using a cache.
There are three types of cache from slower to faster (bear with me):
A non-cached WordPress request works like this:
But when you introduce a cache, the subsequent requests are much faster:
So if you use a cache, then the SRT of WordPress is not relevant anymore. And that is the reason that WordPress is rather slow, but still so popular among big publishers.
Letâs talk a little bit about Frontity now.
Frontity access the data using the REST API, like this:
As you can see, it is also important to cache the REST API properly. We usually recommend this plugin: https://wordpress.org/plugins/wp-rest-cache/
Once youâve added cache to the picture, Frontity looks like this:
Problem solved.
By the way, modern servers like Now or Netlify include a CDN by default, which is the best type of cache for this.
Remember:
Finally, letâs see the Theme Bridge architecture without cache:
And the Theme bridge with cache.
So yeah, itâs as fast as your cache, like any other solution.
The thing with the Theme Bridge is that it has many benefits. You donât need two separate domains, things like previewing draft posts become much simpler and others like sitemaps, external files (ads.txt, robotsâŚ) or instant cache invalidation just work out of the box.
I think the main points I am trying to make are:
@luisherranz Thanks for your detailed reply.! Appreciate it. So I finally decided to go with the current frontity version. can you please tell me Is it to migrate to the theme bridge version when itâs released? other than changing WordPress URLs and all?