Bring Keyword Rankings Inside WordPress With the AWR API

Bring Keyword Rankings Inside WordPress With the AWR API

Updated on

5

min read

Bring Keyword Rankings Inside WordPress With the AWR API

Bring Keyword Rankings Inside WordPress With the AWR API

Updated on

5

min read

Bring Keyword Rankings Inside WordPress With the AWR API

Bring Keyword Rankings Inside WordPress With the AWR API

Updated on

5

min read

Rank data usually lives in one tool and content lives in another. Here's how developers can use the AWR API to bring rankings into WordPress, right where editors work.

TL;DR

  • Content editors change pages in WordPress but rarely see how those changes affect rankings.

  • The AWR API can feed ranking data into WordPress once a day, with no calls on page load.

  • This guide builds an editor panel on each post, a dashboard widget of top movers, and an email alert when an edited post drops.

  • The code was tested on WordPress 7.1.4, with sample data in the export format AWR documents.

Most WordPress sites are edited by people who never open a rank tracker. They update a service page, tweak a headline or swap out a section, then move on. If rankings slip a week later, nobody connects the two.

I've built websites since 2005 and worked in SEO for more than 18 years, and that gap shows up on almost every project. The SEO team watches the reports. The content team watches the editor. The data that would help both sits in only one of those places.

WordPress runs 39.3% of all websites, according to W3Techs in November 2026. The AWR API makes it possible to close that gap. This guide walks through one way to do it: a small custom plugin that imports ranking data once a day and shows it inside WordPress.

I tested every code sample on a WordPress 7.1.4 site, using sample ranking data in the export format shown in AWR's API reference, and the screenshots below come from that test site.

Who this is for

This guide is written for:

  • WordPress developers who build or maintain sites for clients or in-house teams

  • Technical SEOs who track rankings in AWR and want editors to act on the data

  • Agencies managing several WordPress sites, who want ranking data inside each client's CMS

You'll need to be comfortable adding a small custom plugin and reading PHP. No JavaScript build tools are required.

What you'll end up with

The finished setup has four parts:

  • A daily import that pulls ranking data from AWR and stores it against each post

  • An editor panel on every post and page, showing its keywords, current positions and change since the last reading

  • A dashboard widget listing the biggest gainers and losers, plus archive pages that rank in place of posts

  • A drop alert that emails the team when a recently edited post loses ground

Here's what editors see. The Rankings panel sits in the editor's settings sidebar, under the page settings, so it's in view whenever someone works on the page:

Here's how the pieces connect behind the scenes:

One design rule runs through all of it. The site never calls the API when a visitor loads a page. Data moves once a day, in the background, and everything else reads from the WordPress database.

Before you start

Requirement

Why it matters

An AWR plan with API access

The API needs a token. Check that your plan includes it.

A tracked project with URL data

The import matches each ranking URL to a WordPress post.

WordPress 6.x or 7.x and PHP 8

The code was tested on WordPress 7.1.4 with PHP 8.3.

A custom plugin or mu-plugin

Keeps the code separate from the theme. The code works as either.

A staging site

Test the import on a copy before running it against a live site.

Step 1: Store the API token safely

The ranking export uses your AWR API token, passed as a token parameter on each request. Keep the token out of the database, your theme and version control. An environment variable is the safest option, set in your host's control panel or a .env file that isn't committed. If your host doesn't support environment variables, define a constant in a config file you keep out of the repository.

This helper reads the environment variable first and falls back to a constant:

// .env file or server environment (preferred):
// AWR_API_TOKEN=your-token-here
// AWR_PROJECT=Your Project Name
// AWR_SEARCH_ENGINE_ID=-1 (optional)
// AWR_WEBSITE_ID=-1 (optional)
function awr_setting( $name ) {
    $value = getenv( $name );
    if ( ! $value && defined( $name ) ) {
        $value = constant( $name );
    }
    return $value ? (string) $value : '';
}

