🚨 Quick Diagnostic Commands
# Run these first to identify issues
easyinstall status # Check all services
easyinstall report # Performance report
tail -f /var/log/syslog # System logs
journalctl -xe # Systemd logs
df -h # Check disk space
free -m # Check memory
top # Check CPU usage
📋 Common Installation Problems
1. Installation Fails at Start
# Symptom: "Command not found" or script doesn't run
# Solution: Install required packages
apt update && apt install -y wget curl
# Try again
wget -qO- install.easyinstall.site | bash
2. PHP Repository Error
# Symptom: "Failed to add PPA" or PHP not installing
# Manual PHP repository setup
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
apt update
# Re-run installer
wget -qO- install.easyinstall.site | bash
3. Out of Memory During Installation
# Symptom: Installation hangs or processes get killed
# Check current memory
free -m
# Create larger swap (2GB for 512MB VPS)
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab
# Verify swap
swapon --show
# Resume installation
wget -qO- install.easyinstall.site | bash
4. Package Installation Failed
# Symptom: "Unable to locate package" errors
# Fix package sources
apt update --fix-missing
apt install -f
# Clean apt cache
apt clean
apt autoclean
apt autoremove
# Try installing missing packages manually
apt install -y nginx mariadb-server redis-server
🌐 Domain & SSL Issues
1. Domain Not Working
# Symptom: Domain shows default page or doesn't load
# Check Nginx config
nginx -t
# View error logs
tail -f /var/log/nginx/error.log
# Check if domain is configured
cat /etc/nginx/sites-available/wordpress | grep server_name
# Fix domain configuration
easyinstall domain yourdomain.com -ssl=on
# Reload Nginx
systemctl reload nginx
2. SSL Certificate Failed
# Symptom: Certbot errors or SSL not installing
# Check if domain resolves
dig yourdomain.com
ping yourdomain.com
# Manually install SSL
certbot --nginx -d yourdomain.com -d www.yourdomain.com --non-interactive --agree-tos --email admin@yourdomain.com
# Check certificates
certbot certificates
# Renew certificates
certbot renew --force-renewal
# Test renewal
certbot renew --dry-run
3. Mixed Content Warnings
# Symptom: Site loads but shows mixed content warnings
# Fix in WordPress database
cd /var/www/html/wordpress
wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --skip-columns=guid
wp search-replace 'http://www.yourdomain.com' 'https://www.yourdomain.com' --skip-columns=guid
# Update WordPress URLs
wp option update home 'https://yourdomain.com'
wp option update siteurl 'https://yourdomain.com'
💾 Database Problems
1. Cannot Connect to MySQL
# Symptom: "Can't connect to local MySQL server"
# Check if MySQL is running
systemctl status mariadb
# Start MySQL if stopped
systemctl start mariadb
# Check MySQL error log
tail -f /var/log/mysql/error.log
# Reset root password (if forgotten)
systemctl stop mariadb
mysqld_safe --skip-grant-tables &
mysql -u root
FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';
exit
systemctl restart mariadb
2. Database Corruption
# Symptom: WordPress database errors
# Check database
mysqlcheck -u root -p --all-databases
# Repair database
mysqlcheck -u root -p --repair --all-databases
# Optimize database
mysqlcheck -u root -p --optimize --all-databases
# Check specific WordPress database
mysqlcheck -u root -p wordpress_db
# If still issues, restore from backup
easyinstall restore
3. Lost Database Password
# Find database credentials
cat /root/easyinstall-info.txt
cat /var/www/html/wordpress/wp-config.php | grep DB_
# Reset WordPress database password
DB_PASS=$(openssl rand -base64 24 | tr -dc 'a-zA-Z0-9' | head -c20)
mysql -e "ALTER USER 'wpuser'@'localhost' IDENTIFIED BY '$DB_PASS';"
sed -i "s/define('DB_PASSWORD', '.*');/define('DB_PASSWORD', '$DB_PASS');/" /var/www/html/wordpress/wp-config.php
🚀 Performance Issues
1. Slow Website Loading
# Symptom: Pages take >3 seconds to load
# Check cache status
curl -I http://localhost | grep X-Cache
# Should show HIT, not MISS
# Clear and rebuild cache
rm -rf /var/cache/nginx/*
systemctl reload nginx
# Check PHP-FPM status
systemctl status php*-fpm
tail -f /var/log/php*-fpm.log
# Enable Redis if disabled
easyinstall redis enable
# Check Redis
redis-cli ping
redis-cli info stats | grep keyspace
2. High Memory Usage
# Symptom: Server running out of memory
# Check memory usage
free -m
ps aux --sort=-%mem | head -20
# Optimize PHP (reduce workers)
PHP_VERSION=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
sed -i 's/pm.max_children =.*/pm.max_children = 2/' /etc/php/$PHP_VERSION/fpm/pool.d/www.conf
systemctl restart php$PHP_VERSION-fpm
# Optimize MySQL
cat > /etc/mysql/mariadb.conf.d/99-lowmem.cnf <<EOF
[mysqld]
performance_schema = off innodb_buffer_pool_size = 32M max_connections = 20 EOF systemctl restart mariadb # Clear system caches sync && echo 3 > /proc/sys/vm/drop_caches
3. High CPU Usage
# Symptom: CPU constantly at 100%
# Find CPU hogs
top -bn1 | head -20
ps aux --sort=-%cpu | head -10
# Check for crypto miners
ps aux | grep -E "minerd|cpuminer|xmrig|bitcoin"
# Check Nginx workers
ps aux | grep nginx
# Restart problematic services
systemctl restart php*-fpm
systemctl restart nginx
# Temporarily reduce workers
systemctl stop php*-fpm
systemctl start php*-fpm
🔒 Security Issues
1. Server Under Attack
# Symptom: Unusual traffic, many failed logins
# Check failed login attempts
grep "Failed password" /var/log/auth.log | tail -50
grep "Failed password" /var/log/auth.log | wc -l
# Check Fail2ban status
fail2ban-client status
fail2ban-client status sshd
fail2ban-client status wordpress
# Ban suspicious IPs manually
fail2ban-client set sshd banip 1.2.3.4
# Check current bans
iptables -L -n
# Add rate limiting to Nginx
cat > /etc/nginx/conf.d/rate-limit.conf <<EOF
limit_req_zone \$binary_remote_addr zone=login:10m rate=1r/s;
limit_req zone=login burst=5 nodelay;
EOF
nginx -t && systemctl reload nginx
2. WordPress Hacked
# Symptom: Suspicious files, redirects, malware
# Check for modified files
find /var/www/html/wordpress -type f -name "*.php" -mtime -1 | grep -v wp-content
# Check for suspicious code
grep -r "eval(" /var/www/html/wordpress
grep -r "base64_decode" /var/www/html/wordpress
# Reinstall WordPress core (keeps content)
cd /var/www/html/wordpress
wp core download --force --skip-content
# Reinstall all plugins
wp plugin deactivate --all
wp plugin delete --all
# Reinstall plugins manually
# Reset all user passwords
wp user list --field=ID | xargs -n1 wp user update --user_pass=$(openssl rand -base64 12)
# Check .htaccess and wp-config
cat /var/www/html/wordpress/.htaccess
cat /var/www/html/wordpress/wp-config.php
3. Firewall Blocks Legitimate Traffic
# Symptom: Users can't access site
# Check UFW status
ufw status verbose
# Allow specific IP
ufw allow from 192.168.1.100 to any port 80
# Remove problematic rule
ufw status numbered
ufw delete [number]
# Temporarily disable firewall
ufw disable
# Test access
ufw enable
💾 Backup & Restore Issues
1. Backup Fails
# Symptom: "Backup failed" or incomplete backup
# Check disk space
df -h
# Check backup directory permissions
ls -la /backups
chmod 755 /backups
# Run backup manually with debug
bash -x /usr/local/bin/easy-backup weekly
# Check backup logs
tail -f /backups/logs/backup-*.log
# Create backup manually
mysqldump -u root -p wordpress_db > /root/manual_db.sql
tar -czf /root/manual_files.tar.gz /var/www/html/wordpress
2. Restore Fails
# Symptom: Restore command doesn't work
# Check if backup exists
ls -la /backups/weekly/
# Manual restore
LATEST_BACKUP=$(ls -td /backups/weekly/*/ | head -1)
gunzip -c $LATEST_BACKUP/database.sql.gz | mysql
tar -xzf $LATEST_BACKUP/wordpress-files.tar.gz -C /var/www/html/
chown -R www-data:www-data /var/www/html/wordpress
# Fix permissions after restore
chown -R www-data:www-data /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress
3. Remote Storage Not Working
# Symptom: easyinstall remote commands fail
# Check rclone config
rclone config show
rclone config file
# Test remote
rclone ls remote-name:
# Reconfigure remote
rclone config delete remote-name
rclone config create remote-name drive config_is_local=false
# Check connectivity
curl -I https://api.google.com
📡 Service Failures
1. Nginx Won’t Start
# Symptom: systemctl status nginx shows failed
# Check config
nginx -t
# View error details
journalctl -u nginx -xe --no-pager
tail -f /var/log/nginx/error.log
# Common fixes
# Port 80 already in use
netstat -tulpn | grep :80
killall apache2 2>/dev/null
# Syntax error
# Fix the error shown in nginx -t output
nano /etc/nginx/sites-available/wordpress
# After fixing
nginx -t && systemctl start nginx
2. PHP-FPM Won’t Start
# Symptom: PHP pages not loading
# Check PHP-FPM status
systemctl status php*-fpm
# Find PHP version
ls /etc/php/
# Check logs
tail -f /var/log/php*-fpm.log
# Common fixes
# Socket file missing
ls -la /run/php/
# Restart with debug
php-fpm -F -y /etc/php/8.2/fpm/php-fpm.conf
# Fix permissions
chown -R www-data:www-data /run/php/
chmod 755 /run/php/
3. Redis Connection Failed
# Symptom: WordPress shows Redis connection error
# Check Redis
systemctl status redis-server
redis-cli ping
# Should return PONG
# Check Redis config
cat /etc/redis/redis.conf | grep bind
# Should be bind 127.0.0.1
# Restart Redis
systemctl restart redis-server
# Test WordPress connection
cd /var/www/html/wordpress
wp redis status
wp redis enable
📊 Monitoring Issues
1. Netdata Not Accessible
# Symptom: Cannot access http://server-ip:19999
# Check Netdata status
systemctl status netdata
# Check if port is listening
netstat -tulpn | grep 19999
# Check firewall
ufw status | grep 19999
ufw allow 19999/tcp
# Restart Netdata
systemctl restart netdata
# Check Netdata logs
journalctl -u netdata -xe --no-pager
2. Glances Not Working
# Symptom: Cannot access http://server-ip:61208
# Check Glances service
systemctl status glances
# Check if running
ps aux | grep glances
# Restart Glances
systemctl restart glances
# Run manually for debugging
glances -s -B 0.0.0.0 -p 61208
# Check firewall
ufw allow 61208/tcp
3. No Alerts Received
# Symptom: Telegram/email alerts not coming
# Check monitor logs
tail -f /var/log/advanced-monitor.log
# Test email
echo "Test" | mail -s "Test" admin@example.com
# Test Telegram
curl -X POST "https://api.telegram.org/bot$TOKEN/sendMessage" -d "chat_id=$CHAT_ID" -d "text=Test"
# Reconfigure Telegram
setup-telegram
# Check cron jobs
crontab -l
cat /etc/cron.d/easyinstall-monitor
🔄 Update Issues
1. WordPress Update Fails
# Symptom: Cannot update WordPress or plugins
# Check permissions
chown -R www-data:www-data /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress
chmod -R 775 /var/www/html/ez.easyinstall.site/wp-content
# Manual update via WP-CLI
cd /var/www/html/wordpress
wp core update
wp plugin update --all
wp theme update --all
# If WP-CLI fails, manual update
cd /var/www/html
mv wordpress wordpress_old
wget https://wordpress.org/latest.zip
unzip latest.zip
cp wordpress_old/wp-config.php wordpress/
cp -r wordpress_old/wp-content/uploads wordpress/wp-content/
chown -R www-data:www-data wordpress
2. PHP Version Upgrade Issues
# Symptom: Site breaks after PHP upgrade
# Check current PHP
php -v
ls /etc/php/
# Switch back to old PHP
a2dismod php8.3
a2enmod php8.2
systemctl restart apache2 2>/dev/null
systemctl restart php8.2-fpm
systemctl restart nginx
# Update Nginx to use correct PHP
PHP_VERSION="8.2"
sed -i "s|unix:/run/php/php[0-9]\.[0-9]-fpm.sock|unix:/run/php/php$PHP_VERSION-fpm.sock|g" /etc/nginx/sites-available/wordpress
nginx -t && systemctl reload nginx
🛠️ Command-Line Troubleshooting Tools
Quick Diagnostic Script
#!/bin/bash
# Save as /tmp/diagnose.sh and run: bash /tmp/diagnose.sh
echo "=== SYSTEM ==="
echo "Uptime: $(uptime)"
echo "Memory: $(free -h | grep Mem)"
echo "Disk: $(df -h / | tail -1)"
echo -e "\n=== SERVICES ==="
for service in nginx php*-fpm mariadb redis-server fail2ban netdata; do
status=$(systemctl is-active $service 2>/dev/null || echo "not found")
echo "$service: $status"
done
echo -e "\n=== PORTS ==="
netstat -tulpn | grep -E ":80|:443|:3306|:6379|:19999|:61208"
echo -e "\n=== WORDPRESS ==="
if [ -f "/var/www/html/wordpress/wp-config.php" ]; then
echo "WordPress: Installed"
grep DB_NAME /var/www/html/wordpress/wp-config.php | head -1
else
echo "WordPress: Not found"
fi
echo -e "\n=== BACKUPS ==="
ls -la /backups/weekly/ 2>/dev/null | head -5 || echo "No backups found"
echo -e "\n=== LOG ERRORS (last 10) ==="
tail -10 /var/log/syslog | grep -i error
Run the diagnostic
bash /tmp/diagnose.sh
📞 Emergency Contact Commands
# Create support bundle
tar -czf /tmp/easyinstall-support.tar.gz \
/root/easyinstall-info.txt \
/var/log/nginx/error.log \
/var/log/php*-fpm.log \
/var/log/mysql/error.log \
/var/log/advanced-monitor.log \
/etc/nginx/sites-available/wordpress \
/etc/php/*/fpm/php.ini \
/etc/mysql/mariadb.conf.d/* \
2>/dev/null
echo "Support bundle created: /tmp/easyinstall-support.tar.gz"
✅ Quick Fix Summary
| Problem | Quick Fix Command |
|---|---|
| All services down | systemctl restart nginx php*-fpm mariadb redis-server |
| Site not loading | nginx -t && systemctl reload nginx |
| Database error | mysqlcheck -u root -p --repair --all-databases |
| Out of memory | sync && echo 3 > /proc/sys/vm/drop_caches |
| SSL expired | certbot renew --force-renewal |
| Cache issues | rm -rf /var/cache/nginx/* && systemctl reload nginx |
| Permission issues | chown -R www-data:www-data /var/www/html/wordpress |
| WordPress broken | cd /var/www/html/wordpress && wp core download --force |
| Failed login attacks | fail2ban-client set sshd banip ATTACKER_IP |
| Backup failed | df -h && rm -rf /backups/weekly/*/database.sql.gz 2>/dev/null |
Still having issues? Run this diagnostic and share the output:
wget -qO- https://raw.githubusercontent.com/sugandodrai/easyinstall/main/diagnose.sh | bash
Support the developer: PayPal ☕
