What Changes In WordPress?
This page documents exactly what happens in WordPress when you run each command. Use it to understand the database impact, plan rollbacks, and write custom scripts that interact with the same data.
Meta Commands
meta get, meta list
Database impact: None (read-only).
These commands query WordPress postmeta via WP-CLI.
meta set <post-id> <field> <value>
Database impact:
- Table:
wp_postmeta - Operation:
UPDATE(if key exists) orINSERT(if new) - Affected row:
post_id = <post-id> AND meta_key = <plugin-specific-key>
Example when running:
seo-ops meta set 123 title "New SEO Title"
The underlying WP-CLI command is:
wp post meta set 123 _yoast_wpseo_title "New SEO Title"
| Plugin | Meta Key Written |
|---|---|
| Yoast SEO | _yoast_wpseo_title |
| SEOPress | _seopress_titles_title |
| Rank Math | rank_math_title |
| AIOSEO | _aioseo_title |
| Slim SEO | _seo_ops_title |
| None | _seo_ops_title |
meta set <post-id> --title="X" --description="Y"
Multiple fields are each written as separate wp post meta set calls. Each field is a single row in wp_postmeta.
meta delete <post-id> <field>
Database impact:
- Table:
wp_postmeta - Operation:
DELETE - Affected row:
post_id = <post-id> AND meta_key = <plugin-specific-key>
The meta row is removed entirely (not set to empty string).
meta export, meta import
export: Read-only. Queries post IDs and reads SEO meta keys for each.
import: For each CSV row, runs meta set on the corresponding field. Same database impact as meta set but applied across multiple posts in sequence.
meta bulk
Database impact:
- Table:
wp_postmeta - Operation: Multiple
UPDATE/INSERToperations, one per field per post per CSV row.
Each row in the CSV produces one or more wp post meta set calls.
Example CSV row:
post_id,title,description
123,New Title,New Description
Produces:
wp post meta set 123 _yoast_wpseo_title "New Title"
wp post meta set 123 _yoast_wpseo_metadesc "New Description"
Audit Commands
audit meta-check
Database impact: None (read-only).
Queries wp_posts and wp_postmeta to check which posts have which SEO meta keys populated.
audit links
Database impact: None (read-only).
Parses post content (wp_posts.post_content) to extract and analyze links.
audit images
Database impact: None (read-only).
Parses post content to find <img> tags and check for alt attributes.
audit speed
Database impact: None (read-only).
Calls the external Google PageSpeed API with the site URL. Does not read or write WordPress data.
audit broken
Database impact: None (read-only).
Parses post content for links and makes HTTP HEAD/GET requests to check for broken URLs.
audit duplicate-content
Database impact: None (read-only).
Reads post content from wp_posts.post_content, computes TF-IDF similarity, and returns duplicate candidates.
audit full, audit report
Database impact: None (read-only).
Runs all audit checks and formats results.
Redirect Commands
redirect list
Database impact: None (read-only).
Queries the active redirect plugin's storage:
| Plugin | Table/Storage |
|---|---|
| Redirection | wp_redirection_items |
| Rank Math SEO | wp_posts (post_type=rank_math_redirection) |
redirect add
Database impact:
| Plugin | Table | Operation |
|---|---|---|
| Redirection | wp_redirection_items | INSERT |
| Rank Math SEO | wp_posts | INSERT (as custom post type) |
redirect delete
Database impact:
| Plugin | Table | Operation |
|---|---|---|
| Redirection | wp_redirection_items | DELETE |
| Rank Math SEO | wp_posts | DELETE OR trash (plugin-dependent) |
redirect import, redirect export
import: For each CSV row, runs redirect add. Same database impact as redirect add but applied across multiple rows.
export: Read-only. Queries redirect storage.
Content Commands
content generate
Database impact: None (unless --publish is used).
When using --publish:
- Table:
wp_posts - Operation: INSERT (new post with
post_status = publish)
content pipeline import
Database impact: None (local file storage only).
Pipeline data is stored in ~/.wp-seo-ops/pipelines/ as local JSON files; no WordPress tables are touched.
Analyze Commands
analyze keyword, analyze gsc-adapter
Database impact: None (read-only external API calls).
Does not read or write WordPress data.
Instant Indexing Commands
instant-indexing submit
Database impact: None.
Submits URLs via the IndexNow HTTP API. No WordPress database interaction.
Summary Table
| Command | WordPress Table | Operation | Rollback Possibility |
|---|---|---|---|
meta get/list | wp_postmeta | SELECT | N/A (read-only) |
meta set | wp_postmeta | INSERT/UPDATE | Restore from pre-export backup |
meta delete | wp_postmeta | DELETE | Restore from pre-export backup |
meta import | wp_postmeta | INSERT/UPDATE per row | Restore from backup |
meta bulk | wp_postmeta | INSERT/UPDATE per field | Restore from backup |
audit * | wp_posts, wp_postmeta | SELECT | N/A (read-only) |
redirect list | plugin tables | SELECT | N/A (read-only) |
redirect add | plugin tables | INSERT | Delete by ID or restore from backup |
redirect delete | plugin tables | DELETE | Re-import from pre-export backup |
redirect import | plugin tables | INSERT per row | Delete imported rules |
redirect export | plugin tables | SELECT | N/A (read-only) |
Meta Key Mapping Reference
| CLI Field | Yoast | SEOPress | Rank Math |
|---|---|---|---|
title | _yoast_wpseo_title | _seopress_titles_title | rank_math_title |
description | _yoast_wpseo_metadesc | _seopress_titles_desc | rank_math_description |
canonical | _yoast_wpseo_canonical | _seopress_robots_canonical | rank_math_canonical_url |
noindex | _yoast_wpseo_meta-robots-noindex | _seopress_robots_index | rank_math_robots |
focus_keyword | _yoast_wpseo_focuskw | _seopress_analysis_target_kw | rank_math_focus_keyword |