April 2015 » 11 Spring Cleaning Tips for Your Kentico Website - Part 1
Apr 18

11 Spring Cleaning Tips for Your Kentico Website - Part 1

Introduction

The sun is out, winter coats are disappearing, the BizStream barbecue grill is starting to be used at lunch time, ants are trying to invade our office, and baseball is back. This must mean that spring is in the air. It’s the time of year where getting some seasonal chores completed and setting up for summer is the norm.

As I was reflecting on the nice weather today on my commute home, I thought why not also use this time as reminder for all you Kentico developers and even Kentico marketers out there to do a little preventative maintenance on your CMS. It is easy to let small things like the items on this list slip by the cracks. Now would be a good time to address them especially if your Kentico site has been up and running for some time now. Without further ado, I have 11 tips that will keep your Kentico site in tip-top shape for 2015.
 

1. Kentico Web Analytics Clean Up

If you have had a Kentico site running for a long period of time (multiple years) then chances are it has been collecting a lot of insightful data for you. This web analytic data tells you all about your website's visitors, traffic sources, content views, download reports, and browser statistics. The good news is that you can see all this data aggregated by hour, day, month, or year in the marketing overview dashboard or in various reports.

However, chances are you are not looking too frequently at data that is over a year or two old. This data tends to add up in overall size in your SQL database. Eventually if completely unchecked it can affect your maintenance plans, performance, and Kentico upgrade path. This Kentico tip is a reminder that Kentico has a built in way to control the amount of data saved. If you navigate to your Web analytics application from the Kentico menu in version 8, the very last item in the first screen is the Data management item.
 

Kentico Web Analytics


The Data management portion of Web analytics shows you how long you have been collecting data for and gives you the means to delete old data by a specific date range. To keep your database size down I recommend cleaning out data older than two years. Actually it looks like I need to heed my own advice on this one. Take a backup first of course before doing this in production. Also be warned it may take a while to do this operation so plan to kick it off during a non-peak time for your website.
 
 

2. Review your 404 Not Found Report

Speaking of Web analytics, one of the built in Kentico reports that I find most useful is the Invalid pages report. This report shows you all of your 404 errors, which means a visitor tried a URL which did not exist, or a search engine is spidering a page that no longer exists, or possibly even a bot is attempting to flood your site for nefarious reasons.


Kentico Invalid Pages report


If you see one item on this list that has a very high number, for SEO reasons you may want to create a Page alias for that URL and enable 301 redirects to work correctly in Kentico. That way you are ensuring the invalid page ends up a valid page in your website.
 

PRO-TIP: You can right click and subscribe to this report and have it sent periodically to you. Instead of having to pull the info out of your site you can have Kentico push it to you. This is one of my favorite parts of Kentico reporting.

 

3. Review Your Event Log 

This spring cleaning tip is meant for all the Kentico developers out there. The Kentico Event log application is incredibly useful in any troubleshooting activity. If you are not using it, shame on you. You should be. 

However, just like tip #1, the Event log can grow to a rather large size if you have upped the limit of log events during development, which is a good best practice during the development and QA phases of your project. If left unchecked it can also become quite large. The tip here boils down to double checking the size of how many events are logged in your system. If you have thousands of pages of events in the unigrid, it might be time to truncate the log by using the Clear log button.

The Event log also is the single best spot that illustrates the health of your Kentico site. If you see a ton of Error event types as opposed to Warning or Information only event types you should take a look to see what is causing those errors and take the correct action to solve them.


Kentico Event Log errors


You can manage how many Event log items are kept via the CMSLogKeepPercent. There is a crazy formula for how Kentico figures out the exact number of items to keep, but basically the larger the value the more the system keeps.


 

4. Review Macro Signature Error Report

In version of 8 of Kentico, a lot of attention was paid to K# macros. The way macros are signed, or the security mechanism for macros, changed greatly for the better. However the signatures themselves are something to keep an eye on. In fact if you are looking at your Event log because of #4 above, and you see a bunch of macro security errors, chances are you have a bad macro signature. This can be caused by deleting the user account of any user who signed a macro. If your site has been running for a while this may be an easy thing to miss, but it can cause errors on your site. 

Luckily, there is an easy way to look at all of the macros in your website in version 8. To do so you can navigate to the Kentico menu -> System -> Macros -> Report vertical tab


Kentico Macro Report


Here you can run the report for the entire site, a certain object, or a certain macro type. There is one really nice check box, Report problems. Checking that checkbox will give you a report of only the macro errors on your site. But do not go crazy if you see this report come back with a ton of errors, there can be a few default items in that list that are legacy objects from an older version of Kentico if you have upgraded your site that are not critical to fix. Most likely they are no longer used by the system.

I recommend focusing on any real objects that are using explicitly in your site that have a macro signature error. You can do so by re-saving the object that has a macro in it, like a transformation, web part property, or zone property. In rare cases you may need to re-sign all of the macros in the system. You can do so in the Signatures vertical tab right above the Report vertical tab. Again be sure you know what you are doing here, and take a back-up just in case.

 

5. Review SQL Database Transaction Log Size

It would not be a cleanup list if I did not mention something about the database right ? The fact is most SQL Databases need tender loving care to maintain optimal performance. Do you ignore your database for months or worse years at a time. Potentially every SQL call you run increases the database transaction log especially if you are running in FULL recovery mode.

Scroll down to the "Shrinking a log file to a specified target size" section of the MSDN documentation for how to shrink your log if it has grown to a large size. This tip is not really about the application itself, but ensuring that your server does not run out of disk space is pretty important to keeping your Kentico site up and running. What better time to do so than during some spring cleaning ?

 

Up Next

Keep reading to get to part 2 of 11 Spring Cleaning Tips for Your Kentico Website.
 

 

 

You might also be interested in

[X]

Be the first to know about my latest Kentico Tips & Tricks!

Do not show again