Use your project name exactly as it appears in AWR. The two optional settings limit the export to one search engine and one website. With the defaults, the export includes every search engine and website in the project: the plugin labels keywords by search engine and ignores rankings for other domains, such as competitors.

Because the token travels in the URL, never print or log the request URLs. The code below only logs error messages.

Step 2: Import rankings once a day

The import runs on a scheduled WP-Cron event. Scheduling it on init, rather than with an activation hook, means it works whether the code runs as a regular plugin or a must-use plugin, because must-use plugins never "activate". The first run starts an hour later, so installing the plugin doesn't trigger a large request straight away.

// Works for both plugins and mu-plugins.
add_action( 'init', function () {
    if ( ! wp_next_scheduled( 'awr_daily_import' ) ) {
        wp_schedule_event( time() + HOUR_IN_SECONDS, 'daily', 'awr_daily_import' );
    }
} );
// Only fires for regular plugins. Removes the event when the plugin is switched off.
register_deactivation_hook( __FILE__, function () {
    wp_clear_scheduled_hook( 'awr_daily_import' );
} );
add_action( 'awr_daily_import', 'awr_import_rankings' );
add_action( 'awr_fetch_export', 'awr_fetch_export' );

AWR's ranking export works in three steps. The first request schedules an export and returns a download link in its details field. The download is a ZIP file containing a CSV. The import requests the last two days, so each post gets a current position and a previous one to compare against:

function awr_import_rankings() {
    $token = awr_setting( 'AWR_API_TOKEN' );
    $project = awr_setting( 'AWR_PROJECT' );
    if ( ! $token || ! $project ) {
        awr_log_error( 'Missing AWR_API_TOKEN or AWR_PROJECT.' );
        return;
    }
    // 1. Schedule an export of the last two days, for one search engine and one website.
    $url = 'https://api.awrcloud.com/v2/get.php?' . http_build_query( array(
        'action' => 'export_ranking',
        'project' => $project,
        'token' => $token,
        'startDate' => wp_date( 'Y-m-d', strtotime( '-1 day' ) ),
        'stopDate' => wp_date( 'Y-m-d' ),
        'format' => 'csv',
        'searchEngineId' => awr_setting( 'AWR_SEARCH_ENGINE_ID' ) ?: '-1',
        'websiteId' => awr_setting( 'AWR_WEBSITE_ID' ) ?: '-1',
    ) );
    $response = wp_remote_get( $url, array( 'timeout' => 30 ) );
    $body = is_wp_error( $response ) ? null : json_decode(
p_remote_retrieve_body( $response ), true );
    if ( ! is_array( $body ) || 0 !== (int) ( $body['response_code'] ?? -1 ) || empty( $body['details'] ) ) {
        awr_log_error( is_wp_error( $response ) ? $response->get_error_message() : 'Export not scheduled: ' . ( $body['message'] ?? 'unexpected response' ) );
        return;
    }
    // 2. "details" is the download link for the export.
    awr_fetch_export( $body['details'] );
}

The download link may not be ready straight away. If the response isn't a ZIP file, the plugin tries again 15 minutes later, up to four times, and records an error if the export never arrives:

