One of the most common questions that I get from users when it comes to deploying to deploying a DotNetNuke site is "DO I REALLY need all of those files?". My typical answer is something along the lines of yes and no. In this blog posting I want to talk in a bit more detail about some of the processes that I go through when installing a clean DotNetNuke installation and how I keep the footprint down on the disk space.
Why Do I Care?
Before I start talking about any specifics the first question that is going to come to mind is "Why do I care? What difference is a few files?" Well this is a very valid question with a not so crystal clear answer. Will the files HURT your installation? No they will not, but I am a big fan of keeping the footprint as SMALL as possible, and the less files you have the faster you can create backups, transfer sites from location to location, and in general FIND that file that you were looking for.
Now, to start out, lets look at a clean DotNetNuke 5.4.4 installation. The following statistics are for an INSTALL version of DNN that was completed using the install wizard with a "Typical" configuration, installed to an existing SQL Server database.
- Total Files: 2,321
- Size: 45.6Mb
Looking at this, there are a LOT of files there, but thankfully there is a lot of fat that we can trim.
What to Remove
When I work with a default DotNetNuke installation I want to remove documentation files, non-applicable database files, un-needed placeholders and other items that are going to clutter up my disk space, and might confuse future editors of the site. I also want to remove installation packages for modules that I am not going to use, and development files that are not applicable to my production installation. The following sections go folder by folder and talk about items that I recomend removing.
NOTE: My recommendations are based on users with a standard installation, NO content, and are assuming that you have used a SQL Server database and not the SQL Express file. I am NOT responsible for any damage that may come from following the advice listed below. As always please be sure to take a backup of the site BEFORE you continue.
This folder contains two files that can be removed, "Database.mdf" and "Placeholder.txt" neither of these files are needed if you are working with a regular SQL Server database. This frees about 1.2 mb of disk space alone
This entire directory can be removed as there are no contents needed to run the site. This removes two folders and 34 files. Not a lot of disk space, but items that are just not needed in a production installation.
This folder is a bit tricky, some of the sub-folders contain "available" extensions that you "might" want to install. Typically with a lot of installations though I don't need them, therefore I'll go through and clear out all of the files that I don't want. You can do this for any extension that you don't need in each of the following folders. You can also remove any of the placeholder.txt files that exist.
The only note and warning on this section is that if you remove the placeholder.txt and then FTP the site, SOME FTP clients will not create the folder if no files exist.
To support the standard DotNetNuke site template a number of image files are added to the portal root. These are visible in the file manager and can be removed if you remove the default DNN content. In addition you can streamline/remove content from the portal.css file that applied specifically to base template items.
The final location for a bit of cleanup is the root of the installation as there are a number of files that are not needed in a production environment. Below is a list.
- development.config - This is an alternate configuration
- dotnetnuke.ico - The DNN icon
- DotNetNuke.vstemplate - This is a template for visual studio
- DotNetNuke.webproj - This is used for visual studio
- release.config - THis is an alternate configuration
What does this get us?
So the big question, how much does it help, well below is the information on my installation after a standard bit of cleanup.
- Total Files: 2,231
- Size: 39.7Mb
This is a reduction of 90 files and almost 6Mb of disk space. Not a lot of space, but to me it removes some clutter. Share your thoughts, comments, recommendations below.