Website failures are rarely caused by a single issue. Most production outages happen due to multiple small misconfigurations across layers. This guide helps you systematically isolate, diagnose, and fix issues across infrastructure, web servers, runtimes, frameworks, and databases.
Never guess. Always validate layer by layer.
The fastest fixes come from knowing where to look first.
Website loads for some users but not others
Domain works with IP but not with name
SSL fails intermittently
dig example.com +short
dig example.com NS
dig example.com MX
Check propagation:
dig @8.8.8.8 example.com
dig @1.1.1.1 example.com
Wrong A/AAAA records after migration
Old IP cached at ISP level
Cloudflare proxy misconfiguration
Domain expired or nameservers incorrect
Before touching Apache, PHP, or code — check the server itself.
top
htop
df -h
free -m
CPU constantly > 90% → runaway process
Memory almost full → PHP-FPM / Node crash
Disk 100% full → logs, backups, or emails
Swap heavily used → memory pressure
Cron jobs consuming CPU
Backup scripts filling disk
Email queues exhausting storage
Log rotation misconfigured
Code | Meaning |
|---|---|
403 | Permission / ownership issue |
404 | Wrong document root |
502 | Backend (PHP/Node) down |
504 | Backend too slow |
500 | Application-level error |
# Apache
tail -f /var/log/apache2/error.log
tail -f /var/log/httpd/error_log
# Nginx
tail -f /var/log/nginx/error.log
Wrong root or DocumentRoot
PHP-FPM socket mismatch
SELinux blocking access
Incorrect .htaccess rules
White page
500 error
Random crashes under load
php -v
php -m
php --ini
Check PHP-FPM:
systemctl status php-fpm
journalctl -u php-fpm
PHP version upgraded but extensions missing
Memory limit exceeded
OPcache misconfiguration
Wrong PHP-FPM user/group
White Screen of Death (WSOD)
Plugin conflicts after updates
Database connection errors
Disable plugins:
mv wp-content/plugins wp-content/plugins.disabled
Enable debug logging:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Check logs:
wp-content/debug.log
PHP version incompatible with old plugins
Theme using deprecated functions
Corrupted wp_options table
500 Internal Server Error
Storage permission denied
Cache/config mismatch
php artisan key:generate
php artisan config:clear
php artisan cache:clear
php artisan route:clear
Permissions:
chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache
.env missing or incorrect
Cached config after environment change
Queue workers not running
App runs locally but not on server
PM2 app keeps restarting
Build fails on production
node -v
npm -v
pm2 status
pm2 logs
Node version mismatch
Missing environment variables
Memory limit exceeded
Incorrect build output path
Connection refused
Too many connections
Slow queries
systemctl status mysql
mysql -u user -p
SHOW PROCESSLIST;
Disk I/O:
iostat
Database running out of disk space
Large tables without indexes
Corrupted tables after crash
Wrong bind-address
HTTPS warning
Redirect loop
Mixed content errors
openssl s_client -connect example.com:443
Check certificate:
certbot certificates
SSL installed but site URLs still HTTP
Double redirects (Apache + app)
Expired certificate after migration
CPU load
Memory usage
Disk I/O
PHP-FPM workers
Database query time
top
htop
df -h
free -m
Enable OPcache
Use Redis/Memcached
Add CDN
Optimize images
Database indexing
Check DNS & network
Verify server health
Inspect web server logs
Validate runtime (PHP/Node)
Debug framework/CMS
Confirm database health
Fix SSL & security
Optimize performance
Effective website troubleshooting is about methodology, not luck. By isolating issues layer by layer and using logs as the primary source of truth, administrators can resolve outages faster and prevent repeat incidents.