Upgrading to ExpressionEngine 2

I recently upgraded this site’s content management system from ExpressionEngine 1.7 to 2.2. I had been holding off on the upgrade, as it always ends up taking more time than expected. I also did not like some of the changes from version 1.x to 2.x, but there were enough advantages to finally merit an upgrade.

Upgrade errors

When I first ran the upgrade, there were some on-screen errors which did not inspire a whole lot of confidence and harken back to the beta software (I experienced many errors when trying to use the beta version, which is one reason I delayed the upgrade for so long). The upgrade eventually went through fine. I basically just clicked through the errors. Why they were there in the first place, I’m not sure.

Multiple Site Manager

I ran into some issues upgrading the multiple site manager that I don’t see documented anywhere, so I’ll make a note of them here. According to the MSM update instructions, all you need to do is replace a few files. From the standpoint of the control panel that’s all you need to do. However, in order to get the individual sites working, there are some other steps required.

I found that I needed to copy the primary index.php and admin.php to the individual site directories, and then modify as appropriate. This is the same process that you would use when setting up a domain or sub-domain. My sites didn’t show up after updating the MSM files per the documentation—but after copying these two files and editing for each site, the sites were functional once again.

Note: Do not uncomment the MSM information in the primary index.php and admin.php. Only do that for each domain or sub-domain. The comments in both index.php and admin.php state: Uncomment the following variables if you are using the Multiple Site Manager: http://expressionengine.com/user_guide/cp/sites. Only do that once you have copied these files into your directory for the domain or sub-domain you are managing. You will want to leave those comments in place for the primary index.php and admin.php.

One of my sites did not display correctly after configuring the multiple site manager settings. I eventually discovered this was due to how I used the the global variable {site_url} in the site templates, and how I edited index.php. In index.php, there is a line to specify site_url. When the site was set up originally, I included a trailing slash in the site_url. When I edited the new index.php, I did not include the trailing slash at the end of the URL, which broke links to CSS files, and links between site sections. This is something to be aware of if you use {site_url} in your templates.

Leftover files

I noticed that the path.php was leftover from ExpressionEngine version 1.x and is not needed once the system is upgraded to 2.x. The path.php file will also be present in your site domain or sub-domain folders if you are using the multiple site manager. You can move this to a backup folder or delete it. If you renamed files and folders to “_old” per the update instructions, move those to a backup folder or delete once the upgrade is successful.

Updating the templates

During the upgrade process, weblog is automatically replaced with channel in your templates. There are a few other manual changes that need to be made. Mike Boyink authored a helpful article that outlines the necessary steps when updating your templates from 1.x to 2.x code.

Unanswered questions

Why do both index.php and admin.php have a system_path variable? Maybe this is related to the CodeIgniter framework, but it seems like the variable should only be in one place. The same goes for the multiple site manager settings in both documents.

What is the purpose of the “Synchronize Files” command in the file manager? Running the command generates errors for all the images in my portfolio, even though they display just fine on the site. According to the error message, they exceed a maximum file size. Unfortunately, the documentation does not make it much clearer.


I had been using the LG .htaccess Generator to remove index.php from the URLs. Now that ExpressionEngine has official support for clean URLs, I manually edited the .htaccess files instead.

Final thoughts

The upgrade process was not as smooth as I would have liked, and I have noticed some frustrating bugs such as the Writemode not working in Firefox, and the login screen intermittently not working in Firefox. However, there are enough improvements in the new software to make the upgrade worthwhile. And as long as I recommend and implement ExpressionEngine for clients, it would be irresponsible not to be up to date on the latest version.

An automatic one-click update as seen in other software platforms would be desirable, but the system seems complicated enough that I don’t see this happening soon. I am hopeful for future improvements now that EllisLab hired someone versed in design and is officially listening.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: