| 开发者 | abb65 |
|---|---|
| 更新时间 | 2026年10月30日 17:41 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
media/ and the content is relinked to them, so the delivered repository does not depend on this site for images. A file over 8 MB, or one missing from the uploads directory, keeps its WordPress URL and is named in the coverage report. Dynamic WordPress and plugin output is not rendered during a source scan. These limits are written into the coverage report rather than implied to be complete.
Want a working Astro website instead of files? Contentrain Migrate, a separate paid service, connects to this plugin with a key you create and builds a complete Astro site from your content: https://migrate.contentrain.io/?utm_source=wordpress-org&utm_medium=readme
External services
The plugin contacts no host other than this site unless you choose GitHub delivery. Two options read this site's own pages over HTTP, the way a visitor would, and send nothing elsewhere: "Also read the text your pages render" (the home page, a post, a page, search and not-found) and, with it, the connected-services check (the home page's script hosts).
GitHub — used only when you enter a repository and a token in step 3 and start the delivery. The plugin then calls the GitHub REST API at api.github.com to read the target repository's default branch (or the base branch you name) and file list, upload the exported files, and create one new branch holding them. What is sent: the exported content files you reviewed, a commit message, and the token you supplied. Nothing is sent to Contentrain or to any other host, and no analytics or telemetry is collected. The token is used for those requests only and is never stored in the database or in the export. Delivery never writes to your default branch and never overwrites a file you edited in Git. GitHub's terms: https://docs.github.com/site-policy/github-terms/github-terms-of-service — privacy policy: https://docs.github.com/site-policy/privacy-policies/github-privacy-statement
REST export API (inbound) — the plugin adds routes under /wp-json/contentrain-bridge/v1/ that let a program you authorize start an export and read its files. The plugin sends nothing by itself: the program asks, with an application password of an administrator who has the export and manage_options capabilities, or with a Contentrain Migrate connection key (below). Contentrain Migrate uses these routes when you give it such a password or key to migrate this site; what Migrate then does with the content is governed by Contentrain's terms (https://contentrain.io/terms-of-service) and privacy policy (https://contentrain.io/privacy-policy). The program that starts an export chooses its scope: Migrate asks for private content (drafts, pending, scheduled, private and password-protected posts, never the password) and for comments, and the exported files carry each post's own status. These routes only read: no remote call creates, edits or deletes posts, settings, files, users, plugins or themes; the plugin writes only its own temporary export files outside the web root and its own bookkeeping options. Revoke the application password in your profile (or the connection key on the Bridge screen) to end that access; exports expire after a day.
robots.txt (only when you turn it on) — Tools > Contentrain Bridge has a switch, off by default, "Let Contentrain Migrate read my pages and media". It changes only the robots.txt WordPress itself serves, through WordPress's robots_txt filter, and contacts no host. When you turn it on, robots.txt gains one group for the ContentrainMigrate crawler: the rules your robots.txt gives every crawler (User-agent: *), without the lines that close the whole site (a Disallow matching /), followed by Allow lines for the REST API (/wp-json/), your uploaded media (/wp-content/uploads/) and /. By robots.txt's longest-match rule those Allow lines open only those paths: a rule such as Disallow: /wp- still keeps wp-admin closed. Paths you keep closed, such as wp-admin, stay closed to it, and every other crawler sees robots.txt exactly as before. Turning it off removes the group, and uninstalling the plugin removes the setting. If your site serves a robots.txt file from disk, WordPress cannot change it: the switch stays off and the screen shows the lines to add yourself.
contentrain-bridge.zip from the latest GitHub release (https://github.com/Contentrain/wordpress-bridge/releases/latest), the same archive, and install it with Plugins > Add New > Upload Plugin.No. Modelling, validation, the ZIP download and GitHub delivery are all local and free. Migrate is an optional later step if you want an Astro website.
No. It collects no analytics and contacts no Contentrain server. The only request to another host is to the GitHub API, when you start a GitHub delivery yourself.
Yes, when you include the Media type. Each upload and its generated sizes are copied into media/ in the export, and content that pointed at a WordPress upload URL is rewritten to that path, so images keep working after this site is gone. Media records also keep the original URL. Files larger than 8 MB, files missing from disk, and anything past the export's total media budget keep their WordPress URL instead of being half-copied; the coverage report lists them. The 8 MB ceiling exists because GitHub delivery has to hold a file in memory to upload it.
A way for Contentrain Migrate to read this site's content when your host blocks application passwords (some hosts strip the Authorization header they travel in). Create it under Tools > Contentrain Bridge and paste it into Migrate. What it allows: Migrate can ask this site to prepare a content export and download it — published posts, pages and custom post types with their fields and metadata (secret-looking keys are always left out); if Migrate asks for it, draft, pending, scheduled, private and password-protected content too (never the password itself); media records (the files only if requested); categories, tags and menus; comments without email addresses or IP addresses; SEO, redirect and permalink settings; theme design settings; the names and versions of active plugins and the theme; and the number of published entries per content type. What it cannot do: it runs with no WordPress user and cannot change anything on this site — no post, setting, file, user, plugin or theme is written. It does not open the WordPress REST API, wp-admin or application passwords; it works only on the plugin's own export routes. The key is valid only while the administrator who created it still has the export and manage_options capabilities. Revoking: revoke it on the same screen at any time; creating a new key retires the old one, and revoking removes the exports it prepared. It is shown once and only a fingerprint of it is stored. Paste it into Migrate within an hour; once Migrate has used it, it works for that one move until 14 days after it was created, until Migrate closes it when the move is done, or until you revoke it or create a new one. It can only be created and used over HTTPS. Nothing is sent from your site to Contentrain when you create it.
Contentrain Migrate respects robots.txt. If yours closes the site to crawlers (for example with "Discourage search engines from indexing this site"), Migrate cannot read your pages and media to move them. The switch opens the site to the ContentrainMigrate crawler only, keeps what you close for every crawler closed to it as well (it drops only the lines that close the whole site, and opens the REST API and your uploaded media), and changes nothing for other crawlers. It is off until you turn it on, and you can turn it off at any time. If Cloudflare (or another CDN) serves your robots.txt, for example Cloudflare's managed robots.txt, WordPress's robots.txt never reaches visitors and the switch cannot change it: add the lines the screen shows in that service's settings instead.
Only when explicitly selected: author name, URL, content, status, dates and relationships. Comments of every status are included (approved, pending, spam and trash), each with its status, so you can leave out the ones you do not want to keep. Email addresses, IP addresses, user-agent values and comment metadata are excluded.
The active theme and child theme, and optionally the source files of active plugins. It reads PHP, HTML and JavaScript text to find interface strings, never executes them, skips vendor and dependency directories, and stops at 10,000 files. Every string it finds is a candidate you review before it becomes content.
utm_source=bridge so visits from the plugin can be counted. The link sends no site data.admin directory, and minified scripts. JavaScript literals that are one lowercase word or a BEM class name ("fade", "collapsing", "pswp__img") are code. Each is still listed in bridge/hardcoded-text.json with its reason; the same words in a template a visitor sees stay a candidate.label, url), not ACF's internal keys (field_5f3a…), so they match what the REST API gives and the migrated fields are readable in Studio. Fields on posts and options pages are both affected. A key no field owns is kept as it is and reported.[protected]; the password itself never leaves WordPress. The plugin's behaviour is unchanged: the scope is chosen by whoever starts the export, and exports you start yourself are unaffected..htaccess and Simple 301 Redirects are exported, 410 and 451 "gone" rules are kept, and Redirection's query, case and trailing-slash options are respected. A rule that depends on a cookie, header, IP or role is reported without its condition data.?p= link typed with or without www. is recognised as the same site.[protected] instead of an empty password, so a reader keeps it off the public site; the password itself still never leaves WordPress.GET /about says which sign-in a reader can use; POST /exports/{id}/read reads a snapshot for a caller whose key travels in the request body; DELETE /key lets Migrate close its own key.POST /exports, reused per scope, max_age/fresh), list, and advance an export with an application password; read any snapshot file in 8 MiB chunks. Administrator permissions only.bridge/rawir.json. GitHub delivery never includes it.media_files: false (REST, and a checkbox on the export screen): attachment records without their files; content keeps the WordPress upload URLs.media/ and content is relinked to them.