{"id":13759615,"url":"https://github.com/humanmade/hm-content-import","last_synced_at":"2025-06-30T23:09:35.688Z","repository":{"id":32713604,"uuid":"36303236","full_name":"humanmade/hm-content-import","owner":"humanmade","description":"Migration framework for WordPress, attempts to reduce overhead in migrating content from differing data sources","archived":false,"fork":false,"pushed_at":"2025-04-17T20:56:35.000Z","size":191,"stargazers_count":29,"open_issues_count":41,"forks_count":8,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-06-14T08:11:59.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humanmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-26T14:56:37.000Z","updated_at":"2025-05-09T06:05:59.000Z","dependencies_parsed_at":"2024-06-21T20:23:53.589Z","dependency_job_id":"d7e8bfec-19fc-40fe-9487-828d615d57d5","html_url":"https://github.com/humanmade/hm-content-import","commit_stats":{"total_commits":94,"total_committers":5,"mean_commits":18.8,"dds":"0.32978723404255317","last_synced_commit":"b6172996d0816cf568faf11ceaecd77613a8bb4b"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/humanmade/hm-content-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-content-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-content-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-content-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-content-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humanmade","download_url":"https://codeload.github.com/humanmade/hm-content-import/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-content-import/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260625472,"owners_count":23038188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T13:00:56.325Z","updated_at":"2025-06-30T23:09:35.654Z","avatar_url":"https://github.com/humanmade.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# HM Content Import\n\nMigration framework for WordPress, attempts to reduce overhead in migrating content from differing data sources\n\n## Introduction\n\nHMCI is an extensible, performant, scriptable, pausable, resumable, and horizontally scalable WP-CLI framework for importing large amounts of content into WordPress. It is a base framework for performing custom migrations of large amounts of content from any source and therefore requires the development of an import handler for each type of content being imported.\n\nIt typically supports both new imports and delta imports, although this is dependent on the individual import handlers written for each migration.\n\nHMCI can be run in multiple threads in parallel, making it horizontally scalable in order to reduce the time required to process large imports. It has been used as the basis of large data migrations for Human Made clients such as The Sun, L'Express, Capgemini, and others.\n\n## Ingestion\n\nHMCI supports ingestion of data via iterators that support:\n\n* Single files\n  - CSV\n  - JSON\n* Directories of files\n  - JSON\n  - XML\n* A direct MySQL database connection\n* WordPress Posts (for internal migration)\n\n## Insertion\n\nHMCI supports inserting imported data into:\n\n* WordPress\n  - Attachments\n  - Comments\n  - Guest Authors (used by Co-Authors Plus and PublishPress)\n  - Posts\n  - Taxonomy Terms\n  - Users\n* Files\n  - CSV\n\n## Importing\n\nSee the [Running Imports](./docs/running-imports.md) for more information on how to import data.\n\n## Writing Importers\n\nSee the [Writing Importers](./docs/writing-importers.md) for more information on how to write importers.\n\n## Migrating From Version 1\n\nIn Version 2 we changed the way canonical IDs are stored. This means that you will need to migrate your existing data to the new format, if you are planning to resume / to delta imports with data that was imported under Version 1.\n\nRun the following SQL query to migrate your existing data:\n\n```sql\nUPDATE wp_postmeta SET meta_key = CONCAT('hmci_canonical_id_', meta_value) WHERE meta_key = 'hmci_canonical_id';\nUPDATE wp_usermeta SET meta_key = CONCAT('hmci_canonical_id_', meta_value) WHERE meta_key = 'hmci_canonical_id';\nUPDATE wp_commentmeta SET meta_key = CONCAT('hmci_canonical_id_', meta_value) WHERE meta_key = 'hmci_canonical_id';\nUPDATE wp_termmeta SET meta_key = CONCAT('hmci_canonical_id_', meta_value) WHERE meta_key = 'hmci_canonical_id';\n```\n\nShould you need to revert this migration, you can run the following SQL query:\n\n```sql\nUPDATE wp_postmeta SET meta_key = 'hmci_canonical_id' WHERE meta_key LIKE 'hmci_canonical_id_%';\nUPDATE wp_usermeta SET meta_key = 'hmci_canonical_id' WHERE meta_key LIKE 'hmci_canonical_id_%';\nUPDATE wp_commentmeta SET meta_key = 'hmci_canonical_id' WHERE meta_key LIKE 'hmci_canonical_id_%';\nUPDATE wp_termmeta SET meta_key = 'hmci_canonical_id' WHERE meta_key LIKE 'hmci_canonical_id_%';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Fhm-content-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanmade%2Fhm-content-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Fhm-content-import/lists"}