Skip to content

Import WordPress or Squarespace blogs with XML files

Last updated: January 5, 2026

Available with any of the following subscriptions, except where noted:

Import blog posts from WordPress or Squarespace into HubSpot using an XML file. With the blog import tool, you can move all your blog content, like posts, tags, and publishing status, into a HubSpot blog.

Please note: if your blog is hosted on WordPress, we recommend trying the WordPress Connect blog import feature first, which can import all your blog content based on the URL of your blog's homepage. Learn more about how to choose the best method to import your blog content into HubSpot.

Before you get started

Before importing your blog, review how content is handled during the import and what limitations may affect your posts after they’re imported into HubSpot.

  • The parts of your blog that'll be imported into HubSpot are: title, post body (including inline images), URL, publish date, author, tags/categories, status, meta description, featured images.
  • PDF files linked in your posts and images in gallery tags won't be included in an XML import. 
  • Before you import your blog, review all internal links and images to confirm they include the absolute URL instead of a relative URL. This will prevent links and images from breaking in your imported posts.

Export blog posts

To import blog posts into HubSpot, first export them as an XML file from WordPress or Squarespace.

Export blog posts from WordPress

If your blog is hosted on WordPress, export your blog posts as an XML file from the WordPress admin tools.

  • Sign in to your WordPress website as a WordPress Admin and navigate to Tools > Export to select your blog posts for export.
  • If you're using WordPress.com, you can follow the steps in this WordPress documentation about how to export your posts from WordPress.com.
  • If you're using a custom WordPress website, you can follow this WordPress documentation about how to export your posts from your custom WordPress website.

Export blog posts from Squarespace

If your blog is hosted on Squarespace, export your blog posts as an XML file from the Import & export content panel.

  • Sign in to Squarespace and access the Import & export content panel to select your blog posts for export.
  • Follow the steps in this Squarespace documentation to export your blog posts. 

Import XML files into HubSpot

After exporting your blog posts, upload the XML file to HubSpot and import the posts into a HubSpot blog.

Upload XML file

  1. In your HubSpot account, click the settings settings icon in the top navigation bar.
  2. In the left sidebar menu, navigate to Content Blog.
  3. Click the Current view dropdown menu and select Import blog.

The content blog settings are displayed. An arrow points to the Current view dropdown menu and a box is placed around the Import blog hyperlinked text.

  1. Click the Start new import dropdown menu and select Blog posts
  2. Select the XML file upload option, then click Next.
  3. In the top right, click Import new blog
  4. In the dialog box, click Upload and select an XML file. By default, the Remove shortcodes from imported posts is selected, which will delete shortcodes from WordPress or Squarespace blog posts. To include raw code in your posts, clear the checkbox.
  5. Click Upload.

Import blog posts

After the XML file is uploaded, review the blog posts in the file and select which posts to import into your HubSpot blog.

  1. To import blog posts in the file, hover over the file, then click Import posts or the File name. You'll be directed to view all the blog posts in the file.

The blog importer page is displayed. An arrow points to the import posts button when hovering over an uploaded blog.

  1. Select or clear the checkboxes next to each post you want to include or exclude from the import.
  2. Click Import posts.

The blog importer page is displayed for an uploaded file showing blog posts included in the file. An arrow points to a checkbox for a specific blog post. A box is placed around the Import posts button in the top right.

  1. In the dialog box, click the blog dropdown menu and select the blog to import the posts to.
  2. Click the Publishing status dropdown menu and select one of the options:
    • Keep existing status - This option will maintain the publish status from your WordPress blog and keep any draft posts as drafts, and any published posts as published.
    • Change all to draft - This option will change the publish status from your WordPress blog and save any imported posts as draft blog posts.
  3. To import your blog tags into HubSpot, select the Import blog tags checkbox.
  4. To replace any posts in your current blog that have the same URL, select the Overwrite any existing blog posts with imported posts checkbox.
  5. When finished, click Import. You'll receive an email notification and a message in your blog importer dashboard once your import is complete.

Export redirects for WordPress or Squarespace posts

After importing your blog posts, export redirects to ensure visitors and search engines are routed to the correct URLs. The way you set up your blog redirects depends on how much of your website is now hosted on HubSpot:

  • If your entire website, including the domain for your former WordPress blog, is now hosted on HubSpot, you can set up redirects in your website settings. 
  • If the domain of your old WordPress blog is still hosted on WordPress, you'll set up your redirects in WordPress. The Redirection plugin may be useful in implementing bulk redirects in WordPress.

To export your redirects:

  1. Navigate back to your blog importer dashboard, then click on the File name of your recent import. Here you'll see details about any errors or a notification that your posts have been imported.
  2. Click Export your redirects.

The blog importer page is displayed, showing that posts were successfully imported. A box is placed around the export your redirects hyperlinked text.

  1. In the dialog box, click the Format dropdown menu and select a format option (e.g., CSV, XLSX, XLS). 
  2. Enter an Email where you'd like the file to be delivered, then click Export. You'll receive an email shortly with your file.

Troubleshoot common errors

If you encounter any issues during the blog import process, review how to troubleshoot the following errors.

Content missing from an import

If something you were expecting to import didn't show up in your blog, confirm the desired imported content is in the expected XML tags. If the content you were expecting to import isn't in the XML file, review the WordPress support documentation to confirm that all content was selected and exported correctly.

The file for this import is invalidly formatted

This error means the XML file you tried to import was malformed or has syntax errors which are preventing our blog importer from reading the XML file. We'll provide as much detail on the error as possible, and it's possible after correcting the mentioned error, more will arise. This is because the XML parser will stop running after finding an error.

You'll see these same errors if you open the XML file in another XML parser, such as Google Chrome. For help resolving the XML errors, refer to the provider of the XML file (WordPress or Squarespace).

Retrieval of asset at URL failed

This means your XML file referenced an asset (usually an image) that didn't lead to an asset. For example, if you see an error like the following:

Retrieval of asset at URL `https://www.image.com/image.jpg` failed. This asset was not uploaded to the file manager.

If you click on the mentioned URL and also confirm that it doesn't lead to an image, you'll need to correct this image URL in the XML file, and re-import the posts that were affected. You can also upload the image file to your file manager, and add the images to your post in HubSpot.

Was this article helpful?
This form is used for documentation feedback only. Learn how to get help with HubSpot.