Appearance
Keeping Rank Math's SEO titles, sitemaps and redirects when you move to Laravel
When a site moves to a new platform, search rankings suffer from what changed on the way: titles back at their defaults, a canonical pointing somewhere new, a sitemap at another address, years of redirects left behind. On a WordPress site with Rank Math, all of that lives in the plugin's data:
- Settings are serialized arrays with
on/offswitches, in four options:rank-math-options-titles(title and description templates),rank-math-options-general(breadcrumbs, verification codes, robots.txt, redirect settings),rank-math-options-sitemapandrank-math-options-instant-indexing. - Each record's own head is in meta:
rank_math_title,rank_math_description,rank_math_robots,rank_math_canonical_url,rank_math_focus_keyword,rank_math_breadcrumb_title, the Facebook and Twitter fields, andrank_math_primary_category. - Redirects and the 404 log are tables of their own:
rank_math_redirections,rank_math_redirections_cache,rank_math_404_logs. The link counter hasrank_math_internal_linksandrank_math_internal_meta.
A usual Laravel rebuild adds an SEO package and imports what it can. The templates with their variables (%title% %sep% %sitename%) have to be written again. The sitemaps move to the package's addresses, and the redirect rules go into a new table with different matching rules. Each of those is a chance for a page to answer differently than it did.
How kitloom reads it
kitloom runs on the WordPress database as it is, and three modules read Rank Math's data where the plugin keeps it.
kitloom/seo draws the head of every page from the record's meta or its type's template:
- the title, description, robots and canonical, with the page number on page 2 and further;
- Open Graph and Twitter tags, and the webmaster verification codes on the front page;
- schema.org markup for the site's owner, the website with its search, the page, its breadcrumbs, and an article where the type asks for one;
- breadcrumbs with Rank Math's labels and the primary category.
It serves the sitemaps at Rank Math's addresses (/sitemap_index.xml, /{type}-sitemap.xml, /main-sitemap.xsl), robots.txt with its saved text, Google's HTML verification file, and [rank_math_html_sitemap]. Instant indexing sends new and changed addresses to IndexNow and to Google's Indexing API.
kitloom/redirects runs on the redirection tables. Every rule keeps working: exact, contains, starts with, ends with and regex; 301, 302 and 307, or a 410 or 451 status. When several rules match, the newest wins, and hits are counted. The settings are followed too: where a missing page goes, and Auto Post Redirect, which leaves a rule behind when a slug changes. The 404 monitor goes on writing to the same log, in simple or advanced mode.
kitloom/internal-links counts links the way Rank Math's Link Counter does, in the same tables, and lists orphans: published posts nothing links to.
In code, the options are read and written key by key, so the keys a screen does not own stay as they are:
php
use Kitloom\Seo\RankMath\Options;
app(Options::class)->get(Options::TITLES, 'title_separator', '-');
app(Options::class)->isOn(Options::SITEMAP, 'authors_sitemap');What the admin shows
Both admins, Filament and Nova, have an SEO section laid out like Rank Math's menu:
- General Settings: breadcrumbs, webmaster tools, robots.txt.
- Titles & Meta: global meta, local SEO, the home page, authors, other pages, and a tab per post type and taxonomy.
- Sitemap Settings: what gets a sitemap and how many links a file holds.
- Instant Indexing: submit addresses by hand, choose what is sent on its own, and see what the services answered.
Post and taxonomy forms get an SEO block (a tab in Nova) with the title, description, focus keyword, robots, canonical, breadcrumb title, primary category and social previews. An empty field falls back to the template.
The Redirects section has Redirections (rules with several sources each, bulk activate, deactivate and trash), the 404 Monitor (make a rule from logged rows, clear the log) and Settings. Internal Links has Posts, Links and Orphans, plus a links column in the post lists.
With kitloom/ai installed, an agent reads and changes a record's head meta (seo_get, seo_update), manages redirect rules, and turns 404 log rows into a rule (redirect_from_404). It moves rules to the trash and never deletes them.
What changes and what is not covered
- The move is one way. Rank Math's serialized options and redirect sources are read. What kitloom saves is JSON, which Rank Math on WordPress would not read back.
- Rank Math's per-post schema from its Schema Generator is not read. kitloom builds its schema.org graph from the settings.
- Content analysis and the SEO score are not there. The focus keyword is kept and editable.
- Yoast SEO and the Redirection plugin are imported, not read in place. SEO → General → Import from Yoast SEO and Redirects → Settings → Import from Redirection take their data once into Rank Math's keys and tables; from then on the site works with those, and the report names what had no place to go.
- Feeds and WordPress's own sitemap. kitloom sites have no RSS feeds, so
/feed/answers 404./wp-sitemap.xmlis not served;/sitemap_index.xmlis. - A static file wins. A
robots.txtor verification file left inpublic/is served before kitloom is asked. Remove it. - Plugin code does not run. All of this is kitloom's own code, written from Rank Math's data model.
The keys, addresses and settings are in the guides for SEO, Redirections and Internal Links.
Keep SEO in shape with an AI agent
SEO after a move is a long tail of small jobs, and that is what an agent does well. With kitloom/ai installed, an agent connected to the site reads and writes each record's head meta (seo_get, seo_update), manages redirect rules (redirects_list, redirects_create, redirects_update), reads the 404 log (not_found_list) and turns a missed address into a rule (redirect_from_404). You ask:
- "Which addresses gave 404 since the switch? Redirect the ones that have a new page and list the rest."
- "Write meta descriptions for the posts that have none, under 155 characters."
- "Find the pages whose SEO title is longer than 60 characters and shorten them."
It acts as the user whose key it holds, rules go to the trash rather than away, and every change is in the activity log. How to connect one: Run your site from Claude or Cursor.
Check it on your own site
Create a MySQL user that can only read, point kitloom at the live database, and run compare-sites.php against both sites. It takes the addresses from both sites' sitemaps, plus any list you give it. Give it your most visited pages from Search Console. For each address it compares the status code, the redirect target, robots (an error when one side says noindex), the title, description and canonical, the content, and the posts an archive lists.
The read-only look leaves the redirects module out: redirects, like the admin, need a copy of the database that php artisan migrate has run on. Test your redirects there. The steps are in Migrate from WordPress, and what to watch after the switch is in Leaving WordPress without losing your search rankings.
Try it
Open a sandbox in one click, with no sign-up: Filament or Nova. When it fits, see Pricing.
SEO data is one part of a site's plugin data. The same approach covers WooCommerce, ACF fields and Contact Form 7 and Flamingo. An overview is in your plugin data after moving to Laravel.