Table of contents
Installation
Requirements
- WordPress 6.7 or later.
- PHP 8.4 or later (8.5 recommended).
- A permalink structure other than Plain (Settings → Permalinks).
- An Anthropic API key, from the Claude Console.
What it works with
Made for the block editor. Works with content written in the block editor or in the classic editor, with block themes and classic themes. Page builders that keep their content outside the post content (Elementor, Beaver Builder) are not supported; with shortcode builders (Divi, WPBakery), the texts between shortcodes are translated, the texts in their settings are not. Classic widgets and texts of the Customizer are not translated.
Install
- Download
lrob-ai-translator-<version>.zipfrom the releases of the repository. - In WordPress: Plugins → Add New → Upload Plugin, choose the zip, Install Now, then Activate.
- Open AI Translator: its dashboard offers the setup assistant (see Getting started).
The plugin creates its own tables when it is activated, and updates them by itself after an update.
Updates
New versions appear in Dashboard → Updates like any other plugin, from the releases of the repository. If the repository is private, give the site a read token in wp-config.php:
define( 'LROB_AI_TRANSLATOR_UPDATE_TOKEN', 'your-read-only-token' );
The API key
Each site uses its own Anthropic API key. The safest place for it is wp-config.php, above the line /* That's all, stop editing! */:
define( 'LROB_AI_TRANSLATOR_API_KEY', 'sk-ant-...' );
The settings then say Set in wp-config.php (LROB_AI_TRANSLATOR_API_KEY): it cannot be changed here, and the Test the key button still checks it.
You can instead type the key in AI Translator → Settings → Connection: Test the key checks it before anything is saved, then Save this key keeps it, encrypted with your site's secret keys. Either way, the key is never shown again, never sent to the browser and never written to the log.
We recommend a workspace for the site in the Claude Console, with a monthly spend limit: a second safety net behind the plugin's own caps (see Modes and costs).
A real cron
Translations run in the background, on WP-Cron, every minute while something waits. WP-Cron only runs when someone visits the site: on a site with little traffic, or to keep visitors' requests completely free of it, have the server run it every minute instead.
In wp-config.php:
define( 'DISABLE_WP_CRON', true );
In the server's crontab (adapt the path):
* * * * * php /var/www/example.com/wp-cron.php >/dev/null 2>&1
or, with WP-CLI:
* * * * * cd /var/www/example.com && wp cron event run --due-now >/dev/null 2>&1
Translations you launch by hand from the Translations screen start at once from the screen, whatever the cron; the cron carries on if you close the page.
Uninstall
Deactivating the plugin stops serving the translations; the translated addresses then answer as WordPress does without the plugin. Deleting it from Plugins removes everything it stored: the translations, the translated addresses, the log, the settings and the key. TranslatePress's data, if any, is never touched.