{"id":42180193,"url":"https://github.com/cinar/wordpress-to-vuepress-migration","last_synced_at":"2026-01-26T22:03:23.103Z","repository":{"id":147653829,"uuid":"606828976","full_name":"cinar/wordpress-to-vuepress-migration","owner":"cinar","description":"WordPress to VuePress 2 migration script.","archived":false,"fork":false,"pushed_at":"2024-07-12T20:24:29.000Z","size":218,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T21:39:42.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/cinar.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}},"created_at":"2023-02-26T17:31:59.000Z","updated_at":"2023-02-28T01:22:18.000Z","dependencies_parsed_at":"2024-04-12T18:50:17.097Z","dependency_job_id":null,"html_url":"https://github.com/cinar/wordpress-to-vuepress-migration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cinar/wordpress-to-vuepress-migration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fwordpress-to-vuepress-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fwordpress-to-vuepress-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fwordpress-to-vuepress-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fwordpress-to-vuepress-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cinar","download_url":"https://codeload.github.com/cinar/wordpress-to-vuepress-migration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Fwordpress-to-vuepress-migration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28789721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-26T22:02:19.918Z","updated_at":"2026-01-26T22:03:23.083Z","avatar_url":"https://github.com/cinar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n# WordPress to VuePress 2 Migration Script\n\nThis is a script that I put together in order to migrate a blog from WordPress 4.4.2 to [VuePress 2](https://v2.vuepress.vuejs.org/). I would expect it to work with the other versions of WordPress as well, but please add a comment below and let me know.\n\n_This is not a general purpose migration tool from WordPress to VuePress. It only covers what I needed for my own individual use case. There may be better alternatives out there._\n\n## Installation\n\nYou can install it by doing the following:\n\n```bash\n$ git clone https://github.com/cinar/wordpress-to-vuepress-migration.git\n$ cd wordpress-to-vuepress-migration\n$ npm install\n```\n\n## Usage\n\nYou can start it by doign the following:\n\n```bash\n$ npm run migration\n```\n\nThe tool will ask you about your WordPress and VuePress installations. Please make sure to have your WordPress database information available. You can find it under the `wp-config.php` file.\n\n### WordPress Parameters\n\n| Question          | Default | Description                        |\n| ----------------- | ------- | ---------------------------------- |\n| Database host     |         | WordPress MySQL database host.     |\n| Database name     |         | WordPress MySQL database name.     |\n| Database user     |         | WordPress MySQL database user.     |\n| Database password |         | WordPress MySQL database password. |\n| Base directory    |         | WordPress directory.               |\n\n### VuePress Parameters\n\n| Question         | Default | Description              |\n| ---------------- | ------- | ------------------------ |\n| Base directory   |         | VuePress directory.      |\n| Posts directory  | posts   | Where to put the posts.  |\n| Assets directory | assets  | Where to put the images. |\n\nOnce the information is provided, the migration will run:\n\n```bash\n$ npm run migration\n\n\u003e wordpress-to-vuepress-migration@1.0.0 migration\n\u003e ts-node src/index.ts\n\n▸ Please answer a few questions about your WordPress installation.\n✔ Database host · 172.17.0.3\n✔ Database name · wp\n✔ User · wp\n✔ Password · ****\n✔ Base directory · /tmp/wp\n▸ Connecting to WordPress database.\n▸ Please answer a few questions about your VuePress installation.\n✔ Base directory · /tmp/blog/docs\n✔ Posts directory · posts\n✔ Assets directory (under .vuepress/public) · assets\n▸ Post: /tmp/blog/docs/posts/2008/12/25/sonuclar/index.md\n▸ Post: /tmp/blog/docs/posts/2008/12/26/pratik-mant/index.md\n－ Copying manti-1.jpg.\n－ Copying manti-2.jpg.\n▸ Post: /tmp/blog/docs/posts/2008/12/29/pratik-kasarl-kofte/index.md\n－ Copying kofte1.jpg.\n－ Copying kofte2.jpg.\n```\n\n## Pulling the posts from WordPress\n\nEverything pretty much comes down to this SQL query. The script uses that to extract all needed pieces, then translates the content to Markdown, as well as copying the image files to Vuepress public folder.\n\n```sql\nSELECT\n  u.display_name AS author,\n  p.post_date AS posted,\n  p.post_content AS content,\n  p.post_title AS title,\n  p.post_excerpt AS excerpt,\n  GROUP_CONCAT(ttc.name) AS cateogies,\n  GROUP_CONCAT(ttt.name) AS tags\nFROM wp_posts p\nINNER JOIN wp_users u ON (u.id = p.post_author)\nLEFT JOIN wp_term_relationships tr ON (tr.object_id = p.post_parent)\nLEFT JOIN wp_term_taxonomy tt ON (tt.term_taxonomy_id = tr.term_taxonomy_id)\nLEFT JOIN wp_terms ttc ON (ttc.term_id = tt.term_id AND tt.taxonomy = \"category\")\nLEFT JOIN wp_terms ttt ON (ttt.term_id = tt.term_id AND tt.taxonomy = \"post_tag\")\nWHERE p.id IN (\n  SELECT MAX(id) AS id\n  FROM wp_posts\n  WHERE post_parent IN (\n    SELECT id\n    FROM wp_posts\n    WHERE post_parent = 0\n      AND post_status = \"publish\"\n  )\n  GROUP BY post_parent\n)\nAND p.post_type IN (\"post\", \"revision\")\nGROUP BY\n  u.display_name,\n  p.post_date,\n  p.post_content,\n  p.post_title,\n  p.post_excerpt;\n```\n\n## License\n\nCopyright (c) 2023 Onur Cinar. All Rights Reserved.\n\nThe source code is provided under MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinar%2Fwordpress-to-vuepress-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcinar%2Fwordpress-to-vuepress-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinar%2Fwordpress-to-vuepress-migration/lists"}