---
title: "I migrated 100k pages to the new Laravel Head package for seo"
url: https://daily.dev/posts/i-migrated-100k-pages-to-the-new-laravel-head-package-for-seo-20n9lh17m
source_url: https://danielpetrica.com/laravel-head-package-migration
type: article
source: "Daniel Petrica"
author: "Daniel, Petrica Andrei-Daniel"
published: 2026-08-24T17:04:20.180Z
updated: 2026-08-25T14:00:22.572Z
tags: ["testing", "php", "laravel", "seo"]
reading_time: 10
upvotes: 7
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I migrated 100k pages to the new Laravel Head package for seo

**[Daniel Petrica](https://daily.dev/sources/danielpetrica)** · [@danielpetrica](https://daily.dev/danielpetrica) · 10 min read · 7 upvotes · 0 comments

## Summary

A developer walks through migrating a 104k-page Laravel directory site (LaraPlugins.io) from a homegrown Blade-based SEO metadata system to the new official laravel/head package. The post covers the layered architecture used: global defaults, the @head directive, route-level metadata, controller-level overrides, Schema.org JSON-LD generation, and error page handling. It also details what was intentionally kept custom (OG image generation, sitemaps, RSS feeds, model SEO accessors), how the migration was verified (rendered output diffs, Google Rich Results Test, HTTP assertions, Search Console monitoring), and closes with a plug for a new SEO monitoring tool the author built called SEO by Daniel.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://danielpetrica.com/laravel-head-package-migration>

## Questions this post answers

### How do I add SEO meta tags, Open Graph, and JSON-LD to a Laravel app using the new laravel/head package?

Define global fallbacks with Head::defaults() in a service provider, then add the @head Blade directive to your layout to render everything. Override per route with withHead() on route definitions, or per controller with the fluent Head::title()->description()->og()->schema() API. Head::schema() renders Schema.org JSON-LD directly, and Head::errors() sets metadata for 404/500/503 pages.

_Developers wiring up SEO metadata in Laravel track new package releases like this via daily.dev._

### What PHP and Laravel versions does the laravel/head package require?

Version 0.2.1 of laravel/head, current as of August 2026, requires PHP 8.3 or higher and Laravel 13. It is still a pre-1.0 release, so its API may continue to evolve.

_Teams planning a Laravel upgrade path can watch package compatibility shifts on daily.dev._

### How can I verify that a large-scale SEO metadata migration didn't break anything in production?

Crawl the top pages by traffic before and after the change and diff the rendered head output, run every JSON-LD page through Google's Rich Results Test, add HTTP tests asserting title, meta description, og:title, and ld+json script tags are present, and monitor Search Console for 72 hours post-deploy for errors or drops in valid indexed pages.

_Developers de-risking large migrations can find verification approaches like this on daily.dev._

---

Tags: [#testing](https://daily.dev/tags/testing), [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel), [#seo](https://daily.dev/tags/seo)

[View this post on daily.dev](https://daily.dev/posts/i-migrated-100k-pages-to-the-new-laravel-head-package-for-seo-20n9lh17m)
