Updating
Keep your Timecrack installation up to date by pulling the latest changes from GitHub and running a few commands.
Before You Update
Always back up your database and .env file before performing an update:
mysqldump -u your_db_user -p timecrack > timecrack_backup.sql
cp .env .env.backup Important: Never skip the backup step. If something goes wrong during the update, you can restore your database and configuration from these backups.
Update Steps
From your Timecrack installation directory, run the following commands:
- Pull the latest changes from GitHub:
git pull origin main - Install any new or updated PHP dependencies:
composer install - Run database migrations to apply schema changes:
php artisan migrate - Clear application caches:
php artisan cache:clear && php artisan config:clear
Tip: If you have compiled front-end assets, you may also need to run npm install && npm run build to update them.
Checking Your Current Version
You can check your current Timecrack version by running php artisan --version from the command line, or by checking the latest commit with git log -1.
Troubleshooting Updates
If you encounter issues after updating:
- Check the Laravel log at
storage/logs/laravel.logfor error details - Ensure file permissions are correct (the
storageandbootstrap/cachedirectories must be writable) - Try clearing all caches:
php artisan optimize:clear - If migrations fail, restore your database backup and check the release notes for version-specific instructions