Skip to main content

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) or INSERT (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"
PluginMeta Key Written
Yoast SEO_yoast_wpseo_title
SEOPress_seopress_titles_title
Rank Mathrank_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/INSERT operations, 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.

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:

PluginTable/Storage
Redirectionwp_redirection_items
Rank Math SEOwp_posts (post_type=rank_math_redirection)

redirect add

Database impact:

PluginTableOperation
Redirectionwp_redirection_itemsINSERT
Rank Math SEOwp_postsINSERT (as custom post type)

redirect delete

Database impact:

PluginTableOperation
Redirectionwp_redirection_itemsDELETE
Rank Math SEOwp_postsDELETE 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

CommandWordPress TableOperationRollback Possibility
meta get/listwp_postmetaSELECTN/A (read-only)
meta setwp_postmetaINSERT/UPDATERestore from pre-export backup
meta deletewp_postmetaDELETERestore from pre-export backup
meta importwp_postmetaINSERT/UPDATE per rowRestore from backup
meta bulkwp_postmetaINSERT/UPDATE per fieldRestore from backup
audit *wp_posts, wp_postmetaSELECTN/A (read-only)
redirect listplugin tablesSELECTN/A (read-only)
redirect addplugin tablesINSERTDelete by ID or restore from backup
redirect deleteplugin tablesDELETERe-import from pre-export backup
redirect importplugin tablesINSERT per rowDelete imported rules
redirect exportplugin tablesSELECTN/A (read-only)

Meta Key Mapping Reference

CLI FieldYoastSEOPressRank Math
title_yoast_wpseo_title_seopress_titles_titlerank_math_title
description_yoast_wpseo_metadesc_seopress_titles_descrank_math_description
canonical_yoast_wpseo_canonical_seopress_robots_canonicalrank_math_canonical_url
noindex_yoast_wpseo_meta-robots-noindex_seopress_robots_indexrank_math_robots
focus_keyword_yoast_wpseo_focuskw_seopress_analysis_target_kwrank_math_focus_keyword