Download the PHP package automattic/wpcom-migration without Composer

On this page you can find all versions of the php package automattic/wpcom-migration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wpcom-migration

Migrate to WordPress.com

Source for the Migrate to WordPress.com plugin. This repository is the source of record; the tree that ships is built from it.

Layout

Build

Needs PHP 8.2+, Composer, rsync, zip.

The build runs composer install in plugin/, copies the tree to a staging directory, checks the autoload manifest there, then writes build/. The plugin needs PHP 7.4 or newer (Requires PHP: 7.4), the floor of the Jetpack packages it uses.

To activate a source checkout directly (without a build), run composer install --no-dev --working-dir=plugin first; without plugin/vendor/ the plugin activates but the exporter and the WordPress.com connection are absent.

The Reprint migration screen

wp-admin/admin.php?page=wpcom-migration-status (the plugin's one menu entry; manage_options to view; the administrator role to connect, disconnect, or provision through the routes; single-site only). It carries the old main screen's design: the WordPress mark, a serif heading and one centred column. The screen shows one mode at a time — one sentence saying where the site stands, at most one button, and the links that fit:

Mode When Shows
The exporter runs on single sites only Multisite Nothing
The export secret no longer matches this site The site's salts changed Log in with WordPress.com, or Continue on WordPress.com when connected
The exporter is on until time A migration is running Continue on WordPress.com and Disconnect, when connected
Connected as email Logged in; the migration has not started Continue on WordPress.com, a Disconnect link
This site is set up and ready Provisioned with an application password A Log in with WordPress.com link
Log in with your WordPress.com account Fresh site Log in with WordPress.com

Settings_Page::mode() picks the first that fits, top to bottom. The Continue link's target is filtered by wpcom_migration_continue_url.

The old BlogVault screen at wp-admin/admin.php?page=wpcom-migration is no longer in the sidebar. It stays reachable at its URL.

Until the WordPress.com side of Reprint ships, WordPress.com decides which of the two screens is main: Main_Screen asks GET https://public-api.wordpress.com/wpcom/v2/migration-plugin-config for { "main_screen": "reprint" | "blogvault", "ttl": <seconds> } on the first wp-admin page load after its stored answer (wpcom_migration_main_screen) expires. With blogvault, the old screen gets the sidebar row, the Settings link and the activation redirect, and the Reprint screen is reachable only at its URL. A failed fetch keeps the stored answer, or uses blogvault when there is none, and retries after five minutes. Networks never ask.

On a network the old screen keeps its row in the network admin, and the Settings link and the activation redirect lead there; subsites get no row. A brand whitelabelled with hide or hide_from_menu takes away the Reprint screen's row too; the screen stays reachable at its URL.

Setting up Reprint manually

wp-admin/admin.php?page=wpcom-migration-manual (administrator role, single-site only). Nothing links to it; support gives out the URL. It holds the export secret form, a Remove secret button (which also turns the exporter off), the exporter toggle, the export URL and the WordPress.com blog ID. Deactivating the plugin disconnects and discards the secret and the exporter state.

How WordPress.com provisions the exporter

Two lanes end at the same two routes, POST /wp-json/wpcom-migration/v1/reprint/rotate-export-secret → { "secret", "export_url" } and POST …/enable-export → { "enabled_at", "export_url" }. Both require an administrator, authenticated either by core (an application password) or by a Jetpack user token; enable-export answers 409 until a valid secret is stored, and both answer 501 on a network. Reprint transfers over https only.

Application password — where GET /wp-json/ lists authentication.application-passwords (core: is_ssl() true and no plugin has switched them off). WordPress.com sends the administrator once to wp-admin/authorize-application.php?app_name=Migrate+to+WordPress.com&app_id=<uuid>&success_url=…&reject_url=…; core redirects to success_url with site_url, user_login and password. WordPress.com then checks the password with GET /wp-json/wp/v2/users/me (a 401 here means the server strips the Authorization header — Apache CGI without the rewrite rule WordPress 5.6 added; saving Permalinks regenerates it), installs and activates the plugin (POST /wp-json/wp/v2/plugins {"slug":"wpcom-migration","status":"active"}; an older copy is replaced by PUT …/plugins/wpcom-migration/wpcom_migration {"status":"inactive"}, DELETE, then the POST, since core has no update route), calls the two routes, exports, and revokes the password (GET …/users/me/application-passwords/introspect, then DELETE …/application-passwords/<uuid>). No login on the site.

Jetpack connection — everywhere else, including sites where Wordfence or another security plugin has disabled application passwords. The administrator installs the plugin from the plugin directory and presses Log in with WordPress.com on the screen; the connection package registers the site and sends them to WordPress.com to authorize, then back. A site that already runs Jetpack is connected at once for the account that connected Jetpack — the connection is shared. WordPress.com then calls the routes signed with the user token.

Connection events fire wpcom_migration_connection_event, exporter events wpcom_migration_reprint_export_event; none carries a token, secret or signature.

Checks

lint:php:compat checks the repository's own PHP against the 7.4 floor, including functions php -l cannot see; vendor/ is each package's own job. PHPCompatibility 10 is pinned at a pre-release; move the constraint to ^10.0 when it ships.

.github/workflows/build.yml runs on every push and pull request: build and upload the ZIP; php -l the built tree on PHP 7.4 and 8.4; PHPCS and the compatibility lint; the Playground e2e scenarios against the ZIP.

Publishing to wp.org is not automated.

Known limitations

Security

Need to report a security vulnerability? Go to https://automattic.com/security/ or directly to our security bug bounty site https://hackerone.com/automattic.


All versions of wpcom-migration with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package automattic/wpcom-migration contains the following files

Loading the files please wait ...