Import and export content > Import from WordPress

    Import from WordPress

    In this guide we'll go through the import of content present in a WordPress site to a DatoCMS project.

    Installation

    Install the datocms-client package:

    npm install -g datocms-client

    What you will need

    To copy your WordPress content to DatoCMS, you will need the following information:

    1. Your Wordpress user name and password with admin privileges

    2. Your Wordpress site URL

    3. Your DatoCMS full-access API token: create a new project, and then head to Settings > API tokens:

    Run the import

    To import the posts and pages of your WordPress project into DatoCMS, run the following in the console:

    dato wp-import --token=<YOUR_DATO_API_TOKEN> --wpUrl=<YOUR_WORDPRESS_PROJECT_URL> --wpUser=<YOUR_WP_USERNAME> --wpPassword=<YOUR_WP_PASSWORD>

    That's it! The importer will create the standard Wordpress models: articles, pages, authors, categories and tags. All the Wordpress media files will be uploaded to your DatoCMS project in the media gallery as well. Hurray!

    Known limitations

    • Our importer only copies pages, and posts, you won't get automatically the custom post types

    • Wordpress uses a plethora of different plugins to manage localizations. So, for now, if you have a multi-lingual website, we’ll currently only import the content created for the main language.

    • Same thing goes for SEO, sliders and other web elements managed by plugins. They won’t be imported.