Depending on who you ask, you’ll be the recipient of a very passionate response when you ask any DNN’er their opinion about DNN upgrades. In general, upgrading DNN is very similar to any other ASP.NET application. Yet, when things go wrong, people tend to blame the application itself. Don’t get me wrong, the respective application can and sometimes does have something to do with an issue that may occur, but in my experience, that’s the exception and not the rule. Here are some tips to help you have a less "exciting" time the next time you have to upgrade DNN.
In general, all of the DNN websites I manage that have no other superusers are easily upgraded. I rarely have to roll anything back or see any errors occur during the upgrade process. This is primarily because I keep it clean. It’s also because I follow my own tips below. I hope this help you and your team to have the same beautiful experience with DNN.
Oh, by the way, each of the steps below potentially perform significant changes to the DNN website. Be sure to backup the website and test everything you do.
Scan the Website
It never ceases to amaze me, but approximately 30% of the website backups I receive have either been hacked, or they have been infected with a virus. It’s rare that the owners of the website are aware of either. It’s super-easy to prevent the hacks. See my tip about that below.
Before you upgrade, you’ll want to first scan the file system using your preferred antivirus tool. Be sure to correct any issues that occur using the advice provided by the antivirus software you’re using.
Next, scan the website for any .ASP and .PHP files. In almost every instance, there shouldn’t be any instances of either type of file. I've found FileLocator Lite to be incredibly helpful for this and numerous other tasks. If you find any, be sure to investigate why they’re there. It’s rare, but sometimes an integration of some kind may require the files you find.
Finally, it’s a good practice to compare all of the core .ASPX, .ASCX, and .JS files to the same files in a clean instance of the same version of DNN. You’re making sure that they haven’t been altered at all. You can use a tool like WinMerge or Beyond Compare to make this task easier. If you find any altered files, this is evidence of either someone changing the core files, or having been hacked. It should go without saying, but never, ever, ever, ever, ever change the core code files. If you do find any core files with differences, you should probably overwrite those files with the correct ones before you proceed.
Oh, and please don’t make any core code changes. Yes. It’s important enough to say again.
Uninstall All Unused Extensions
Almost every website I see that allows third-party extensions to be installed has numerous extensions installed that aren’t being used anywhere. They were installed once because they were indeed used but have since been replaced, or they were being tested for potential use, or they may have simply been installed just in case they might be needed in the future. Whatever the reason, you should uninstall them immediately.
The more extension you have installed, the higher the risk of the upgrade failing, potential security vulnerabilities, performance issues, usability issues, and more. Like an Olympic athlete, you want to keep your website as lean as possible. Cut the fat by uninstalling all extensions that aren’t being used.
By the way, this includes the theme packages you might have installed. In general, you should only be using a single theme package, and any others should be removed. Keeping them installed will only ensure that your upgrades will become more and more complicated over time.
Upgrade All Extensions
Now that you have a fairly clean instance of your website, it’s time to help it rise up to the next level. The first way you do that is by upgrading all of the third-party extensions you are using. You’ll want to make sure that you have the most current version installed. Be careful to check the release notes from the respective vendors though. Sometimes you’ll find that a third-party extension can’t be upgraded until a specific version of DNN. This is for good reason. Be sure to pay attention to that.
Some of the third-party extensions you need to upgrade will be commercial extensions, requiring an upgrade fee. This should be considered to be part of your annual website budget. Count on having to upgrade extensions and paying for it. Commercial extensions that regularly are supported via license fees is a cyclical thing. The license fee ensures that they can keep the extension updated and continue to enhance it over time. This will continue to help you for years to come.
Ensure Your Theme Is Following Best Practices
Probably the biggest offender I see for upgrade and performance issues is found in the theme. If you’re upgrading from a version of DNN prior to 8.0, you’ll need to perform at least one critical step as part of your upgrade process. This step requires someone who’s comfortable with editing ASP.NET code. You need to remove all of the references to the degraded SolPartMenu and Action Buttons/menus. You’ll find the Action Buttons in your containers. Hopefully, you don’t see the SolPartMenu though. It often takes a significant amount of effort to replace that menu with a more contemporary one.
Another thing to look at is how the theme is including any CSS or JS files. These resources should be included
using the Client Resource Manager only, and not using the standard/static <script> and <link> HTML tags.
Doing it any other way only increases the risk of odd usability issues and errors on your website – not to mention
Do It In Increments
In many cases, it would appear that you could upgrade directly from one version to the most recent version of DNN.
For example, you try to upgrade from version 06.02.04 to 09.01.01. It may even look like it worked at first.
In many cases, we’ve seen this ourselves, only to find quirky issues creep up, sometimes weeks or months after the
upgrade. In general, we’d recommend upgrading to the highest version of DNN for each major version. For
example, the highest version of 6.0 is 06.02.09, 7.0 is 07.04.02, and so on. Upgrade to each major version,
backup, and test incrementally. It may seem like more time in the short-term, but we’ve found this to be a
critical step towards ensuring long-term stability.
Do It Regularly
Upgrade your DNN website as soon as possible. It’s a good idea to never fall behind. The longer you wait
to upgrade, the more work you’re creating for when you do. You’re almost guaranteeing issues to occur.
In general, we never recommend being more than two releases behind.
It’s worth noting that as of the time of this writing, we don’t recommend upgrading to DNN 9.2. There have been
over 500 API endpoints removed, and the ecosystem hasn’t yet had enough time to react to this change.
Probably the number one cause of upgrade problems I see is related to third-party and (especially) custom extensions.
Only use extensions that are built by a well-known vendor whose reputation shows that their extensions are compatible
with and don’t hinder newer versions of DNN. Also, if you have your own custom extension, rebuild them regularly
against newer versions of DNN to ensure that they are adhering to any recent API changes. Otherwise, the next
time you upgrade, you may be spending a lot more time and effort troubleshooting things, versus upgrading.
This blog post is
cross-posted from the Upendo Ventures blog.