Skip to content
Available for new work
Pages in Blog

GuidePremium

Import from WordPress into CoullWorks Blog for Magento 2

Import a WordPress export (WXR file): how to export, every WordPress option, how Gutenberg blocks become Page Builder blocks, images, redirects, and what is and is not imported.

Updated 17 November 2026Back to the package pageBuy

The WordPress source reads a standard WordPress export file (WXR 1.2). There is nothing to install in WordPress. Read the import overview first for the dry run and live run flow.

Export from WordPress#

  1. In WordPress open Tools, Export.
  2. Choose All content and download the file. It is an .xml file.
  3. Keep the export and the old site online until the import is finished: the images are downloaded from the old site.

An export holds posts, pages, categories, tags, authors, comments and links to images. It does not hold the image files themselves or site settings.

Fields for this source#

Choose WordPress export (WXR file) in Import from. See the overview for Export file, Store view and Old base URL. The options that exist only for WordPress are below.

The Import form with WordPress chosen, showing Export file, Store view, Author mapping, the include pages switch, Old base URL, Category base and Tag base

The WordPress form. The source list is composed open. The job list at the bottom shows a Refused dry run from earlier sample data.

Author mapping#

  • Type: multi-line text, optional.
  • Format: one per line, wordpress_login:existing_author_url_key. Help text: "One per line: wordpress_login:existing_author_url_key. Unmapped authors are created."
  • What it does: posts by that WordPress login are given to an author you already have, matched by their URL key. Logins you do not list become new authors.
  • Errors: a line that does not have that form stops the dry run with a message.

Also import pages as posts#

  • Type: switch, default No.
  • What it does: with Yes, WordPress pages are imported as posts as well. With No, only posts are imported.

Old base URL#

  • Type: text, optional, a full http:// or https:// address.
  • What it does: the address the old WordPress posts lived under, such as https://old.example.com/blog. The export normally carries the site address, and the importer uses it. If the export has no site address, the dry run warns "The export has no wp:base_site_url, so the category, tag, author and feed addresses of the old site are not known and are not redirected. Give --old-base-url to redirect them." Fill this field to fix it.
  • Same domain or other: if the old site was on this store's domain each old address gets a 301. If not, you get a redirect map.

Category base#

  • Type: text, up to 64 characters, optional. Placeholder category.
  • What it does: the path before a category on the old site. WordPress uses category unless you changed it. Fill it only when your old categories were at, for example, /topics/name. Leave it empty for category.

Tag base#

  • Type: text, up to 64 characters, optional. Placeholder tag.
  • What it does: the same, for tags.

What is imported#

RecordSource in the exportNotes
AuthorsWordPress users, by loginMapped through Author mapping, otherwise created.
CategoriesCategory termsKeeps the tree.
TagsTag terms
PostsPosts, and pages when askedTitle, address slug, content, excerpt, dates, status, categories, tags and featured image.
CommentsApproved, pending, rejected and spam commentsReplies keep their threads. Pingbacks and trackbacks are not comments and are left out.
RedirectsOld post, category, tag, author and feed addressesSee below.

No related-post or related-product links are imported, because a WordPress export has none.

Post status#

WordPressBecomes
PublishedPublished
Scheduled (future)Scheduled
Anything else, including draft, pending and privateDraft

Content conversion#

If the post uses Gutenberg blocks, each supported block becomes the matching Page Builder block, so the post opens and edits in Page Builder. Anything else is kept as an HTML block so nothing is lost, and the dry run reports which blocks that happened to. Classic editor content becomes text blocks.

WordPress blockBecomes
Paragraph, list, classicText
HeadingHeading
ImageImage, with its caption where it has one
GalleryGallery
Quote, pullquoteQuote
CodeCode
TableTable
EmbedVideo for YouTube and Vimeo links, Embed for other allowed providers, otherwise an HTML block
SeparatorDivider
HTMLHTML
Any other blockAn HTML block holding its markup

Scripts, event attributes and javascript: addresses are removed from all content.

Images#

The featured image and the images inside posts are downloaded from the old site into pub/media/coullworks_blog/imported, and the addresses in the content are rewritten. Only the old site's own host is used. A download that fails (a 404, a timeout, a file that is not a picture) is logged against that post and the post is still imported without it.

Redirects#

For each post, category, tag, author and the blog feed the importer works out the old address from the export's site address, the permalink, and the category and tag bases above. Paginated list pages are covered with a pattern. On the same domain they become 301 rewrites. For another domain they go into the redirect map.

After the import#

  1. Read the job report and fix what it flags.
  2. Open a few imported posts in Page Builder.
  3. Run bin/magento indexer:reindex coullworks_blog_post and bin/magento cache:flush.
  4. If the old site stays on another domain, send the redirect map to whoever runs it.

For very large exports use bin/magento coullworks:blog:import wordpress --file=export.xml, described in the CLI reference.

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.