Roki
Docs

WordPress Integration

Automatically publish Roki articles to your WordPress site using the Tryroki plugin.

Tryroki WordPress Plugin

Version 1.0.0 — requires WordPress 6.4+ and PHP 8.0+

Download plugin (.zip)

Overview

The Tryroki WordPress plugin creates a secure REST API on your WordPress site that Roki uses to push articles automatically. When Roki publishes an article, it sends the title, HTML content, featured image, meta description, and SEO keyword directly to your WordPress site — no credentials required, just a shared secret key.

The plugin also downloads and localises any featured image into your WordPress media library and sets it as the post's featured image. Existing posts can be updated in place when Roki regenerates an article.

Step 1 — Install the plugin

Download the tryroki.zip file using the button above, then install it on your WordPress site:

  1. In your WordPress admin, go to Plugins → Add New Plugin.
  2. Click Upload Plugin and select the downloaded tryroki.zip file.
  3. Click Install Now, then Activate Plugin.

After activation the plugin registers the REST API endpoints Roki needs and creates a settings page under Settings → Tryroki in your WordPress admin.

Step 2 — Connect to Roki

Open the Roki dashboard and go to Integrations → WordPress. Make sure Tryroki plugin (recommended) is selected as the connection method, then:

  1. Enter your WordPress site URL (e.g. https://yourdomain.com).
  2. Click Save WordPress Settings. Roki generates a unique 48-character secret key and displays it.
  3. Copy the Plugin Secret Key shown in the Roki dashboard.
  4. In your WordPress admin, go to Settings → Tryroki and paste the key into the API Key field. Save.
  5. Back in the Roki dashboard, click Test connection to verify the plugin can be reached.

How articles flow to WordPress

When Roki publishes an article, a background job sends it to your WordPress site via the plugin REST API at /wp-json/tryroki/v1/submit. The request is authenticated using your secret key in the X-Secret-Key header.

json
X-Secret-Key: your-48-character-secret-key

What gets sent

Each submission includes the article title, full HTML content, meta description, URL slug, and primary SEO keyword. If Roki generated a featured image, the plugin downloads it from its source URL and attaches it to the post in your WordPress media library.


Post status

You can control whether articles land as Published, Draft, Pending, or Private via the Default Post Status setting in the Roki dashboard. The default is Published.


Updates

If Roki regenerates an existing article, it calls /wp-json/tryroki/v1/edit to update the post in place rather than creating a duplicate. The plugin tracks which WordPress post ID maps to each Roki article so updates land on the correct post.

Authentication & security

All requests from Roki to your WordPress site are authenticated using the shared secret key. The plugin compares incoming keys using a constant-time comparison to prevent timing attacks. No WordPress credentials (username or password) are ever transmitted.

Ensure your WordPress site is accessible over HTTPS so the secret key cannot be intercepted in transit. If you suspect the key has been compromised, delete the integration in the Roki dashboard, re-save to generate a new key, and update the plugin settings.

Troubleshooting

SymptomCheck
Test connection failsVerify the site URL is correct and the Tryroki plugin is activated on WordPress.
Invalid secret key errorConfirm the key copied from the Roki dashboard matches exactly what is pasted into Settings → Tryroki on WordPress.
Articles not appearingCheck that WordPress sync is enabled in the Roki dashboard and that the default post status is not set to Draft if you expect to see published posts.
Featured image missingThe plugin downloads images from external URLs — ensure your WordPress host can make outbound HTTP requests.