{"id":15143653,"url":"https://github.com/contentful/wordpress-exporter.rb","last_synced_at":"2025-09-29T12:30:43.844Z","repository":{"id":24366271,"uuid":"27765296","full_name":"contentful/wordpress-exporter.rb","owner":"contentful","description":"Adapter to extract data from Wordpress","archived":true,"fork":false,"pushed_at":"2018-01-30T18:38:37.000Z","size":53,"stargazers_count":24,"open_issues_count":2,"forks_count":15,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-09-22T15:32:29.357Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.contentful.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/contentful.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-09T12:21:43.000Z","updated_at":"2024-06-18T12:25:56.000Z","dependencies_parsed_at":"2022-08-22T17:30:09.908Z","dependency_job_id":null,"html_url":"https://github.com/contentful/wordpress-exporter.rb","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fwordpress-exporter.rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fwordpress-exporter.rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fwordpress-exporter.rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fwordpress-exporter.rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contentful","download_url":"https://codeload.github.com/contentful/wordpress-exporter.rb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219874544,"owners_count":16554590,"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-09-26T10:02:35.738Z","updated_at":"2025-09-29T12:30:38.536Z","avatar_url":"https://github.com/contentful.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Wordpress to Contentful Exporter\n=================\n\n\u003e **Note**: This tool is no longer officially supported as of May 11th, 2017.\n\u003e You can feel free to use it, fork it and patch it for your own needs.\n\u003e Downloads from RubyGems will still be available.\n\n## Description\nThis adapter will allow you to extract content from a WordPress Blog and prepare it to be imported to [Contentful](https://wwww.contentful.com).\n\nThe following content will be extracted:\n\n* Blog with posts\n* Categories, tags and terms from custom taxonomies\n* Attachments\n\n\n## Installation\n\n```bash\ngem install wordpress-exporter\n```\n\nThis will install the `wordpress-exporter` executable on your system.\n\n\n## Setup\nTo extract the blog content you need to [export](http://en.support.wordpress.com/export/) it from the WordPress blog and save it as a XML file.\n\nFurther you need to define where the tool can find the XML file and the destination of the transformed content.\nCreate a `settings.yml` file and fill in the `data_dir` and `wordpress_xml_path`:\n\n``` yaml\ndata_dir: PATH_TO_ALL_DATA\nwordpress_xml_path: PATH_TO_XML/file.xml\n```\n\nTo extract the content run:\n\n```bash\nwordpress-exporter --config-file settings.yml --extract-to-json\n```\n\nThe result will be a directory structure with the WordPress content transformed into JSON files that are ready for import.\n\nUse the [generic-importer](https://github.com/contentful/generic-importer.rb) to import your blog then to Contentful.\n\n## Step by step\n\n1. [Export](http://en.support.wordpress.com/export/) the content of the blog from WordPress and save it as XML file.\n2. Create YAML file with settings (eg. settings.yml) and fill in the required parameters.\n   The generated `content types`, `entries` and `assets` will be saved to the `data_dir`.\n   We recommend you to use `wordpress_settings/wordpress_settings.yml` file in this repository\n\n3. Extract the content from the XML file and generate the content model and JSON files for the import:\n\n    ```bash\n    wordpress-exporter --config-file settings.yml --extract-to-json\n    ```\n    If you want to create a different content model for your blog you can use `--omit-content-model`\n\n    ```bash\n    wordpress-exporter --config-file settings.yml --extract-to-json --omit-content-model\n    ```\n\n    It will only extract the content and store it as JSON, you need to take care about the content mapping yourself.\n    See the [Contentful-importer](https://github.com/contentful/generic-importer.rb) for details on how this needs to be done.\n\n4. (Optional). HTML markup can be converted to markdown:\n\n    ```bash\n    wordpress-exporter --config-file settings.yml --convert-markup\n    ```\n    This will only touch the content body of a blog post, other attributes will not be changed.\n\n5. Create your content model from JSON:\n\n    ```bash\n    wordpress-exporter --config-file settings.yml  --create-contentful-model-from-json\n\n    ```\n\n6. Use the [contentful-importer](https://github.com/contentful/contentful-importer.rb) to import the content to [contentful.com](https://www.contentful.com)\n\n7. Add you organization id and the access token to your `settings.yml`\n\n8. Add the new created space id to your `settings.yml` file.\n\n9. Now follow the steps (starting from step 3) of our [contentful-importer guide](https://github.com/contentful/contentful-importer.rb#step-by-step) to publish your content.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentful%2Fwordpress-exporter.rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontentful%2Fwordpress-exporter.rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentful%2Fwordpress-exporter.rb/lists"}