Importing Content Into Episerver Programmatically

At the start of all Episerver projects, your team will have to make a decision about how you will share content between different each of your developer environments, the QA server, pre-prod etc...  A lot of teams choose to simply manually add content into each environment.  If you have ever worked on an EPiserver project you will know having to manually wipe a database and then manually add in all the content again is painful.  As you're developing the site and new page types get added, properties change etc.. the need for trashing a database and starting from scratch can happen on a weekly basis.

If you care about your Ci/Cd process, you'll want to automate this process, so when your website builds from a clean slate, a homepage, child pages, menu items, images etc.. all get created automatically.  There are a few ways of doing this within Episerver, with the two main players being the content API or the inbuild Episerver import/export service.  The tutorials in this section will show you both ways.  

For a quick introduction, using the Episerver import/export service is the simplest and quickest way to get working.  Using the content API is a lot more robust but be warned it will take a big chunk of time to write all the set-up code by hand!



How To Install A New Episerver Website Via Code

Whenever I'm starting a new project with a new team, before the heavy duty coding can begin, a decision needs to be made in terms of the team working together... this decision seems to cause a surprising amount of controversy... use a shared database[...]

How To Import Content Into Episerver Automatically Using the In-built Importer And Some Code

Out of the box, Episerver provides content editors a WSYWIG admin screen that allows them to select a bunch of content within the website and export it to a file.  It also has the mirror service to import that content.  If you want to learn more abou[...]

How to Create a Page Programmatically in Episerver?

There are numerous scenarios when you need to create a page in code rather than the editor, say content migration from an old CMS into EPiserver. Adding pages in Episerver is, luckily, very easy using the IContentRepository. The first thing you need [...]

Homepage Learn Episerver CMS Episerver Developers Guide Importing Content Into Episerver Programmatically
Back to top