Learning Center
Learning Center
Close
The IMPACT Learning Center

Free resources to help you master inbound marketing and They Ask, You Answer

Access the Learning Center

Access the Learning Center

Access the Learning Center
learning_center_grey__What is They Ask, You Answer-v2-black

What is They Ask, You Answer

What is <span>They Ask, You Answer</span>
Articles, Podcasts, & Updates

Articles, Podcasts, & Updates

Articles, Podcasts, <span>& Updates</span>
Free Courses & Certifications

Free Courses & Certifications

Free Courses & <span>Certifications</span>
On-Demand Keynotes & Sessions

On-Demand Keynotes & Sessions

On-Demand <span>Keynotes & Sessions</span>
Events
Events
Close
IMPACT+ Membership
IMPACT+ Membership
Close
Services
Services
Close
Navigation_8_2021_taya

They Ask, You Answer Coaching & Training

They Ask, You Answer Coaching & Training
Navigation_8_2021_flywheel

Inbound Marketing Services

Inbound Marketing Services
Navigation_8_2021_website design - monitor

Website Design & Optimization

Website Design & Optimization
Navigation_8_2021_hubspot implementation

HubSpot Training & Implementation

HubSpot Training & Implementation
Navigation_8_2021_virtual selling

Virtual Sales
Training

Virtual Sales <br>Training
Navigation_8_2021_swell - paid ads

Paid Search & Social Services

Paid Search & Social Services
Become a Certified Coach
Become a Certified Coach
Close

Quick Tip: How to Migrate Your Blog from WordPress to HubSpot

Quick Tip: How to Migrate Your Blog from WordPress to HubSpot Blog Feature

December 20th, 2013 min read

how-to-move-your-blog-from-wordpress-to-hubspotWordPress is one of the best CMS' out there, with thousands of features and plugins from every aspect.

Even with all of its features and customizable capabilities, it's still no HubSpot.

But...how do you go about migrating a high volume of blog posts from one platform to another? Sounds simple, right? Not so much. 

Now you could use the built in HubSpot Blog Importer Tool, it works just fine. However, we needed to migrate not just the content, but also thousands of featured images, custom read more tags, paragraph tags, and other formatting. 

With thousands of posts to migrate, we needed something to simplify the process as much as possible. (Imagine manually adding paragraph tags to over 2,000 posts??)

Luckily, we've gone through this arduous process and have a repeatable formula to make your transition over to HubSpot that much easier. 

First things first

You need FTP access to your domain that WorPress.org  (your blog) is installed and hosted on.

What's FTP (File Transfer protocol) Access? It's a standard network protocol used to transfer files from one host to another. Talk to your development team for more assistance on how to access it.  

Once you have access, you’ll need to install the Export Tool in WordPress if you haven’t already. (It's usually already installed.)

You can find this under the tools section in the left sidebar. (Pictured below.)

(Click to enlarge)

how-to-move-your-blog-from-wordpress-to-hubspot

The Code

Once you’re able to access the back end of your WordPress install, find the ‘export.php’ file located here: /wp-admin/includes/export.php.

Open that up in your text editor. (If you don’t have one, my favorite is SublimeText2.)

Now around line 377, find this line:

<content:encoded><?php echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) ); ?></content:encoded>

Replace it with this:

<content:encoded>
	<?php 	
	$dl = " ";
	$text_to_add="<!--more-->";
	$number_words=50; 
	$text=$post->post_content;
	$arr=explode($dl,$text,$number_words+1);
	$last=array_pop($arr);
	$more_content=implode(" ",$arr)." ".$text_to_add." ".$last;echo wxr_cdata( apply_filters( 'the_content_export' ) . wpautop( get_the_post_thumbnail( $size, $post_thumbnail_id ) . $more_content ));?>
</content:encoded>

Save that up and go back to the export tool in WordPress (refresh that page if you’re already on it).

Now just begin the export of your posts!

Tip: If you have a solid amount of posts, say more than 500 or so, I’d suggest breaking them into a few different files. The more posts, the more exports. 

What you just did will get you the featured image, tags around the text (because HubSpot won’t add those), AND get you a custom “Read More” link after 50 words.

Back in HubSpot

Now log in to HubSpot and go to Content > Content Settings.

Find “Blog Importer” in the left sidebar and simply upload the .xml file(s) that you have.

After their status reaches “ready,” you can go into that import file and begin importing the posts from that file.

Now you're ready to go! All of your old posts will carry over, and you'll be ready to blog on HubSpot in no time at all. (Well, depending on your internet speed of course.)

Want to learn more about digital sales and marketing?

Master digital sales and marketing when you join IMPACT+ for FREE. Gain instant access to exclusive courses and keynotes taught by Marcus Sheridan, Brian Halligan, Liz Moorehead, Ann Handley, David Cancel, Carina Duffy, Zach Basner, and more.

Sign up for free
Take a peek
IMPACT+ Sign Up
A FREE online learning community with on-demand courses, hundreds of expert-led sessions, thousands of your peers ready to support you, and much more.
Check it out
The tools, education, and community you
need to master They Ask, You Answer.
Check it out
The tools, education, and community you need to master They Ask, You Answer.