You've installed Kentico, have your site up and running locally and now you need to deploy it. You look in your file system and see there are thousands upon thousands of files in the root directory. Yes, Kentico is a large CMS and in order to run it you do need a lot of files but what I'll show you today is how to clean up your installation for deployment.
Kentico offers a very robust solution for those looking to build a simple 10 page website or someone looking to build the next Kentico Site of the Year. Any option you choose, there are several items in which you should clean up prior to deploying your Kentico site to a production environment. If you have these files or folders on your production site you're just opening yourself up to additional security vulnerabilities and additional maintenance for something you will never or should never use outside of your test environment.
Why you ask?
Any good Kentico Solution Partner
will tell you these files and folders are put there strictly for proof of concept, testing and demo's. If you have created your site off of any template other than the BlankSite template, then you're simply taking all the work Kentico did to create these sample sites and call them your unique sites. Nothing against Kentico or the folks who created these test sites but I'd never have my site or a client's site look like a sample put out by the company who created the product.
This being said, make yourself or company stand out by giving them a unique design. Don't take the short road to make a quick buck because you have nothing to gain and everything to lose. Earn the trust and respect of your client by giving them something unique which fits their needs, not a cookie cutter pre-built demo template.
First things first - which Project Type
Kentico gives you the option to install:
- a Web site project
- a Web application project
In this post it really doesn't matter what option you choose as they are almost exactly the same,
There are several discucssions around which is better and why but you can read those on your own. For now, I'll share with you what to do with both of them.
Web Site Project
This is what I use most often, because I can, and I've found I can reduce the overall file count by 1300 physical files and 42MB in size.
Web Application Project
I personally use this approach the least but when I do I've found I can reduce the overall file count by about 1300 physical files and 71MB in size.
Cleaning up your project!
It doesn't matter if you're using a web site or a web application, you'll clean up the same folders/files. In the file structure of the website you'll want to clean up the following directories and files:
Site specific design files:
Template install files
Sample code files
And if you don't plan to use the MVC project in your website, remove these
All Cleaned up!
So you've got everything cleaned up and pretty proud of yourself. Well don't pat yourself too hard on the back yet. Open your project in Visual Studio and ensure it still compiles. If not, you got a little too delete happy and your website will most likely break when you run it.
Well that's it. Let me know what you do prior to deployment to your servers.
Good luck and happy coding!