function awr_fetch_export( $download_url ) {
    $response = wp_remote_get( $download_url, array( 'timeout' => 60 ) );
    $zip = is_wp_error( $response ) ? '' : wp_remote_retrieve_body( $response );
    // A ZIP file starts with "PK". Anything else means the export isn't ready yet.
    if ( 'PK' !== substr( $zip, 0, 2 ) ) {
        $tries = (int) get_option( 'awr_fetch_tries', 0 ) + 1;
        if ( $tries > 4 ) {
            delete_option( 'awr_fetch_tries' );
            awr_log_error( 'Export not ready after four attempts.' );
            return;
        }
        update_option( 'awr_fetch_tries', $tries, false );
        wp_schedule_single_event( time() + 15 * MINUTE_IN_SECONDS,
awr_fetch_export', array( $download_url ) );
        return;
    }
    delete_option( 'awr_fetch_tries' );
    // 3. Read the CSV inside the ZIP, then store it.
    $csv = awr_csv_from_zip( $zip );
    if ( '' === $csv ) {
        awr_log_error( 'Could not read the CSV in the export ZIP.' );
        return;
    }
    awr_store_rows( awr_parse_csv( $csv ) );
    update_option( 'awr_last_import', time(), false );
    delete_option( 'awr_last_error' );
}

Read the CSV

AWR's API reference shows the export's columns, starting with "Date","Search Engine","Keyword","Keyword Group","Website","URL","Position". The plugin reads the columns by name rather than position, so extra columns don't break it, and it stops with a clear error if one it needs is missing. A position of "-" means the keyword isn't ranking:

function awr_csv_from_zip( $zip ) {
    if ( ! class_exists( 'ZipArchive' ) ) {
        return '';
    }
    $file = wp_tempnam( 'awr-export' );
    file_put_contents( $file, $zip );
    $csv = '';
    $archive = new ZipArchive();
    if ( true === $archive->open( $file ) ) {
        for ( $i = 0; $i < $archive->numFiles; $i++ ) {
            if ( '.csv' === strtolower( substr( $archive->getNameIndex( $i ), -4 ) ) ) {
                $csv = (string) $archive->getFromIndex( $i );
                break;
            }
        }
        $archive->close();
    }
    wp_delete_file( $file );
    return $csv;
}
function awr_parse_csv( $csv ) {
    $handle = fopen( 'php://temp', 'r+' );
    fwrite( $handle, $csv );
    rewind( $handle );
    // Column names from AWR's documented export, for example "Date","Search Engine","Keyword","URL","Position".
    $header = array_map( 'trim', (array) fgetcsv( $handle, 0, ',', '"', '' ) );
    $col = array_flip( $header );
    foreach ( array( 'Date', 'Search Engine', 'Keyword', 'URL', 'Position' ) as $name ) {
        if ( ! isset( $col[ $name ] ) ) {
            fclose( $handle );
            awr_log_error( 'Export is missing the "' . $name . '" column.' );
            return array();
        }
    }
    $rows = array();
    $engines = array();
    while ( false !== ( $line = fgetcsv( $handle, 0, ',', '"', '' ) ) ) {
        if ( count( $line ) < count( $header ) ) {
            continue;
        }
        $engines[ $line[ $col['Search Engine'] ] ] = true;
        $rows[] = array(
            'date' => $line[ $col['Date'] ],
            'engine' => $line[ $col['Search Engine'] ],
            'keyword' => $line[ $col['Keyword'] ],
            'url' => $line[ $col['URL'] ],
            'position' => $line[ $col['Position'] ], // "-" means not ranking.
        );
    }
    fclose( $handle );
    // With more than one search engine in the export, label keywords so readings don't overwrite each other.
    if ( count( $engines ) > 1 ) {
        foreach ( $rows as &$row ) {
            $row['keyword'] .= ' (' . $row['engine'] . ')';
        }
        unset( $row );
    }
    return $rows;
}
function awr_log_error( $message ) {
    update_option( 'awr_last_error', $message, false );
    error_log( 'AWR import failed: ' . $message );
}

The import records the time of the last successful run, or the error, so the panel and widget can show whether the data is current. The export is limited to 150 calls an hour, shared with AWR's other exports, which is plenty for one daily import.

Don't rely on traffic to run the job

WP-Cron only fires when someone visits the site. On a quiet site, the import can run late or not at all. Switch to a real server cron job instead: set DISABLE_WP_CRON to true in wp-config.php, then have the server call wp-cron.php once an hour. Most hosts let you set this up in the control panel.

Step 3: Match each ranking URL to a post

This is the part that makes the data useful inside WordPress. Every ranking row includes the URL that ranked. WordPress can turn most of those URLs back into a post ID with url_to_postid().

Normalize URLs first

Ranking URLs don't always match WordPress's own format exactly. A tracked URL might have no https:// prefix, use www when the site doesn't, carry a tracking parameter, or miss the trailing slash. This function adds a missing scheme, strips the query string, treats www and non-www as the same site, ignores rankings for other domains and matches the trailing slash to your permalink settings:

function awr_normalize_url( $url ) {
    // Exports can list URLs without a scheme, such as "example.com/page/".
    if ( $url && ! preg_match( '#^https?://#i', $url ) ) {
        $url = 'https://' . ltrim( $url, '/' );
    }
    $parts = wp_parse_url( $url );
    if ( empty( $parts['host'] ) ) {
        return '';
    }
    // Ignore rankings for other domains, and treat www and non-www as the same site.
    $home = wp_parse_url( home_url() );
    $bare = function ( $host ) {
        return preg_replace( '/^www\./', '', strtolower( $host ) );
    };
    if ( $bare( $parts['host'] ) !== $bare( $home['host'] ) ) {
        return '';
    }
    // Drop the query string and fragment, then match the site's trailing slash setting.
    $path = user_trailingslashit( untrailingslashit( $parts['path'] ?? '/' ) );
    $port = isset( $home['port'] ) ? ':' . $home['port'] : '';
    return $home['scheme'] . '://' . $home['host'] . $port . $path;
}

In testing, this mapped http://www.example.com/how-to-fix-a-leaking-tap?utm_source=x to the right post. Without it, url_to_postid() returned 0.

Store the rankings

The import then groups rows by post and keyword, and keeps the two most recent readings for each keyword. Rows with no position are skipped: a "-" or blank in the Position column means not ranking, and storing it as position 0 would create false gains and drops.

function awr_store_rows( array $rows ) {

    $by_post = array();
    $unmapped = array();
    foreach ( $rows as $row ) {
        $position = isset( $row['position'] ) ? (int) $row['position'] : 0;
        if ( $position < 1 ) {
            continue; // "-" or blank means not ranking. Don't treat it as position 0.
        }
        $url = awr_normalize_url( $row['url'] ?? '' );
        $post_id = $url ? url_to_postid( $url ) : 0;
        if ( ! $post_id ) {
            // Archives, tag pages and the homepage. Keep them for the dashboard widget.
            if ( $url ) {
                $unmapped[ $url . '|' . $row['keyword'] ] = array(
                    'url' => $url,
                    'keyword' => $row['keyword'],
                    'position' => $position,
                );
            }
            continue;
        }
        $by_post[ $post_id ][ $row['keyword'] ][ $row['date'] ] = $position;
    }
    foreach ( $by_post as $post_id => $keywords ) {
        $summary = array();
        foreach ( $keywords as $keyword => $dates ) {
            ksort( $dates ); // Y-m-d keys sort correctly as strings.
            $dates_list = array_keys( $dates );
            $values = array_values( $dates );
            $n = count( $values );
            $summary[] = array(
                'keyword' => $keyword,
                'current' => $values[ $n - 1 ],
                'current_date' => $dates_list[ $n - 1 ],
                'previous' => $n > 1 ? $values[ $n - 2 ] : null,
            );
        }
        update_post_meta( $post_id, '_awr_rankings', $summary );
        update_post_meta( $post_id, '_awr_updated', time() );
        awr_check_drops( $post_id, $summary );
    }
    update_option( 'awr_unmapped', array_values( $unmapped ), false );
}

Skipping those rows means a keyword that stops ranking disappears from the panel. If you want editors to see that it dropped out, store a separate "not ranking" status instead of a number.

The URLs that won't map

url_to_postid() returns 0 for anything that isn't a single post or page, such as category archives, tag pages, author pages and the homepage. The code above keeps those rows in an option, and the dashboard widget lists them, because an archive page ranking in place of a post is easy to miss in a rank report and obvious once it sits next to the post.

Here's what it looks like in practice. On the test site behind the screenshots, the widget's "Ranking pages that aren't posts" list flags /tag/drains/ at #6 for "drain tips" (Figure 2). On a real site, the pattern is usually this: a guide at /blog/blocked-drain-causes/ is tagged "drains" along with several related posts, and the tag archive at /tag/drains/ starts ranking for the guide's main keyword, because it shows excerpts covering the same topic.

To fix it:

  1. Check whether the archive helps searchers. If it only lists excerpts, it is competing with the guide rather than supporting it.

  2. Set thin tag archives to noindex in your SEO plugin, so Google ranks the guide instead.

  3. Link from the archive to the guide. Add a short tag description that points to the guide as the main resource.

  4. Watch the keyword in AWR over the next few weeks to confirm the guide takes the position back.

Step 4: Show rankings in the editor

A meta box is the simplest way to add the panel. It works in the block editor without a JavaScript build step. In WordPress 7.1, a meta box registered with the side context appears in the editor's settings sidebar, below the page settings, as Figure 1 shows. Meta boxes registered with other contexts appear in a separate Meta Boxes area below the content instead.

add_action( 'add_meta_boxes', function () {
    add_meta_box( 'awr-rankings', 'Rankings (AWR)', 'awr_render_panel', array( 'post', 'page' ), 'side' );
} );
function awr_change_html( $r ) {
    if ( null === $r['previous'] ) {
        return '<span class="awr-flat">&ndash;</span>';
    }
    $change = $r['previous'] - $r['current']; // Positive means the page moved up.
    if ( 0 === $change ) {
        return '<span class="awr-flat">0</span>';
    }
    return $change > 0
        ? '<span class="awr-up">&#9650; ' . (int) $change . '</span>'
        : '<span class="awr-down">&#9660; ' . (int) abs( $change ) . '</span>';
}
function awr_render_panel( $post ) {
    awr_styles();
    $rows = get_post_meta( $post->ID, '_awr_rankings', true );
    if ( empty( $rows ) ) {
        echo '<p>No tracked keywords for this page yet.</p>';
        return;
    }
    echo '<table class="awr-table"><thead><tr><th>Keyword</th><th class="num">Pos.</th><th class="num">Change</th></tr></thead><tbody>';
    foreach ( $rows as $r ) {
        printf(
            '<tr><td>%s</td><td class="num">#%d</td><td class="num">%s</td>
/tr>',
            esc_html( $r['keyword'] ),
            (int) $r['current'],
            awr_change_html( $r ) // Built from integers only.
        );
    }
    echo '</tbody></table>';
    $updated = (int) get_post_meta( $post->ID, '_awr_updated', true );
    $stale = $updated && $updated < strtotime( '-2 days' );
    printf(
        '<p class="awr-meta%s">Last updated: %s</p>',
        $stale ? ' awr-stale' : '',
        $updated ? esc_html( wp_date( get_option( 'date_format' ), $updated ) ) : 'never'
    );
}

A keyword with no previous reading shows a dash rather than 0, so editors can tell "no change" apart from "no data". The last updated date turns red if the data is more than two days old, so stale numbers are never mistaken for current ones. Meta boxes only appear on the edit screen, which already requires permission to edit that post.

For a native block editor sidebar, the same data can feed a PluginDocumentSettingPanel built in JavaScript. The meta box is a faster starting point, and editors rarely notice the difference.

Step 5: Add a dashboard widget

wp_add_dashboard_widget() doesn't check permissions, so any logged-in user who can open the dashboard, including Subscribers, would see it. Register it only for users who can edit posts:

add_action( 'wp_dashboard_setup', function () {
    if ( ! current_user_can( 'edit_posts' ) ) {
        return;
    }
    wp_add_dashboard_widget( 'awr_movers', 'Ranking movers (AWR)', 'awr_render_movers' );
} );

The rankings are stored as an array on each post, so a database query can't sort them by change. The widget loads the posts that have rankings, works out each keyword's change in PHP, and prints the five biggest gains and drops, the archive pages that rank in place of posts, and the time of the last import:

function awr_render_movers() {
    if ( ! current_user_can( 'edit_posts' ) ) {
        return;
    }
    awr_styles();
    $post_ids = get_posts( array(
        'post_type' => 'any',
        'post_status' => 'publish',
        'meta_key' => '_awr_rankings',
        'fields' => 'ids',
        'posts_per_page' => 500,
        'no_found_rows' => true,
    ) );
    // Rankings are stored as an array per post, so the sorting happens in PHP.
    $moves = array();
    foreach ( $post_ids as $post_id ) {
        foreach ( (array) get_post_meta( $post_id, '_awr_rankings', true ) as $r ) {
            if ( null === $r['previous'] || $r['previous'] === $r['current'] ) {
                continue;
            }
            $moves[] = $r + array(
                'post_id' => $post_id,
                'change' => $r['previous'] - $r['current'],
            );
        }
    }
    $gains = array_filter( $moves, function ( $m ) { return $m['change'] > 0; }
);
    $drops = array_filter( $moves, function ( $m ) { return $m['change'] < 0; }
);
    usort( $gains, function ( $a, $b ) { return $b['change'] <=> $a['change']; } );
    usort( $drops, function ( $a, $b ) { return $a['change'] <=> $b['change']; } );
    awr_movers_table( 'Biggest gains', array_slice( $gains, 0, 5 ) );
    awr_movers_table( 'Biggest drops', array_slice( $drops, 0, 5 ) );
    $unmapped = (array) get_option( 'awr_unmapped', array() );
    if ( $unmapped ) {
        echo '<p class="awr-h">Ranking pages that aren\'t posts</p><table class="awr-table"><tbody>';
        foreach ( array_slice( $unmapped, 0, 5 ) as $u ) {
            printf(
                '<tr><td>%s<br><span class="awr-flat">%s</span></td><td class="num">#%d</td></tr>',
                esc_html( $u['keyword'] ),
                esc_html( wp_make_link_relative( $u['url'] ) ),
                (int) $u['position']
            );
        }
        echo '</tbody></table>';
    }
    $last = (int) get_option( 'awr_last_import' );
    $error = get_option( 'awr_last_error' );
    printf(
        '<p class="awr-meta%s">%s</p>',
        $error ? ' awr-stale' : '',
        $error
            ? esc_html( 'Last import failed: ' . $error )
            : ( $last ? esc_html( 'Last import: ' . wp_date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $last ) ) : 'No import yet.' )
    );
}
function awr_movers_table( $title, array $rows ) {
    printf( '<p class="awr-h">%s</p>', esc_html( $title ) );
    if ( ! $rows ) {
        echo '<p class="awr-flat">None today.</p>';
        return;
    }
    echo '<table class="awr-table"><tbody>';
    foreach ( $rows as $m ) {
        printf(
            '<tr><td><a href="%s">%s</a><br><span class="awr-flat">%s</span></td><td class="num">#%d</td><td class="num">%s</td></tr>',
            esc_url( get_edit_post_link( $m['post_id'] ) ),
            esc_html( get_the_title( $m['post_id'] ) ),
            esc_html( $m['keyword'] ),
            (int) $m['current'],
            awr_change_html( $m )
        );
    }
    echo '</tbody></table>';
}

