<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jaroslav Svetlik</title>
    <description>The latest articles on DEV Community by Jaroslav Svetlik (@jaroslav_svetlik_037b0c11).</description>
    <link>https://dev.to/jaroslav_svetlik_037b0c11</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1753197%2Fc40005c8-da43-413e-9b55-d37756bf41ad.jpg</url>
      <title>DEV Community: Jaroslav Svetlik</title>
      <link>https://dev.to/jaroslav_svetlik_037b0c11</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jaroslav_svetlik_037b0c11"/>
    <language>en</language>
    <item>
      <title>How We Built StackBriefly as a Headless WordPress and Next.js Publication</title>
      <dc:creator>Jaroslav Svetlik</dc:creator>
      <pubDate>Fri, 07 Aug 2026 09:28:07 +0000</pubDate>
      <link>https://dev.to/jaroslav_svetlik_037b0c11/how-we-built-stackbriefly-as-a-headless-wordpress-and-nextjs-publication-4he1</link>
      <guid>https://dev.to/jaroslav_svetlik_037b0c11/how-we-built-stackbriefly-as-a-headless-wordpress-and-nextjs-publication-4he1</guid>
      <description>&lt;p&gt;When we started StackBriefly, the goal was simple: build a practical software&lt;br&gt;
publication where the editorial workflow stayed easy, but the public site still&lt;br&gt;
felt fast, structured, and maintainable.&lt;/p&gt;

&lt;p&gt;The setup we chose is a common pattern, but the details matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WordPress runs as the editorial backend.&lt;/li&gt;
&lt;li&gt;Next.js renders the public site.&lt;/li&gt;
&lt;li&gt;The public domain is separate from the CMS subdomain.&lt;/li&gt;
&lt;li&gt;Deploys use timestamped release folders with an atomic &lt;code&gt;current&lt;/code&gt; symlink.&lt;/li&gt;
&lt;li&gt;Old release folders are pruned so server backups do not grow forever.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;StackBriefly is live at &lt;a href="https://stackbriefly.com/" rel="noopener noreferrer"&gt;stackbriefly.com&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why not just use WordPress on the public domain?
&lt;/h2&gt;

&lt;p&gt;WordPress is still a very good writing and editorial tool. The admin experience&lt;br&gt;
is familiar, media uploads are straightforward, and publishing content does not&lt;br&gt;
require a developer every time.&lt;/p&gt;

&lt;p&gt;But for the public frontend, we wanted more control over:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML structure&lt;/li&gt;
&lt;li&gt;metadata&lt;/li&gt;
&lt;li&gt;structured data&lt;/li&gt;
&lt;li&gt;sitemap generation&lt;/li&gt;
&lt;li&gt;article templates&lt;/li&gt;
&lt;li&gt;category archives&lt;/li&gt;
&lt;li&gt;pagination&lt;/li&gt;
&lt;li&gt;performance&lt;/li&gt;
&lt;li&gt;deployment rollback&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That made a headless setup a better fit.&lt;/p&gt;

&lt;p&gt;The CMS lives on a subdomain and the public site is rendered by Next.js. That&lt;br&gt;
keeps editorial work inside WordPress while giving the frontend a predictable&lt;br&gt;
application structure.&lt;/p&gt;
&lt;h2&gt;
  
  
  What the public site handles
&lt;/h2&gt;

&lt;p&gt;The Next.js app handles the public reading experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;homepage&lt;/li&gt;
&lt;li&gt;blog archive&lt;/li&gt;
&lt;li&gt;paginated archive pages&lt;/li&gt;
&lt;li&gt;article pages&lt;/li&gt;
&lt;li&gt;category pages&lt;/li&gt;
&lt;li&gt;topics page&lt;/li&gt;
&lt;li&gt;sitemap&lt;/li&gt;
&lt;li&gt;RSS feed&lt;/li&gt;
&lt;li&gt;canonical URLs&lt;/li&gt;
&lt;li&gt;Open Graph metadata&lt;/li&gt;
&lt;li&gt;breadcrumb structured data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The public site is intentionally not a marketing landing page. It is a software&lt;br&gt;
publication, so the layout is built around scannable topics, latest articles,&lt;br&gt;
and practical comparison guides.&lt;/p&gt;

&lt;p&gt;One of the most useful pages for us is the SEO category:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackbriefly.com/category/seo" rel="noopener noreferrer"&gt;StackBriefly Next.js and SEO guides&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  WordPress stays focused on publishing
&lt;/h2&gt;

&lt;p&gt;WordPress is used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;post editing&lt;/li&gt;
&lt;li&gt;categories&lt;/li&gt;
&lt;li&gt;featured images&lt;/li&gt;
&lt;li&gt;excerpts&lt;/li&gt;
&lt;li&gt;authorship&lt;/li&gt;
&lt;li&gt;media library&lt;/li&gt;
&lt;li&gt;publishing status&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The frontend reads from the WordPress REST API and normalizes the data into a&lt;br&gt;
smaller shape for the Next.js app.&lt;/p&gt;

