|Number of votes:||3|
After developing EPiServer for 4 years you realize there are some mistakes that crop up way to often. And most of them is a 30 second job if you do it at the start of the project, but might take literally days if you want to correct it in production (both to debug and fix).
Make sure to also run through the EPiServer CMS Deployment Checklist when you are ready to deploy your project.
This list of course greatly influenced by the excellent Checklist for deploying EPiServer sites on the Dropit blog by Andreas Nylin.
This list is by no means the definitive list of what to do when starting a new EPiServer CMS, but more a collection of my own experience, experiences made by my excellent colleagues in Making Waves and of course all the great blog posts out there. And as such I am going to update the list with your feedback so please leave your feedback in the comments.
Set uiMaxVersions = 20
Set uiMaxVersions to 20 in the episerver.config file (in sitesettings). It is important to set this property before the site goes into production as changing it later is difficult. (You would have to republish EVERY page on the site)
Reason: The default setting is to keep unlimited number of versions of each page. This is a problem for two reasons: 1. Performance 2. The version list gets very long for editors
Force ASP.Net to Render the Same HTML for All Browsers
|Provide default capabilities for all browsers |
ASP.Net has a major “bug” that causes it to render different HTML based on User Agent. This creates cache problems as well as hinders HTML validation. To ensure that ASP.Net treats all visitors as having modern browsers add the following in web.config:
Upgrade to .Net 4.0
Upgrade your site to .Net 4.0
Step 1: Set target framework for your project to .Net 4.0
Step 2: Install the nuget package EPiServerCMS6ToNetFour from nuget.episerver.com.
Step 3: Build
Note: Remember to run EPiServer Deployment Center as a .Net 4.0 application when you want to use it on your 4.0 site.
CSS & Java Script compression/bundling
SquishIt will bundle and compress your *.js and *.css files and is very easy to use.
The easiest way to get SquishIt is to install the SquishIt nuget package from the “NuGet offical package source”. Alternatively you can download it directly.
See this great article to learn how to use SquishIt. You will be up and running in minutes.
Create an unique TITLE tag for every page automatically
An unique title tag MUST be generated for each public page on the site. Use the heading property as default and fall back to the PageName. It should also be possible to override by the editor (use a page property). Reason: The title tag is very important for SEO and is also visible to the end user
Create an unique META DESCRIPTION tag for every page automatically
An unique meta description tag MUST be generated for each public page on the site. Use the introduction property as default and fall back to the MainBody text. It should also be possible to override by the editor (use a page property).
Reason: Although the meta description tag does not affect ranking, it is sometimes shown in the search results and affects click through rate.
|Only use one H1 tag per page and it used for the main heading |
No page should have more than one H1 tag. Make sure to use CustomTagName="h1" on the EPiServer:Property control to render the correct HTML.
<EPiServer:Property CustomTagName="h1" PropertyName="Heading" ID="Property1" runat="server" />
Reason: H1-H6 should only be used for headings and in the correct order. H1 should be used for the main heading only!
Set the right Master Language from the start
Go into admin mode and activate just the languages you need. Also ensure that the correct language is set as the Master Language.
Reason: Changing master language later might force you to do some nasty direct changes in the database.
|Use the FilterForVisitors filter. Always! |
Too many times EPiServer sites crashes because the customer deletes a page or a page expires due to stop publish being set. An expired page should not result in a 500 server error!
Make EPiServer start up faster after each build
EPiServer often takes a long time starting after each build, something that can steal a lot of your development time. You can make it faster by following these 3 steps:
1. Delete all the .xml files in the lang folder for languages you don’t need (make a backup first)
Set stringDelayedLoadThreshold = 50
Due to an issue with setting stringDelayedLoadThreshold to something else than 0 and LinkItemCollections and problems with some custom properties this item has been removed from the list.
And finally: Good luck with your EPiServer project!
Posted by Alexander Haneng