Files
Atomcms-edit/fix.sh
T
2026-05-09 17:32:17 +02:00

30 lines
856 B
Bash
Executable File

#!/bin/bash
set -e
echo "=========================================="
echo " AtomCMS Quick Fix Script"
echo "=========================================="
PROJECT_DIR="/var/www/atomcms"
WEB_USER="www-data"
cd "$PROJECT_DIR"
echo "[1/4] Clearing all caches..."
php artisan optimize:clear
echo "[2/4] Fixing file permissions..."
chown -R "$WEB_USER":"$WEB_USER" storage bootstrap/cache public/build 2>/dev/null || true
chmod -R 775 storage bootstrap/cache public/build 2>/dev/null || true
echo "[3/4] Clearing OPcache..."
php -r "if (function_exists('opcache_reset')) { opcache_reset(); echo 'OPcache cleared'.PHP_EOL; } else { echo 'OPcache not enabled'.PHP_EOL; }"
echo "[4/4] Rebuilding view cache..."
php artisan view:cache
echo "=========================================="
echo " Fix complete!"
echo "=========================================="