Use a stricter capability, such as manage_options, if only admins should see rankings. On sites with thousands of tracked posts, calculate the movers during the import and store the result, so the dashboard doesn't do the work on every load.

Step 6: Alert the team when an edited post drops

This is the feature that connects content changes to ranking changes. A save_post hook records when each post was last edited:

add_action( 'save_post', function ( $post_id ) {
    if ( wp_is_post_revision( $post_id ) || wp_is_post_autosave( $post_id ) ) {
        return;
    }
    update_post_meta( $post_id, '_awr_last_edit', time() );
} );

After each import, awr_store_rows() calls this check for every post. It only alerts when a keyword drops three or more places in a reading taken on or after the day of the edit, so a drop that happened before the edit is never blamed on it. Each keyword and reading date is only reported once, so a page that stays low doesn't send the same email every day. Dates are compared in the site's timezone, set under Settings, General, so make sure it matches the timezone of your AWR project:

function awr_check_drops( $post_id, array $summary ) {
    $edited = (int) get_post_meta( $post_id, '_awr_last_edit', true );
    if ( ! $edited || $edited < strtotime( '-14 days' ) ) {
        return;
    }
    // Compare in the site's timezone. Match this to your AWR project's timezone.
    $edit_day = wp_date( 'Y-m-d', $edited );
    foreach ( $summary as $r ) {
        if ( null === $r['previous'] ) {
            continue;
        }
        // Positive numbers mean the page moved down the results.
        $drop = $r['current'] - $r['previous'];
        if ( $drop < 3 ) {
            continue;
        }
       // Only alert for readings taken on or after the day of the edit.
        if ( $r['current_date'] < $edit_day ) {
            continue;
        }
        // Send each keyword and reading date once.
        $flag = '_awr_alert_' . md5( $r['keyword'] . '|' . $r['current_date'] );
        if ( get_post_meta( $post_id, $flag, true ) ) {
            continue;
        }
        update_post_meta( $post_id, $flag, 1 );
        wp_mail(
            get_option( 'admin_email' ),
            'Ranking drop after edit: ' . get_the_title( $post_id ),
            sprintf( '"%s" moved from #%d to #%d.', $r['keyword'],
$r['previous'], $r['current'] )
        );
    }
}

