npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

w-to-s-migrator-plugin

v0.0.4

Published

This Strapi plugin allows you to seamlessly migrate your WordPress content to Strapi, including media files, posts/news, categories, authors, users, comments, and tags. The plugin uses WordPress's REST API to fetch the data, ensuring efficient and reliabl

Downloads

271

Readme

Strapi plugin WordPress-to-Strapi-migrator

Description

This Strapi plugin allows you to seamlessly migrate your WordPress content to Strapi, including media files, posts/news, categories, authors, users, comments, and tags. The plugin uses WordPress's REST API to fetch the data, ensuring efficient and reliable migration.

Key Features

  • Media File Migration: Migrate all your WordPress media files, including images, videos, and documents, to Strapi.
  • Post/News Migration: Migrate all your WordPress posts and news articles, including their content, categories, and tags, to Strapi.
  • Category Migration: Migrate all your WordPress categories, including their hierarchy and relationships, to Strapi.
  • Author Migration: Migrate all your WordPress authors, including their profiles and posts, to Strapi.
  • User Migration: Migrate all your WordPress users, including their profiles and roles, to Strapi.
  • Comment Migration: Migrate all your WordPress comments, including their relationships with posts and authors, to Strapi.
  • Tag Migration: Migrate all your WordPress tags, including their relationships with posts, to Strapi.

Instruction

To install the package, run:

npm i w-to-s-migrator-plugin
or
yarn add w-to-s-migrator-plugin

Then to start migrating you content follow below instruction:

  • Create map-strapi-towordpress.json file: Create json file 'map-strapi-towordpress.json' inside your strapi project root directory and specifiy WordPress to Strapi field. you can modify
{
   "author": 
   [
      "id:id",
      "name:name",
      "email:email"
   ],
   "user": 
   [
      "id:ID",
      "username:user_login",
      "email:user_email",
      "firstName:first_name",
      "lastName:last_name"
   ],
   "category": 
   [
      "id:id",
      "name:name",
      "slug:slug",
      "description:description",
      "seo:'metaTitle-name','metaDescription-description'"
   ],
   "tags": 
   [
      "id:id",
      "name:name",
      "slug:slug",
      "seo:'metaTitle-name','metaDescription-name'"
   ],
   "comments":
   [
      "id:id",
      "date:date",
      "body:content.rendered",
      "post:post"
   ]
   
}
  • Add environment variable: to your .env file, wordpress_username and wordpress_password if your WordPress REST API is protected
WORDPRESS_TOKEN_URL=https://xxx/wp-json/jwt-auth/v1/token  
WORDPRESS_USERNAME=xxx
WORDPRESS_PASSWORD=xxx
CONTENT_URL=https://xxx/wp-json/wp/v2 
  • To migrate Authors: First export your authors from WordPress.Then create json file that contain your authors list with w_authors.json file name inside your strapi project root directory. Then navigate to left side nav, select w-to-s-migrator, enter author as an input for end point field and click migrate button.

  • To migrate Users: First export your users from WordPress.Then create json file that contain your users list using w_users.json inside your strapi project root directory.Then navigate to left side nav, select w-to-s-migrator, enter start page, end page and batch number and users as an input for end point field. start page, end page and batch number depending on number of users you have on your WordPress App.

  • To migrate category: Enter start page, end page and batch number as per your category content and use categories as an input for the end point.

  • To migrate Tag: Enter start page, end page and batch number as per your category content and use tags as an input for the end point.

  • To migrate comments: Enter start page, end page and batch number as per your category content and use comments as an input for the end point.

  • To migrate media: Enter start page, end page and batch number as per your category content and use media as an input for the end point.

  • To migrate post: Enter start page, end page and batch number as per your category content and use posts as an input for the end point.

    Screenshoot

Alt text

Note That: If you got more complex field mapping and also got static field value. Then follow below instruction

  • Clone the repo:
git clone https://github.com/shega-media-technology/wordpress-to-strapi-migrator.git
  • Create plugins director: In side your strapi project under src director if you don't have plugins directory create it and copy paste the repo you clone there.
  • Add plugin config: Add integration config to your ./config/plugins file
 'w-to-s-migrator': 
    {
      enabled: true,
      resolve: './src/plugins/w-to-s-migrator'
    },
  • Modify the controller you need: Find controller you need to modify plugins/w-to-s-migrator/server/controller and follow instruction writtern as a comment on each controller to modify field mapping you need.
  • Start your strapi and enjoy the migration: First open your terminal and navigate to src/plugin/w-to-s-migrator and build your code
yarn build or npm run build

Then return back to root director and start your strapi

yarn develop --watch-admin  or npm run develop --watch-admin

Top Contributor

About Shega

Shega is an information and technology company that offers in-depth insights into Ethiopia’s economy by delivering an integrated media, data, and intelligence solution designed to drive informed decision-making and promote innovation. More at Visit our website

Give a shout-out to Shega

  • ⭐ Star our GitHub repo
  • 🐞 Create requests, submit bugs, suggest new features
  • ☄️ Share to your friends and collegues
  • 🔥 Follow us on Twitter and LinkedIn

Contact Info

Compatibility

Stay tuned for Strapi Version 5 support.
Currently, the plugin only supports Strapi versions below 5.