Log Manager
Two tools are provided for manual cleanup of existing large log files:
Option 1: Web Interface (Recommended)
Access the web-based log manager in your browser:
https://your-site.com/rw/elements/com.realmac.corepack/api/log-manager.phpFirst Time Setup:
Access the URL in your browser
You'll see a first-time setup screen
Create a secure password (minimum 6 characters)
Password is saved and persists across updates
View stats and clean up logs with a click
Password Reset
If you ever need to reset your password, simply delete the following file from your server:
/rw/elements/com.realmac.corepack/api/.log-manager-password
The next time you access the Log Manager, you’ll be prompted to create a new password.

Once you’ve set a password and logged in, you’ll gain access to the Log Manager dashboard. From there, you can easily review log statistics, clean up all logs at once, or view and remove individual log files as needed.

Option 2: Command Line Utility
For users with SSH access:
# Show current log statistics
php cleanup-logs.php --stats
# Preview what would be deleted (dry run)
php cleanup-logs.php --dry-run
# Clean logs older than 7 days (default)
php cleanup-logs.php
# Clean logs older than 30 days
php cleanup-logs.php --days=30
# Show help
php cleanup-logs.php --helpRunning the Cleanup Script Manually
Navigate to the API directory:
cd /path/to/your/site/rw/elements/com.realmac.corepack/api/Run the script:
php cleanup-logs.php --statsReview the output and then run cleanup:
php cleanup-logs.ph
Optional: Set Up Cron Job
For high-traffic sites, set up a weekly cron job:
# Edit crontab
crontab -e
# Add weekly cleanup (every Sunday at 2am)
0 2 * * 0 /usr/bin/php /path/to/rw/elements/com.realmac.corepack/api/cleanup-logs.php --days=7 > /dev/null 2>&1Last updated
Was this helpful?

