Upgrading to BlogEngine.NET 2.8
If you are updating from BlogEngine.NET 2.7, there are few changes. The web.config files have changed to reflect DLL updates, but there is no database changes in this release. Most of the instructions below are for those upgrading from 2.7
Recommended Path to Upgrade
The cleanest way to upgrade to v2.8 is to start from a v2.8 installation, and then copy your existing data and settings into v2.8. The upgrade steps follow.
A couple of the steps are related specifically to those who use a database for storage, and a couple are related specifically to those who use the default XML storage (non-database). You can skip the steps that don't pertain to your method of storage.
Make a full backup of your existing BlogEngine installation. This is very important. If anything goes wrong, you can always restore to your backup.
2. Install v2.8
Install v2.8 on your computer, in a new folder.
3. Web.config file (for non-database installations)
It is recommended to use web.config that comes with new installation, and then copy any modifications if needed from your blog's web.config
4. Web.config file (for database installations)
If you will be using a Database for data storage, Web.config files you can use are located in the /setup/ folder. Because of the variety of changes to the web.config files, it is strongly recommended you start from these sample web.config files, and
copy your specific connection string into the sample web.config file. For example, for SQL Server, in the /setup/SQLServer folder is a file named SQLServerWeb.Config. For MySQL, the file is /setup/MySQL/MySQLWeb.Config, etc. Copy this file
to the blog root, delete the existing Web.config file in the blog root, and then rename this sample config file to Web.config (i.e. rename SQLServerWeb.Config to Web.Config).
At this point, the Web.config file you copied to the blog root and renamed contains a sample DB connection string. The sample DB connection string will look similar to:
connectionString="Data Source=MySQLServer;User ID=user;Password=password;persist security info=False;initial catalog=BlogEngine;"
Replace this sample connection string with the connection string in your existing Web.config file.
If you have any other specific customizations to your existing Web.config file (e.g. appSettings), add those into this Web.config file.
5. Database Upgrade Script (for database installations)
If you are upgrading from BlogEngine.NET 2.7, there are no upgrade scripts to run.
Upgrading from earlier version: If you are using a Database to store your data in, you will need to run the DB upgrade script. Each of the /setup folders has an upgrade script. For SQL Server, it is MSSQLUpgradeFrom2.5to2.6.sql.
For MySQL, it is MySQLUpgradeFrom2.5To2.6.sql, etc. Run this script in your existing DB. If you are upgrading from a version prior to 2.5, you will need to first run the upgrade script(s) to get your DB up to v2.5. For example, if you are
upgrading from v2.0, you will need to first run the 2.0to2.5 script, and after that, run the 2.5to2.6 script.
6. App_Data folder (for BOTH database and non-database installations)
- Delete from BlogEngine.NET 2.8 installation "App_Data" folder all except "/App_Data/Blogs/_New"
- Copy your existing blog's App_Data folder content to new v2.8 directory
- If you have "App_Data/Blogs/Template" folder in your blog's installation and you not using it as child blog, you should delete it
Note: This step should still be performed even if you are using a database since even with a database, the App_Data folder is still used for storing certain items such as files, images and some other small miscellaneous files.
7. Scripts folder
- Move scripts from /Scritps/Header to /Scripts/Auto
- Move scripts from /Scripts to /Scripts/Auto
to keep working this way. Main reason for this move due to /Scripts folder been a default install directory for NuGet packages and we want to avoid conflicts and keep common conventions with VS and ASP.NET. Make sure you don't have duplicates in the /Scripts/Auto,
all scripts from this folder will be auto-loaded in the alphabetical order. If script depends on the other script, you can rename it to sort properly.
8. Styles folder
- Move css styles from /Styles to /Content/Auto
- If you have any folders under /Styles, move them to /Content
- Delete /Styles folder
9. Theme folder, Robots.txt & Other Custom Files
If you have a custom theme, copy your custom theme folder into the v2.8 "themes" folder. Similarly, if you have customized the robots.txt file, or if you have any other custom files/folders, copy those into the v2.8 folder you have been working
10. Deploy to Web Server
Because you will have files on your web server that no longer exist (or have been moved) in v2.8, it is best to delete all of the BlogEngine.NET files and folders on your web server, and then upload the new v2.8 files and folders you prepared in the previous
Please make sure you have a backup of everything you will delete (see step 1).
After you have deleted the BlogEngine.NET files/folder off your web server, upload the v2.8 files and folders you prepared in the previous steps.
11. Check App_Data folder Write Permissions
If you deleted the App_Data folder in the previous deployment step, you may need to double check that Write permissions are still set on the new App_Data folder you uploaded. Even if you are using the Database storage option, certain items such as
files & images you include in your blog posts are still saved in the App_Data folder. BlogEngine.NET can only save files in the App_Data folder if Write permissions are enabled for the ASP.NET account.
FAQs & Troubleshooting
You might have custom code or extensions/widgets that use script or style references pointing to old locations. You'll have to manually change those references to use /Content instead of /Styles for example. You can use FireBug or alike to identify scripts/styles
that not loaded properly.
- My Syntax Highlighter stopped working
Syntax Highlighter now is a part of TinyMCE. To add it to your current theme, you'll need to update 2 files (check standard theme to see full example):
<link href='<%# Page.ResolveUrl("~/editors/tiny_mce_3_5_8/plugins/syntaxhighlighter/styles/shCore.css") %>' rel="stylesheet" />
<link href='<%# Page.ResolveUrl("~/editors/tiny_mce_3_5_8/plugins/syntaxhighlighter/styles/shThemeDefault.css") %>' rel="stylesheet" />
protected static string ShRoot = Utils.ApplicationRelativeWebRoot + "editors/tiny_mce_3_5_8/plugins/syntaxhighlighter/";
protected void Page_Load(object sender, EventArgs e)
// needed to make <%# %> binding work in the page header
- Trying to upload file with FileManager but getting "Undefined" error
FileManager currently does not work with FireFox web browser due to security restriction on Flash (it also broke BlogEngine.NET 2.7). IE and Chrome have no issues and we are looking into ways to work around this in the future.