Support Log in

36. Database Tables

Developer Guide
Prefer video? Watch the Rank Forge tutorials 9 short guides covering every feature Watch

Rank Forge uses two custom database tables.

wp_rankforge_analysis

sql
CREATE TABLE wp_rankforge_analysis (
    id               bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    post_id          bigint(20) unsigned NOT NULL,
    score            int(3) NOT NULL DEFAULT 0,
    issues           text DEFAULT '',
    suggestions      text DEFAULT '',
    meta_title       varchar(255) DEFAULT '',
    meta_description text DEFAULT '',
    schema_json      text DEFAULT '',
    internal_links   text DEFAULT '',
    analyzed_at      datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (id),
    UNIQUE KEY post_id (post_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
php
// Get all posts with score below 50
global $wpdb;
$bad_posts = $wpdb->get_results(
    "SELECT a.post_id, a.score, p.post_title
     FROM {$wpdb->prefix}rankforge_analysis a
     JOIN {$wpdb->posts} p ON a.post_id = p.ID
     WHERE a.score < 50 AND p.post_status = 'publish'
     ORDER BY a.score ASC"
);

wp_rankforge_redirects

See section 22 for the full CREATE TABLE statement.

Transients

Transient KeyTTLDescription
rankforge_sitemap_index1 hourCached sitemap index XML
rankforge_sitemap_{posttype}1 hourPer-type sitemap XML
rankforge_video_sitemap1 hourVideo sitemap XML
rankforge_broken_links_cache1 dayBroken links results
rankforge_404_log1 week404 tracking log
rankforge_optimize_{post_id}1 hourContent optimization cache
php
// Clear all sitemap caches
RANKFORGE_Sitemap::instance()->invalidate_cache();

// Clear the 404 log
delete_transient( 'rankforge_404_log' );

Forge AI Assistant Online

Hi! I'm the Rank Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs