Why we moved a 20-year-old to Gatsby

We knew we had a problem.

In 2019, SitePoint achieved Lighthouse Speed scores of less than 10 and between 20 and 30 on a computer.

Our efforts to allow user swelling failed as a result of an ad serving environment that caused further leaks during the time we had finished temporarily connecting the last one. Our reliance on advertising, targeted through third parties, was a major impediment to better site performance. The expansion of our traffic had become declining.

In one that presented others with a position to come and be informed about how to code with the most productive practices, it was not a smart overview. And it wasn’t something we can be proud of either.

To make matters worse, operational bottlenecks have emerged that have made adaptation a delicate logistical task. Our team suffered for making adjustments on the site: after focusing on our Premium experience for several years, we had fallen into the hands of a developer with a WordPress and PHP experience. To verify the code settings, the team would have to wait in a queue to access our check server.

It’s not a challenging task for anyone and, in fact, it’s not effective.

It was time to replace and we were looking for a solution. After much research, we thought Gatsby would be the best to have compatibility for our team. This would use our talent, help us solve all the disorders we had known, and allow us to continue using WordPress for the backend so that the editorial procedure doesn’t want to replace.

At the beginning of the search process, Gatsby began to look like a serious favorite. SitePoint is not a small site, so we knew that the generation we chose had to be able to meet intense demands. Gatsby ticked all our boxes:

Since we were going to rebuild the site from scratch, we planned to make design adjustments at the same time. To assist in this work, we will use stylized components.

Stylish components help keep the taste of the site easily, and we know where to look when we need to replace the taste of something: the flavor is with the component.

We follow the fundamental documents of Gatsthrough and extract our messages with the gatsthrough-source-wordpress plugin.

It was a great initial check for us: we had to see if it was possible to use Gatsby for our site.

After 20 years of blogs, we have published more than 17,000 articles. We knew the versions would take a long time, but we needed to know if Gatsby could handle so much content. As you probably understood, the check brought good news: Gatsby works.

A little tip for the other groups running giant sites: for the progression experience, we use environmental variables to prevent Gatsby from retrieving all posts from the next site. There’s nothing like a 60-minute hot recharge to slow the progression.

From that moment on, we found some limitations with the WordPress source plugin. We couldn’t get all the knowledge we needed, so we switched to the WordPress GraphQL plugin.

We used Yoast to set up our meta-knowledge for search engine optimization and we had to make sure we got the right information. We were able to do this with WordPress GraphQL. By doing this, the content team can still edit the meta-knowledge in the same way, and the knowledge will be dynamic and retrieved with each build.

During construction, we would have 3 or 4 more people on the team who ran in parts of the new blog. In the past, if they were looking to get feedback, they had to press our verification server and make sure no one was already.

We discovered that Gatsby Cloud was a fair solution to this problem. Now, when someone enters a branch office on GitHub, they create a build in Gatsby Cloud with a preview link. Our developers may simply share this link and get quick testing and feedback much better than before.

This faster review cycle facilitated paintings of several other people on the structure team and ended a major bottleneck.

On the big day, we present the new site and perform our first tests. The new blog flies: each and every page loads instantly.

We ran into problems in SitePoint Premium, which started to slow down and even fail. The culprit was a new element on the blog pages that attracted popular books that other people were reading lately. It would do this through a client-side API call, and it was too much for Premium to deal with because of the amount of traffic we get on the blog side.

We temporarily added a page cache to the API to temporarily troubleshoot issues. We learned that we were doing this wrong, we deserved to have sought this knowledge at the time of construction, so that the popular books are already loaded when we delivered the page to the user.

This is the biggest change of mindset you want to make when Gatsby: all the knowledge you can get at the time of the structure must be recovered at the time of the structure. You deserve to use only client-side API calls when you want live knowledge.

Once we rewrote the API call for construction, the first loading of a blog page was even faster and Premium stopped failing.

While it’s hard to overestimate how much greater our delight is on the site today, there are still some disruptions to be resolved.

If a new article is published or if the content is up-to-date, as is the case several times a day, we want to rerun the Gatsby edition before those settings appear.

Our solution for this right now are the undeniable cron paints that run in the pre-planned hours to the day. The long-term solution for this is to upload a webhook to the WordPress publish and update button, so that a new edit is triggered once you have pressed it.

We also have to run incremental versions. At this point, the entire site wants to be rebuilt every time, and given our content files, it would possibly take some time. Gatsby just introduced incremental versions as it launches, and we’re running to put them into effect on our site. Once this is set up, our builds will be much faster if all you’ve replaced is the content.

Our speed score is not yet where we need it. Although subjectively it’s very fast, we still don’t get consistent scores from Lighthouse. We need to take the cell phone and the desktop to the green area (scores above 90) for the user to enjoy and make references optimally.

Such a release would generally be a frightening occasion and would require a lot of paints for the team on launch day.

With Gatsby, our launch was easy. We just had to move WordPress to a new domain and point sitepoint.com to the Gatsby edition of the site.

Then we sat down and looked at the numbers to see what had happened to our traffic. Within a few days, knowledge began to arrive and we were seeing 15% accumulated traffic. User engagement measures were increasing in all areas.

It’s not hard to see why the effects were so immediate. We had more references running on static HTML and CSS pages, and high-speed innovations that were made imaginable when switching to Gatsthrough.

Since we took measurements, we’ve increased our Lighthouse speed scores from 6 to 15 on cell phones to 50 to 60, and from the 1930s on PC through the 1970s. We seek to make sure that speed takes precedence over this change, so we use a suitable tool called Calibre that runs speed tests on several important pages every day and alerts us to scores. We are this tool to improve and improve our score, so I hope to have some other element for you in 3 months when we have each and every element to improve in the range of 90.

The team loves to run in Gatsby. The blog code is based on everything no one sought to paint on. Now everyone should take those cards thanks to the wonderful delight of the developers.

If you’re thinking of moving to Gatsby and wondering if you’re in a prime-time position, follow our recommendation: it’s worth it.

Software engineering has been my career for over twelve years, and that time I learned that a team-based mindset would lead to wonderful results. Over the years, I have had the opportunity to work with corporate groups with other roles, as well as small start-ups looking to grow. In my free time, I like to pass out and go for a walk or a run. I spend the rest of my time juggling 3 kids and all the laughter from family life. I live in Melbourne, Australia.

© 2000-2020 SitePoint Pty.Ltd.

This site is through reCAPTCHA and Google’s privacy policy and terms of use apply.

Leave a Comment

Your email address will not be published. Required fields are marked *