Creating TYPO3 Backup and Performing Updates: Guide
TYPO3 Backup and Updates: Safe Maintenance
Regular maintenance of your TYPO3 website is crucial for security and stability. At Theory7, we recommend at least monthly updates and weekly backups. In this guide, we explain how to perform this safely without downtime or data loss.
Why Backups are Essential
A backup is your safety net in case of problems. Without a backup, you can lose everything due to a failed update, a hack, or server disruption. We often see clients regretting not having a recent backup.
A complete TYPO3 backup consists of three components that you need to restore your site.
Creating a Complete TYPO3 Backup
Step 1: Export the Database
The database contains all your content, users, and configuration. Export using mysqldump:
mysqldump -u username -p database_name > backup.sql
Or via the TYPO3 backend: go to Admin Tools and choose Database Compare to create an export.
Step 2: Backup the fileadmin Folder
The fileadmin folder contains all uploaded files such as images, PDFs, and documents:
This folder can be large, depending on how much media you have uploaded.
Step 3: Backup the typo3conf Folder
The typo3conf folder contains your site configuration, extensions, and templates:
For Composer installations, also back up the composer.json and composer.lock files.
Step 4: Store Backup in an External Location
Do not keep backups only on the same server. Copy them to an external location:
Or use cloud storage such as Amazon S3 or Google Cloud Storage.
Setting Up Automatic Backups
Create a backup script that combines all steps:
#!/bin/bash
mysqldump -u username -p database_name > backup.sql
cp -r fileadmin /path/to/backup/
cp -r typo3conf /path/to/backup/
Schedule this via crontab:
0 * * * * /path/to/backup_script.sh
Updating TYPO3 via Composer
Modern TYPO3 installations use Composer for updates. This is the safest method.
Step 1: Create a Backup
Always create a backup first before updating. If something goes wrong, you can quickly revert.
Step 2: Check for Available Updates
Check which updates are available:
composer outdated
This shows all TYPO3 core and extension updates.
Step 3: Execute Updates
Update the TYPO3 core:
composer update typo3/cms-core
Or update everything at once:
composer update
Step 4: Update Database Schema
After each update, check the database schema:
php typo3/sysext/core/bin/typo3 database:updateschema
Step 5: Clear Cache
Clear all caches to ensure the new code is used:
php typo3/sysext/core/bin/typo3 cache:flush
Check After the Update
After each update, thoroughly test your website:
- Frontend check - Review all important pages
- Backend check - Log in and verify everything works
- Test forms - Submit test forms
- Extension functions - Test specific extension functionality
- Error logs - Check TYPO3 and server logs for errors
Troubleshooting Update Issues
Extension Incompatibility
Sometimes an extension is not compatible with the new TYPO3 version. Check the extension page on TER for compatibility info.
Database Errors
If you encounter database errors after an update:
This shows exactly what schema changes are needed.
Cache Problems
For strange errors after an update, first clear all caches:
php typo3/sysext/core/bin/typo3 cache:flush
Update Frequency
We recommend the following update frequency:
- Security updates: Install immediately
- Minor updates: Within a week
- Major updates: Schedule this with testing time
Do not wait too long with updates. The longer you wait, the harder it becomes to update.
Related Articles
Need Help?
We are here for you! Are you facing any issues or have questions? Our support team is happy to assist you personally. Send us a message via the ticket system - we usually respond within a few hours and are happy to help.
0 van 0 vonden dit nuttig