A three-position drop within 14 days of an edit is a sensible starting threshold. Adjust it to the site. A page that moves between positions 1 and 4 every week will need a wider margin than one that has sat at position 2 for a year.

Each alert adds one hidden meta row. On a large site, delete the _awr_alert_ rows older than 30 days, or move them to a custom table.

Performance and security checks

  • Never call the API on page load. Every screen reads from post meta, not from AWR.

  • Check capabilities. The meta box only appears on edit screens, but the dashboard widget needs its own capability check, as shown in Step 5. Check any custom screens you add the same way.

  • Escape everything you print. Keyword data comes from an external source, so treat it like user input.

  • Plan for large projects. On sites with thousands of tracked keywords, process the import in batches with Action Scheduler or a queued cron job, so one run doesn't time out.

  • Watch for failures. The import records its last success and any error. The widget shows the error, and the panel flags data older than two days.

Where this pays off

Who

What they get

Content editors

Keyword positions on the page they're editing, before and after changes

SEO leads

Early warning when an edit, plugin update or template change hurts rankings

Agencies

Client-friendly ranking data inside the CMS the client already uses

Site owners

A quick view of what's rising and falling without logging in to another tool

My take

Rank tracking works best when the people changing pages can see what their changes do. Reports sent once a month rarely reach the person who rewrote the service page last Tuesday.

Putting AWR data inside WordPress doesn't replace the reports. It puts the most useful slice of them where decisions actually get made. For most sites, the editor panel and the drop alert alone are worth the afternoon it takes to set them up.

fahad-raza

Article by

Fahad Raza

Fahad Raza is a WordPress developer and SEO consultant who has built websites since 2005 and worked in EO for more than 18 years, including eight and a half years on the IKEA Australia and New Zealand website. He runs WordPress Developer Sydney, building fast, custom WordPress sites for small businesses, and WordPressSEO.com.au, which offers sprint-based SEO for WordPress sites.

Share on social media
Share on social media