BestTreesToPlant.com | Sacramento Tree Selection Guide
109-article tree selection and care authority site built with Astro 6, featuring build-time Sharp image optimization for 1800+ AVIF images, 122 custom OG images, Pagefind full-text search, and a custom Rehype lazy loading plugin. WordPress migration preserving 46 URL redirects and a decade of SEO equity.
The problem
Generic tree advice is useless in Sacramento. The Central Valley sits in USDA zones 9a/9b with 100+ degree summers, clay-heavy soil, and increasingly strict water restrictions. Most online guides cover the entire continental U.S. and recommend species that will either bake in July or drown in our wet winters. Nursery staff rotate seasonally and give conflicting answers about the same cultivar. Homeowners end up planting the wrong tree, losing 3 to 5 years of growth, and spending $200 to $800 on removal.
I planted the wrong tree twice in my own yard before I started keeping notes. Twenty years of those notes became this site.
What I built
BestTreesToPlant.com is a 109-article authority site covering residential tree selection, planting, care, trimming, and gardening for Northern California homeowners. Every article is grounded in ISA arborist standards, UC Davis cooperative extension data, and USDA zone-specific recommendations. The voice is opinionated homeowner, not encyclopedia. Articles include specific dollar amounts for common services, seasonal timing down to the month, and cultivar names you can hand to a nursery employee.
The site originally ran on WordPress. I rebuilt it in Astro 6 in 2025, migrating all content while building a custom image pipeline that processes 1800+ photographs into optimized responsive AVIF variants at build time.
The migration
The WordPress version had served its purpose, but it carried the usual overhead: a MySQL database for static content, Yoast SEO generating bloated markup, a plugin stack that needed monthly patching, and shared hosting that charged for resources the site barely touched. The content was strong. The platform was holding it back.
The Astro rebuild preserved every URL through 46 .htaccess redirects mapping old WordPress slugs to clean Astro routes. All 109 articles migrated to Markdown with Zod-validated frontmatter. Category taxonomies, author attribution, related article links, and table of contents generation all moved from PHP plugins to build-time Astro components. The SEO equity built over years of organic rankings carried forward intact.
The result: a static site that loads in under a second, costs nothing to host on cPanel, and requires zero server-side maintenance.
Architecture
Image pipeline: The most complex piece of the build. Sharp processes 1800+ source photographs into multiple responsive AVIF variants at build time. A separate pipeline generates 122 unique OG images for social sharing, compositing article titles and category badges onto branded templates. Every image ships as AVIF with quality tuned for the content type (photography at 80, UI elements at 90). A custom Rehype plugin adds native lazy loading attributes to all images below the fold, keeping initial page weight under control.
Search: Pagefind generates a static full-text search index at build time. The index covers all 109 articles and is loaded on demand when a visitor opens the search overlay. Zero JavaScript ships until someone actually searches.
Design system: The “Sacramento Golden Hour” palette uses sage green (#4A7A42), terracotta (#8B5E3C), saffron (#8E6123), and parchment (#FAF8F3). Custom design touches include drop cap styling on article intros, tree leaf SVG bullet points replacing standard list markers, tree branch SVG ornaments before H2 headings, and animated floating leaves in the hero section. The Lora variable font is self-hosted to eliminate Google Fonts as a render-blocking dependency.
Content components: Each article auto-generates a table of contents from H2/H3 headings. Related articles surface at the bottom of every post based on shared category and tag overlap. Category badges use 5 color-coded variants matching the content pillars.
Deployment: GitHub Actions on a self-hosted runner builds the Astro site, runs the Sharp image pipeline, generates the Pagefind index, and submits changed URLs to IndexNow for rapid re-indexing. The output rsyncs to cPanel.
Content strategy
The 109 articles split across five pillars: Buying (species selection, nursery comparisons, cost breakdowns), Planting (soil prep, spacing, timing, transplanting), Care (watering schedules, fertilization, disease identification), Trimming (pruning techniques, when to hire an arborist, tool recommendations), and Gardening (companion planting, landscape design, seasonal maintenance).
The editorial voice is opinionated homeowner, not textbook. Articles name specific dollar amounts (“expect to pay $150 to $400 for a 15-gallon specimen”), seasonal timing down to the week (“plant bare-root fruit trees between mid-December and early February”), and USDA zone callouts that matter for the Central Valley. This specificity is what separates the content from the generic “trees are great for shade” articles that dominate search results.
Revenue flows through two channels. Google AdSense runs display ads across the article pages. Amazon affiliate links point to recommended tools, soil amendments, and tree care products in context, not in a listicle sidebar. Every product link sits inside an article where I explain why that specific item matters for that specific task.
The Sacramento angle
Every article on the site is anchored to Northern California climate reality. USDA zones 9a and 9b. Clay soil that drains poorly and cracks in August. Summer temperatures that regularly hit 105 degrees. Water restrictions from SMUD and the Sacramento County Water Agency that limit irrigation schedules. These constraints eliminate half the trees that national guides recommend.
The content draws from 20+ years of hands-on experience as a Sacramento homeowner. Which Valley Oak cultivar actually survives in Elk Grove clay. Why Chinese Pistache is the default recommendation for fall color in Land Park and Midtown. What happens when you plant a Redwood in Natomas without accounting for the water table. This is the kind of specific, zone-tested, failure-informed knowledge that you cannot extract from a generic garden encyclopedia.
Like what you see?
I build tools that solve real problems. If you have an idea or a project that needs engineering, let's talk.
Get in Touch