Advanced2min read
Database
Schema storage structure — custom table design, columns and injection priorities.
Database Structure
Schemafy creates a single custom table on activation: wp_baseo_custom_schemas
Schemas are stored in their own table — not in WordPress post meta. This enables faster queries and efficient bulk operations.
Table schema
sql
wp_baseo_custom_schemas (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
url VARCHAR(500), -- page URL the schema is assigned to
schema_type VARCHAR(100), -- @type value: Article, Product, etc.
schema_name VARCHAR(200), -- internal descriptive name
schema_data LONGTEXT, -- full JSON-LD content
meta_title TEXT, -- SEO meta title
meta_description TEXT, -- SEO meta description
og_title TEXT,
og_description TEXT,
og_image VARCHAR(500),
og_type VARCHAR(50),
twitter_card VARCHAR(50),
twitter_title TEXT,
twitter_description TEXT,
twitter_image VARCHAR(500),
twitter_creator VARCHAR(100),
is_active TINYINT(1), -- 1 = active, 0 = inactive
created_at DATETIME,
created_by BIGINT, -- WordPress user ID
updated_at DATETIME
)Injection priorities
| Content | Hook | Priority |
|---|---|---|
| SEO meta tags | `wp_head` | 1 |
| Social media tags (OG + Twitter) | `wp_head` | 2 |
| JSON-LD schemas | `wp_head` | 5 |
Everything loads before the main page content — crawlers find it immediately on every request.
Performance impact
Schema injection reads one database row per active schema on the current URL. The query is a simple indexed lookup by URL. JSON-LD output is plain text — no scripts, no render blocking, zero impact on Core Web Vitals.
Was this page helpful?
Thanks for the feedback!