How to upgrade typo3?
All of us will be happy to upgrade ourselves to a better state and the same for Typo3 also. The new Typo3 versions will always be easier to manage and more secure.
First of all take a backup of your entire webroot folder and the database, so that you can roll back the changes if something goes wrong .
You can save the database by using phpMyAdmin or using this command in console
mysqldump -a --add-drop-table -u'database user name' -p'password'
-h'host' databasename > databasename_date.sql
Go to http://typo3.org/download/ and download the latest version of typo3. In case you’re are using a very old version of Typo3, then it’ll be better to have a look a look at this link: http://wiki.typo3.org/Upgrade, because it’s more easy to debug the errors if you have a step by step upgrade the new version in the following way:
Typo3 4.0, 3.8.x or below to Typo3 4.1
Typo3 4.1 to Typo3 4.2.
Typo3 4.2 to Typo3 4.4.
Typo3 4.4 to Typo3 4.5 (If you’re not using any complicated extensions then sometimes 4.2 – 4.5 will not cause any problem.)
Typo3 4.5 to Typo3 4.6 (Need php 5.3).
Convert global extensions to local extensions
The global extensions used to be saved in folders inside typo3/ext/, such as typo3/ext/realurl. In current versions of TYPO3, this location should no longer be used. Instead, save local extensions in typo3conf/ext/[Ext-Name]. (Note typo3conf/ instead of typo3/.)
To convert a global extension to a local one, do the following:
- Go to the Extension Manager.
- Uninstall the global extension.
- Delete the files of the extension from typo3/ext/[Ext-Name], including the directory typo3/ext/[Ext-Name] itself.
Reinstall the extension from TER as local.
Note: If you have local and global version of the same extension then the local version takes precedence.
Installing a new TYPO3 version
- Unzip the package that we’ve downloaded from typo3.org. Check the current way in which the typo3 core files are handled in the website. If the core files are symlinked to a typo3 source folder, then just unlink the folder and link to the new typo3 source folder. The step by step procedure is as follows:
- Extract the source code package.
- Unlink the old typo3_src folder.
Or delete old typo3_src folder.
- Link the typo3_src folder to the new typo3 version’s directory.
ln -s ../typo3_src-4.6.7 typo3_src
- Make sure that the core files are pointed to the new ones.
If there is no separate source and dummy part, copy and replace all the existing core files (just rename the old one and copy the new ones).
- Upgrading the database after installing a new version
- Go to the typo3 backend of current installation and login as an admin user.
Click on “Install tool” module. (We can also access it by appending typo3/install to the URL of the website). If it’s locked then we need to create an empty file named “ENABLE_INSTALL_TOOL” in the “typo3conf/” folder. Otherwise use the “Create Install Tool Enable File” option available in the User settings (“User Tools> User Settings> Admin Functions>->”Create Install Tool Enable File”). Now again go to “Install tool”.
- Use Upgrade Wizard:
Click on “Install Tool > Upgrade Wizard”. Read the instructions and do the rest.
- In section “Database Analyzer”:
Click “Update required tables”
Click “COMPARE” and “IMPORT” and apply the proposed changes. If there’s no issue mentioned then select the check boxes and click on “Write to database”. Repeat this procedure as often as it is recommended.
- In section “Basic Configuration”:
If no Encryption Key is set, set an Encryption Key. (It is likely that the Encryption Key is not set, if you are updating from a TYPO3 version prior to 4.1.)
- Go to the typo3 backend of current installation and login as an admin user.
- Click on “Admin Tools > DB Check” and select check the “Reference Index” or “Manage Reference index” from the drop down list. Run first “Check reference index” and if there exists changes to be made, use the update option. Finally we’ll see the message -“Index Integrity is perfect”.
- Delete all the cached files – temp_CACHED* files in the typo3 folder.
Update the local extensions
Once we have completed the typo3 upgradation, we should update the typo3 extensions also to avoid extension compatibility issues. This can be easily done using the extension manager “Check for extension updates” option.
Note: Don’t update the hacked extensions. Otherwise implement hacks after updating them.
Some simple ways to find out the errors/issues after upgrading typo3!
- Check the symlinks.
Usually we point the typo3, t3lib, index.php to the folders/files inside typo3_src folder which is symlinked to the typo3 source package (typo3_src_4.5 etc). Sometimes even after symlinking the source folder, symlinks may point to the older version. In this case we need to symlink the typo3, t3lib &index.php to the folders/files inside the typo3 source folder after symlinking the typo3 source (typo3_src) folder to the new typo3 source.
- Use upgrade wizard.
If you’re not sure whether the upgrade is complete or not then check the “Install tool > Upgrade Wizard” for current typo3 version and do the steps mentioned in it.
- Set Display errors to 2.
Getting a blank backend or front end is very common after upgrade. This might be due to some php errors, compatibility issues etc. An easy way to find the error is to set
“Install tool> All Configuration > displayerrors” to 2 and add our IP address to
“Install tool> All Configuration > devIPmask” so that the errors will be visible only for our IP.
- Clear typo3temp.
Empty the typo3temp folder. Otherwise rename the existing one and create a new one.
- Delete the cached files.
Remove the typo3_cached files in “typo3conf” folder.
- Find out extension conflicts.
If none of the above methods allow you to work with the new typo3 version, then there’s a chance for extension conflict. A simple way is to rename the “typo3conf/ext” folder (to something like “typo3conf/ext_renamed”) and create a new empty “typo3conf/ext” folder. Check the backend. If it works fine, then it’s clear that there’s an extension conflict. Bring back the “typo3conf/ext” folder and test the extensions inside it (here also the renaming method can be used – rename the extensions one by one and check whether the backend is ready or not).
- Check the error log.
Go through the error log and findout what’s missing or what’s problem with our new installation. Make sure that source file/folder permissions are correct.
- Debug “typo3conf/localconf.php” file.
Comment all the details in localconf.php file except the data needed for database connection. If backend is available after doing so, the comment it sectionwise and continue debugging. Make sure that required extensions mentioned in localconf.php are available.
(like : $TYPO3_CONF_VARS[‘EXT’][‘requiredExt’] = ‘cms,lang,sv,restrictlogin’; )
We can also find out the errors by adding
at the end of localconf file.
Note: While upgrading to typo3 4.6 make sure that you’re using Php 5.3 and the SOAP module is enabled. Before you upgrade always have a look at the typo3 version requirements in typo3 wiki.
- Shortcut links not working after typo3 upgrade for multilingual sites.
In multilanguage websites after typo3 upgrade the shortcuts works fine for default language pages but not in other languages. The reason is – for alternative language the pages will be in “Standard” mode which worked old typo3 versions but not in latest typo3 versions. So just changing “Standard” mode to “Shortcut” mode for alternative page languages will solve the issue.
- New extension manager.
The new extension manager may appear a little bit confusing but it’s very simple and efficent. Even though our eyes may not find the options that we’d used earlier very easily, they still exist.
eg: How to get the old version of a typo3 extension?
- Merging css files and java-script as a built in feature.
From typo3 4.6 onwards we can merge and minify the css and js files that are used in our website by using the new typo3 features like:
config.concatenateJsAndCss = 1
config.concatenateJs = 1
config.concatenateCss = 1
- Check status report.
Check the typo3 status report to get an overview of the site’s parameters as well as any problems detected with the installation.
I hope now you’re using the latest typo3 version :). Enjoy!