allBlogsList

Tips to a successful XBlog Wordpress Import

Now that XBlog, a blogging module for Sitecore, has been out for over a year we have seen a few bumps in the road.  It is expected as it’s all part of the software lifecycle.  One specific area the XBlog community has specifically identified as being a bit difficult is the Wordpress import.  This is understandable, considering the import has to process thousands of lines from various versions of Wordpress.

Here are some tips to get you to a successful import.

  1. Remove the clutter – Wordpress import does not currently support comments or meta tags.  So to simplify your import, I suggest pulling those out.  In some case that could make up 70% to 80% of your file size.  I highly recommend using an editor like Notepad++ and using regular expressions in the search and replace tool.  Manually remove this data could take some time.
  2. Watch the dates – We were informed of an issue where the date fields were not set and in result was causing the import to fail.  Do a quick check on your dates and fill in any that are missing.  We are looking at a fix for this, but since publish date is a required field, it’s a discussion of how best to handle this.  So until that happens, I would double check dates.
  3. When it fails, shrink the file – If you keep having consistent errors, consider just importing one comment.  To clean up import later all you need to do is delete the blog items, data items, and page specific templates (3 of them).   So try one, two, five, etc to try and reveal the problem.  More than likely you are looking for a broken tag or a bad format.
  4. When in doubt, switch to another environment. -  Sometimes if you are working with an environment that has been customized you will hit problems specific to that.  Instead of troubleshooting, it might be easier to just spin up a new Sitecore instance, import there, and then do a package transfer.   You will need to move page templates, and items under blog and data only.  Everything else should be installed with the same guids and reference fine. 

I hope these tricks were helpful.  I have successfully imported up to 350 posts at one time.  Just takes a little patience at times!