This document walks through installing GitPress Editor on a WordPress site.
- WordPress 5.6 or later
- PHP 7.4 or later with the
DOMextension enabled (bundled with virtually all PHP builds) https://recommended (required forvisualViewportmobile keyboard handling)- A WordPress user account with the Administrator or Editor role
- Pages must contain
data-editattributes on the elements you want to edit. Sites built with thewebsite-builderskill from the GitPress repository already have these attributes automatically. Existing third-party WordPress sites are NOT supported out of the box — they would need to be re-built or manually annotated withdata-editattributes. The plugin ships with a baseline manifest for the referencepixelcraftsite, and sites with a different structure can drop their own manifests intowp-content/uploads/gitpress-manifests/to get curated editing rules (see "Site-specific manifests" below).
Go to the GitHub Releases page and download the latest gitpress-editor-<version>.zip file.
- Log in to your WordPress admin dashboard.
- Navigate to Plugins → Add New.
- Click Upload Plugin at the top of the page.
- Click Choose File and select the downloaded zip.
- Click Install Now.
- After installation completes, click Activate Plugin.
Go to Settings → GitPress Editor.
The plugin ships with a low-quota trial key for evaluation. For production use, we strongly recommend entering your own key:
- Visit Google AI Studio and sign in with a Google account.
- Click Create API Key and copy the generated key.
- In WordPress, paste the key into the Your Gemini API Key field.
- Click Save Changes.
The key is stored encrypted with AES-256-GCM using a per-site secret derived from WordPress salts. It is never sent to the browser.
By default, Administrator and Editor roles see the floating editor button. You can enable Author and Contributor as well from the checkboxes in the settings page.
Note: Users still need the
edit_pagesoredit_postscapability (which is implicit in Editor and above).
You can toggle the launcher button on/off site-wide. Turning it off effectively disables the frontend editor without deactivating the plugin.
Choose between:
- gemini-2.0-flash — fastest, lowest cost, default
- gemini-2.5-flash — better quality, slightly slower
- gemini-2.5-pro — highest quality, significantly slower and more expensive
- Log out of WordPress admin and log back in.
- Visit any page on the frontend of your site (not wp-admin).
- You should see a yellow pencil button in the bottom-right corner.
- Tap it — the editor panel should slide in.
If you don't see the button:
- Confirm you are logged in as Administrator or Editor
- Check Settings → GitPress Editor → Floating Button is enabled
- Check browser console for any JavaScript errors
- Open a post or page where you have some text content (e.g. "About Us").
- Tap the editor button to open the panel.
- Tap a paragraph on the page — it should gain a teal outline and appear in the selection queue.
- Type a change instruction like "Make this friendlier" into the text area.
- Tap Send to AI (yellow button).
- After a few seconds, an edit card appears showing before → after.
- Tap Preview to see the change on the page.
- Tap Apply to WordPress (orange button) and confirm.
- Reload the page — your change should be live.
Plugins → Installed Plugins → GitPress Editor → Deactivate → Delete
Deleting the plugin removes the stored options, including the encrypted API key.
Your user role is not in the enabled roles list, or you lack the edit_pages capability. Ask an administrator to enable your role in Settings → GitPress Editor.
Your WordPress nonce has expired (typically after 24 hours). Reload the page and try again.
You've hit the per-user rate limit (30 AI calls or 20 apply calls per minute). Wait a minute and retry.
Your API key is invalid, expired, or from a disabled Google Cloud project. Re-generate one at AI Studio and paste it into the settings.
The AI returned content that doesn't match the original text on the page, usually because:
- The original text has since been edited elsewhere
- The AI truncated or paraphrased the
current_contentfield
Try sending fewer elements per request, or re-select and retry.
Make sure your site uses HTTPS. Some browser security policies require it for visualViewport and safe-area-inset features.
Your site is likely using a caching plugin. Clear the cache, or try again after the TTL expires.
The plugin resolves editing rules (allowed CSS properties, allowed classes, element type)
by looking up each data-edit path in a manifest. Two manifest layers are merged at
runtime, with later layers overriding earlier ones on key collision:
- Bundled baseline —
manifests/*.jsoninside the plugin zip, built fromconfig/editables/*.yaml. Tuned for the referencepixelcraftsite. - Site-specific overrides — JSON files you drop into
wp-content/uploads/gitpress-manifests/on your WordPress host.
If your site was generated by the website-builder skill (or any tool that produces
data-edit-annotated HTML with a matching set of YAML manifests), you can register
those manifests with a two-step process:
From the repo root:
python scripts/generate_manifest.py --html-dir path/to/your-siteThis scans every HTML file for data-edit attributes and writes one YAML file per
page into path/to/your-site/editables/. The YAML format matches config/editables/*.yaml.
Verify integrity:
python scripts/validate_editables.py --html-dir path/to/your-site --yaml-dir path/to/your-site/editablesConvert each YAML to JSON (use any YAML→JSON tool, e.g. python -c "import yaml,json,sys; print(json.dumps(yaml.safe_load(open(sys.argv[1])), ensure_ascii=False, indent=2))" page.yaml > page.json)
and upload the resulting *.json files to:
wp-content/uploads/gitpress-manifests/
The plugin picks them up automatically on the next page load (or within 15 minutes if a previous manifest was cached). To force a refresh, save the GitPress Editor settings page once — this flushes the manifest cache.
To relocate the directory, add a PHP filter in your theme's functions.php:
add_filter( 'gitpress_editor_site_manifests_dir', function () {
return ABSPATH . 'wp-content/my-custom-manifests';
} );Return an empty string to disable site-specific loading entirely.
See USAGE.md for the full user guide including mobile gestures and AI prompting tips.