← Portfolio/The Law Practice Exchange
Legal / M&A MarketplaceSEO Automation

Weeks of Manual SEO Work Automated — Custom Elementor Plugin Built to Solve a Missing API

The Law Practice Exchange

Weeks ? hoursto audit and fix the entire site
All broken linksdetected and fixed automatically
AI-generatedmeta tags, alt text, and SEO copy
Ongoingscheduled monitoring prevents recurrence

LPE's WordPress/Elementor site had accumulated hundreds of broken links, missing meta tags, and SEO issues across hundreds of pages. Manual fixing would have taken weeks. The core problem: Elementor has no API, so automations can't access or edit page content. We built a custom WordPress plugin to solve that, then automated the entire audit and fix cycle.

The Problem

A large WordPress/Elementor site with accumulated SEO debt — and Elementor has no API to fix it programmatically.

LPE's website had grown over time — hundreds of pages, blog posts, marketplace listings. As URLs changed, content moved, and the site evolved, broken links accumulated. Meta titles were missing from some pages, duplicate across others. Image alt text was absent. The HubSpot SEO audit was flagging dozens of issues.

The compounding problem: the site was built in Elementor. Elementor stores page content in a proprietary data format in the WordPress database, and it provides no REST API endpoint for programmatic access. Standard WordPress API tools can't read or edit Elementor content — which means standard automation tools can't either.

Manual fixing was the only path available — and with hundreds of pages to audit, test, and update, that would have taken weeks. Even after fixing everything once, new issues would accumulate without a monitoring system.

  • Hundreds of broken internal and external links across the site
  • Missing meta titles and descriptions on multiple pages
  • Missing alt text on images throughout the site
  • Duplicate page titles causing keyword cannibalisation
  • Elementor's missing API blocked all programmatic solutions
  • HubSpot SEO audit flagging unresolved issues
  • No system to catch new SEO problems as they arose

What We Built

A custom WordPress plugin that creates the Elementor API that doesn't exist — then a full n8n automation pipeline that audits, fixes, and monitors the entire site.

01

Custom WordPress plugin (PHP) — creating the missing API

Built a custom PHP plugin that reads Elementor's proprietary data format from the WordPress database (wp_posts, wp_postmeta) and exposes it via REST API endpoints. The plugin also provides write-back endpoints — so fixes applied by the automation are saved directly to the database. This was the foundational technical unlock for everything that followed.

02

Full-site database scan

n8n queries the WordPress database through the plugin, extracting all published pages and posts. For each page: all internal and external links, all SEO meta fields (title, description, H1, H2 structure), all image alt attributes. This produces a complete site inventory.

03

Broken link detection and fixing

Every link is tested with an HTTP request. 404s and error responses are flagged. For broken internal links, the automation attempts to identify the correct current URL (redirect chains, URL changes in the DB). For broken external links, AI determines whether to remove or replace. All fixes are written back via the custom plugin API.

04

AI-generated SEO fixes

For pages with missing or duplicate meta titles and descriptions, Claude reads the page content and generates appropriate, unique SEO copy. Missing image alt text is generated from image filenames and surrounding content context. H1 issues are flagged and corrected. All AI-generated content is written directly to the database.

05

HubSpot integration and ongoing monitoring

The automation pulls the HubSpot SEO audit report, cross-references findings with the n8n scan, and prioritises fixes by HubSpot's severity ranking. After fixes are applied, HubSpot is updated to mark issues as resolved. The workflow runs on a recurring schedule — weekly or monthly — catching new issues before they accumulate.

Technical Breakdown

Custom pluginPHP — creates REST API endpoints for Elementor page data (read + write). Directly queries wp_posts and wp_postmeta tables.
Automation enginen8n — orchestrates full workflow: DB scan, link testing, AI fix generation, write-back, HubSpot sync, scheduling
AI layerClaude API — generates meta titles, meta descriptions, alt text, and context-aware link replacement decisions
SEO integrationHubSpot API — pulls audit findings, maps to n8n scan results, marks resolved issues post-fix
Link validationHTTP requests to test each URL — checks response code, follows redirects, distinguishes temporary from permanent failures
MonitoringScheduled recurring runs — catches new broken links, missing tags, or SEO regressions as the site continues to grow

Ready to be next?

Tell me where your biggest bottleneck is.

30-minute audit call. I'll map out exactly what to automate, what it costs, and what you'll get back. No fluff.