&lt;p&gt;For a small editorial project, this is enough. GraphQL can be useful later, but&lt;br&gt;
the REST API keeps the first version simple and reduces moving parts.&lt;/p&gt;
&lt;h2&gt;
  
  
  The deployment detail that mattered more than expected
&lt;/h2&gt;

&lt;p&gt;One issue we hit was not a framework issue. It was a server operations issue.&lt;/p&gt;

&lt;p&gt;The first release layout kept every full Next.js release under the aaPanel site&lt;br&gt;
root. Each release included &lt;code&gt;node_modules&lt;/code&gt; and build artifacts, so backups grew&lt;br&gt;
quickly. The fix was to move complete releases outside the web root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/www/app-releases/stackbriefly.com/releases/&amp;lt;timestamp&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The public root keeps only lightweight files and a symlink:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/www/wwwroot/stackbriefly.com/current
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deploys now follow this pattern:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new timestamped release folder.&lt;/li&gt;
&lt;li&gt;Upload source without &lt;code&gt;.git&lt;/code&gt;, &lt;code&gt;.next&lt;/code&gt;, or &lt;code&gt;node_modules&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;npm ci&lt;/code&gt; and &lt;code&gt;npm run build&lt;/code&gt; on the server.&lt;/li&gt;
&lt;li&gt;Switch the &lt;code&gt;current&lt;/code&gt; symlink atomically.&lt;/li&gt;
&lt;li&gt;Restart the Next.js service.&lt;/li&gt;
&lt;li&gt;Prune old releases and remove &lt;code&gt;.next/cache&lt;/code&gt; from kept releases.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This gave us rollbacks without letting backup size grow without control.&lt;/p&gt;

&lt;p&gt;I wrote more about that VPS deployment pattern here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackbriefly.com/blog/deploy-nextjs-blog-vps-nginx-systemd-rollbacks" rel="noopener noreferrer"&gt;Deploying a Next.js blog on a VPS with Nginx, systemd, and rollbacks&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What we learned from Search Console
&lt;/h2&gt;

&lt;p&gt;The technical setup was not the whole SEO story.&lt;/p&gt;

&lt;p&gt;Search Console started showing impressions before meaningful clicks. That told&lt;br&gt;
us the site was discoverable, but not trusted or ranked strongly enough yet.&lt;/p&gt;

&lt;p&gt;The main lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Publishing more pages is not automatically better.&lt;/li&gt;
&lt;li&gt;Internal links matter when a site has many new category pages.&lt;/li&gt;
&lt;li&gt;Old 404s should be redirected when Search Console keeps reporting them.&lt;/li&gt;
&lt;li&gt;A sitemap can be valid while Google still delays crawling many URLs.&lt;/li&gt;
&lt;li&gt;A new site with no external references usually needs patience and legitimate
mentions before rankings move.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So instead of blindly publishing more articles, we started focusing on the&lt;br&gt;
clusters that already had impressions. For StackBriefly, that meant topics like&lt;br&gt;
localization management, privacy compliance, sales tax automation, accessibility&lt;br&gt;
compliance, social listening, data integration, and mobile device management.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this setup still feels worth it
&lt;/h2&gt;

&lt;p&gt;The biggest advantage is separation of concerns.&lt;/p&gt;

&lt;p&gt;Editors can write in WordPress. The frontend can stay focused on rendering,&lt;br&gt;
metadata, structured data, and performance. Deployments can be handled like an&lt;br&gt;
application instead of a shared mutable folder.&lt;/p&gt;

&lt;p&gt;The tradeoff is operational responsibility. You need to own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;revalidation&lt;/li&gt;
&lt;li&gt;deployment&lt;/li&gt;
&lt;li&gt;redirects&lt;/li&gt;
&lt;li&gt;sitemap quality&lt;/li&gt;
&lt;li&gt;CMS availability&lt;/li&gt;
&lt;li&gt;media URLs&lt;/li&gt;
&lt;li&gt;backup size&lt;/li&gt;
&lt;li&gt;monitoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a serious content project, that tradeoff is acceptable. For a quick blog&lt;br&gt;
with no technical owner, normal WordPress hosting would be simpler.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;A headless WordPress and Next.js setup is not automatically better than&lt;br&gt;
WordPress alone. It becomes useful when the project needs editorial convenience&lt;br&gt;
and application-level control at the same time.&lt;/p&gt;

&lt;p&gt;For StackBriefly, that balance made sense. The next challenge is not just&lt;br&gt;
shipping more content. It is improving the pages that already show search&lt;br&gt;
signals, cleaning up indexing issues, and earning a few legitimate references&lt;br&gt;
from relevant places.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>wordpress</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
