This repository contains a complete Craft CMS application, configured to closely mirror a default WordPress installation. It can be used as an introduction to Craft’s content tools, or as a way to quickly import content from an existing WordPress site.
Tip
See our Craft CMS for WordPress Developers article for additional information about making the switch to Craft!
- Sensible defaults that match WordPress content structure;
- Ready-to-use templates for common WordPress content types;
- Live Preview configured out of the box;
- Pre-packaged with our official WordPress import tool;
- DDEV or an equivalent local development environment that meets Craft’s system requirements;
- A publicly-reachable WordPress site to migrate from, with administrator-level access;
-
Clone this repository and move into the folder:
git clone https://github.com/craftcms/starter-wordpress.git cd starter-wordpress/
-
Start DDEV:
ddev start
-
Install dependencies:
ddev composer install
-
Run the Craft setup wizard:
ddev craft install
Congratulations—Craft has been installed! You can explore the control panel by opening https://starter-wordpress.ddev.site/admin
in your browser, or continue reading to import existing content.
Note
If you want to use a different subdomain/prefix for this DDEV project, update the name
key in .ddev/config.yaml
.
Before migration, you'll need to prepare your WordPress site. See the wp-import repository for complete documentation.
-
Install the import helper:
- Save
plugins/wp-import-helper.php
to your WordPress site'swp-content/plugins/
folder - Log into WP Admin Dashboard
- Navigate to Plugins and activate "wp-import helper"
- Save
-
Create an application password:
- In WP Admin Dashboard, go to Users
- Edit an administrator's account
- Scroll to "Application Passwords"
- Enter "Craft CMS" as the name
- Click "Add New Application Password"
- Save the username and generated password for later use (you'll need it on the import step)
-
Configure custom post types (if applicable):
- Ensure
'show_in_rest' => true
is set in any calls toregister_post_type()
- Ensure
-
Configure ACF fields (if applicable):
- Enable "Show in REST API" for each field group
The import process is covered in detail in our Craft CMS for WordPress Developers article, but the critical steps are as follows:
-
Run the import script:
ddev craft wp-import
-
Enter your WordPress site details when prompted:
- WordPress site URL
- Admin username
- Application password (created earlier)
The importer will create:
- A "Posts" section for your posts
- A "Pages" section for your pages
- An "Uploads" filesystem and volume for your media
- A "Post Content" CKEditor field with nested entry types for non-HTML block data
See the wp-import repository for complete documentation, command options, and compatible fields.
We encourage you to explore the control panel at your own pace—if you need some guidance, check out this post-import tour.
This project includes a bare-bones front-end built with Craft’s native template system, Twig. Templates are stored in the templates/
directory—you are welcome to use them as-is, modify them to suit, or remove them entirely and experiment with the GraphQL API!
Note
Some template names and locations are significant—they may be factored in to routing, or used by a section.
To push the code to your own repository, you must replace the default remote:
git remote remove origin
git remote add https://github.com/my-organization/my-repo.git
If the importer created any new resources (typically resulting in new or updated files in config/project/
), commit those before pushing!
Read our guide on hosting and deployment, or get started with our first-party hosting platform Craft Cloud by spinning up a 7-day free trial:
-
Run the Cloud setup command:
ddev craft cloud/setup
-
Commit and push those changes to a repository you control;
-
Sign up for Craft Console;
-
Create a new Cloud project;
See our Getting Started on Craft Cloud for details.
If you have any questions or suggestions, you can always reach us at support@craftcms.com or post a GitHub issue.
Thanks for trying Craft!
🍋