You can import your existing WordPress blog into your HubSpot blog by following the steps below. The exported Squarespace XML files are also compatible with the blog import tool. Once you've exported your Squarespace blog posts, you can import the file into HubSpot.
The components of your blog that will be imported into HubSpot are: title, post body (including inline images), URL, publish date, author, tags/categories, status, meta description, featured images, and comments. PDF files linked in your posts and images in gallery tags will not be included in the import.
- Before importing 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.
- To import blog comments, there must be an email address associated with the comment.
- Any threaded comments on Wordpress will be imported as unthreaded comments and sorted by the comment post date in HubSpot.
Sign in to your WordPress website and export your blog posts
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 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.
Import your WordPress XML file into HubSpot
After you've exported your WordPress posts, sign in to your HubSpot account.
- In your HubSpot account, click the settings icon settings in the main navigation bar.
- In the sidebar menu, navigate to Website > Blog.
- At the top of your blog settings, click Import blog.
- In the blog import dashboard, click Import new blog.
- Click select a file to upload your XML file of WordPress posts, then click Upload.
Please note: by default, the Remove shortcodes from imported posts checkbox will be checked, which will delete any shortcodes from your posts. Click to uncheck this checkbox if you want the raw code of your WordPress shortcodes to show up in your posts.
Once your blog posts have been uploaded to the dashboard, you can import your posts into your HubSpot blog:
- Hover over the file you've imported, then click Import posts. You'll see a list of all posts from your blog included in the import. Use the checkboxes next to each post to eliminate any posts that you don't want to import, or use the checkbox at the top of the column to check all posts for import.
- Click Import posts.
- Set the Publishing status for the posts using the dropdown menu:
- Keep existing status - This option will preserve 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 override the publish status from your WordPress blog and automatically save any imported posts as draft blog posts.
- Click the Import blog tags checkbox to import your WordPress tags into HubSpot.
- Click the Overwrite any existing blog posts with imported posts to replace any posts in your current blog that have the same URL.
- Click Import. You'll receive an email notification and a message in your blog importer dashboard once your import is complete.
To export any redirects for your WordPress posts:
- 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 successfully imported.
- Click Export redirects.
- Select a Format for the redirects and enter an Email where you'd like the file to be delivered, then click Export. You'll receive an email shortly with your file.
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'll set up any redirects for your posts using the URL mappings tool.
- If the domain of your old WordPress blog is still hosted on WordPress, you'll set up your redirects in WordPress. Some users have found the Redirection plugin to be useful to implement bulk redirects in WordPress.
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 did not show up in your blog, check to make sure the desired imported content is in the expected XML tags. If the content you were expecting to import is not in the XML file, check out 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 will provide as much detail in the error as possible, and it is possible after correcting the mentioned error, more will arise. This is because the XML parser will stop running after finding an error.
You will 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 did not 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 does not lead to an image, you will 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.