Updating a TYPO3 website's content after doing an upgrade is a task that must always be done before going Live with the upgraded website version.
This is because, the current Live website's content must have changed from the time you started doing the upgrade to the time you are about to go Live.
It is not feasible for one to go into the database of the current live website (the old TYPO3 version website) and find all records that have been added or updated, and then manually update or insert these records in the database of the upgraded website.
There has to be a way to quickly and easily do this content update.
This blog post will be showing you steps to follow to do a content update on an upgraded TYPO3 website.
Solution:
The idea behind this method is that, the only reason why we cannot use the database of an older TYPO3 LTS version on a newer LTS version is because TYPO3 and extensions in the new LTS version require some fields and or tables which will be missing in the database from the older LTS version.
Luckily for us, these missing fields and or tables can be automatically added using the Upgrade Wizard in the Install Tool.
Create missing fields and tables
- Export the database from the current Live website. That is the website with the older LTS version you upgraded from.
- Import the exported database into the upgraded website. That is the website with the newer LTS version.
- On the instance with the new LTS version, go to the Install Tool at
example.org/typo3/install.php
whereexample.org
is your website's domain. - If the Install Tool is locked, follow the displayed instructions to unlock it.
- Once inside the Install Tool, click on Upgrade in the left menu.
- Click on the Run Upgrade Wizard button.
- In the modal that opens, scroll down until you see a Create missing tables and fields button.
- Click this button and wait until the operation is completed.
- Next, execute all the "undone" upgrade wizards.
Database clean up
Next is to clean up the database and remove all unused tables and fields.
- In the Install Tool, click on Maintenance in the left menu.
- Click on the Analyze database button.
- Select all the select/deselect all checkboxes.
- Click on the Apply selected changes button and wait for the process to be completed.
- Repeat steps 3 and 4 again.
- You should see the text "Database schema is up to date. Good job!". It means your database structure is okay has been cleaned up.
Update pictures and files
Since files and or pictures may have been added or removed, these must be updated too.
- In the upgraded project, create a backup of the
fileadmin
folder. - Replace the
fileadmin
folder of the upgraded website with a copy of thefileadmin
folder of the current Live website.
If the fileadmin folder from the Live website has files like HTML templates, form definitions or other files which have been commited to Git,
replace these with the corresponding files from the backed up fileadmin folder.
The backed up filedadmin folder has the updated version of these files.
And there you go, all the content of your upgraded website is now thesame as that of the current Live website and you can now setup the upgraded website on a server and go Live.
Thats it for this post, but if you have any problems regarding this article, don't hesitate to contact me via the contact form or Slack(Slack name: mbigha) and I will gladly help.