Knowledge Base

Troubleshooting Common Errors

Troubleshooting Common Errors

When things go wrong (and occasionally they will), don't panic! This guide will help you diagnose and fix the most common hosting issues.

The Golden Rules of Troubleshooting

Before diving into specific issues:

  1. Check the error logs - They usually tell you exactly what's wrong
  2. Think about what changed - Did you update something recently?
  3. Clear your cache - Both browser and server-side
  4. Try incognito mode - Rules out browser caching/extensions
  5. Check if it's just you - Use downforeveryoneorjustme.com

Website Errors

500 Internal Server Error

The catch-all "something's broken" error. Common causes:

PHP Error:

  1. Enable error display temporarily:
    // In wp-config.php or at top of index.php
    ini_set('display_errors', 1);
    error_reporting(E_ALL);
  2. Check error logs for the specific error
  3. Fix the underlying PHP issue

Corrupted .htaccess:

  1. Rename .htaccess to .htaccess.backup via File Manager
  2. If site works, your .htaccess was the problem
  3. Regenerate in WordPress: Settings > Permalinks > Save

.htaccess syntax error:

# This will cause 500 error:
RewriteEngine On
RewriteRule ^(.*)$ index.php [L   # Missing bracket!

# Fixed:
RewriteRule ^(.*)$ index.php [L]

Permission issues:

# Fix directory permissions
find /home/user/public_html -type d -exec chmod 755 {} \;

# Fix file permissions
find /home/user/public_html -type f -exec chmod 644 {} \;

[SCREENSHOT: Error log showing a 500 error cause]

503 Service Unavailable

Server is overloaded or PHP workers exhausted.

Immediate fixes:

  1. Check if a cron job or process is consuming resources
  2. Kill runaway processes
  3. Wait for automatic recovery

Long-term fixes:

  1. Increase PHP-FPM workers
  2. Add caching (page cache, object cache)
  3. Optimise slow database queries
  4. Upgrade hosting plan

504 Gateway Timeout

Backend took too long to respond.

Causes:

  • Slow database queries
  • External API timeouts
  • Heavy processing tasks
  • Infinite loops in code

Fixes:

  1. Increase PHP max_execution_time
  2. Optimise slow operations
  3. Add timeouts to external API calls
  4. Profile code to find bottlenecks

403 Forbidden

Access denied. Possible causes:

  1. No index file:

    • Create an index.html or index.php
    • Or enable directory listing (not recommended)
  2. File permissions wrong:

    chmod 644 filename.php
    chmod 755 directory/
  3. ModSecurity blocking:

    • Check ModSecurity logs
    • Whitelist if false positive
  4. Directory protection enabled:
    • Check for .htpasswd files
    • Remove or update credentials

404 Not Found

The file or page doesn't exist.

For missing pages:

  1. Check the URL for typos
  2. Verify the file exists on server
  3. Check permalink settings (WordPress)
  4. Look for redirect rules that might interfere

For missing resources (CSS/JS/images):

  1. Check file paths in code
  2. Verify files were uploaded
  3. Check case sensitivity (Linux is case-sensitive!)

White Screen of Death (WSOD)

A blank white page, often in WordPress.

Quick fixes:

  1. Increase PHP memory:

    // wp-config.php
    define('WP_MEMORY_LIMIT', '256M');
  2. Enable debug mode:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', true);
  3. Disable all plugins via FTP:

    • Rename /wp-content/plugins to /wp-content/plugins_disabled
    • If site works, enable plugins one by one
  4. Switch to default theme:
    • Rename your theme folder in /wp-content/themes/
    • WordPress will fall back to a default theme

Database Errors

"Error Establishing Database Connection"

The most feared WordPress error!

Check credentials:

  1. Open wp-config.php
  2. Verify these match your database settings in Enhance:
    define('DB_NAME', 'your_database');
    define('DB_USER', 'your_username');
    define('DB_PASSWORD', 'your_password');
    define('DB_HOST', 'localhost');

Check database exists:

  1. Log into Enhance
  2. Go to Databases
  3. Verify the database is listed

Check user permissions:

  1. Ensure database user is assigned to the database
  2. Verify user has all necessary privileges

Repair database:

// Add to wp-config.php temporarily:
define('WP_ALLOW_REPAIR', true);

Then visit: yourdomain.com/wp-admin/maint/repair.php

[SCREENSHOT: Database configuration check in Enhance]

"MySQL Server Has Gone Away"

Connection dropped during query.

Causes:

  • Query timeout
  • Packet too large
  • Server restart

Fixes:

  1. Increase max_allowed_packet in MySQL config
  2. Optimise slow queries
  3. Check for server resource issues

"Too Many Connections"

Database connection limit reached.

Quick fixes:

  1. Restart MySQL/MariaDB (if you have access)
  2. Wait for connections to timeout

Permanent fixes:

  1. Use persistent database connections
  2. Implement connection pooling
  3. Optimise queries to be faster
  4. Increase connection limit - get in touch with us and we'll sort it

Email Issues

"Emails Not Sending"

Check SMTP settings:

  1. Verify server, port, username, password
  2. Common ports: 587 (TLS), 465 (SSL), 25 (unencrypted)
  3. Test with a simple script

Check mail logs:

tail -100 ~/logs/mail.log

WordPress-specific:

  1. Install WP Mail SMTP plugin
  2. Configure with your SMTP settings
  3. Use the test email feature

"Emails Going to Spam"

DNS checks:

  1. Verify SPF record exists and is correct
  2. Set up DKIM signing
  3. Configure DMARC policy

Test your email setup:

Content checks:

  • Avoid spammy words ("FREE!!!", "Act Now")
  • Include unsubscribe link for bulk emails
  • Don't send from a new domain to many recipients

"Not Receiving Emails"

  1. Check MX records point to correct server
  2. Verify mailbox isn't full
  3. Check spam/junk folder
  4. Verify email forwarding isn't misconfigured
  5. Check for server-side filters

SSL/HTTPS Issues

"Your Connection Is Not Private"

Certificate expired:

  1. Renew certificate in Enhance
  2. Let's Encrypt should auto-renew; check for errors

Certificate mismatch:

  1. Verify certificate matches domain name
  2. Check for www vs non-www issues
  3. Verify all subdomains are covered

Mixed content:

# In .htaccess or nginx config:
# Force HTTPS

Mixed Content Warnings

HTTP resources loading on HTTPS page.

Finding mixed content:

  1. Open browser developer tools (F12)
  2. Look in Console for warnings
  3. Network tab shows blocked resources

Fixing in WordPress:

  1. Install "Better Search Replace" plugin
  2. Replace http://yourdomain.com with https://yourdomain.com
  3. Update CDN URLs if applicable

SSL Certificate Won't Issue

Let's Encrypt troubleshooting:

  1. DNS not propagated:

    • Wait for propagation
    • Verify A record with dig yourdomain.com
  2. CAA record blocking:

    • Check CAA records
    • Add 0 issue "letsencrypt.org" if needed
  3. Rate limited:

    • Let's Encrypt has rate limits
    • Wait and retry, or use staging environment
  4. Port 80 blocked:
    • HTTP validation requires port 80
    • Check firewall rules

Performance Issues

Site Loading Slowly

Diagnose:

  1. Use GTmetrix, Pingdom, or PageSpeed Insights
  2. Check which resources are slow
  3. Monitor resource usage in Enhance

Common fixes:

  1. Enable caching
  2. Optimise images
  3. Use a CDN
  4. Minify CSS/JS
  5. Reduce plugin count

See our Performance Optimization Guide for details.

Database Queries Slow

  1. Check slow query log
  2. Add indexes to frequently searched columns
  3. Optimise queries
  4. Use object caching (Redis/Memcached)

Connectivity Issues

"Connection Timed Out"

Server-side:

  1. Check server is running
  2. Verify firewall isn't blocking
  3. Check resource usage

Client-side:

  1. Try different network
  2. Try different browser
  3. Check DNS resolution

Can't Connect via FTP/SSH

  1. Verify credentials
  2. Check port (22 for SSH/SFTP, 21 for FTP)
  3. Verify account is enabled
  4. Check if your IP is blocked
  5. Try different client

Emergency Recovery

Complete Site Recovery Checklist

  1. Don't panic - Breathe!
  2. Assess the situation - What's actually broken?
  3. Check backups - When was the last good backup?
  4. Review changes - What changed recently?
  5. Check logs - What do they say?
  6. Fix or restore - Either fix the issue or restore from backup
  7. Document - Note what went wrong and how you fixed it
  8. Prevent - Set up monitoring/alerts

When to Contact FXRM Support

Open a support ticket if you're experiencing:

  • Server-level issues you can't access
  • Suspected security breach
  • Data loss without backup
  • Persistent unexplained errors
  • Hardware failures

When contacting us, please include:

  • Domain name(s) affected
  • Error messages (exact text or screenshots)
  • When the issue started
  • What you've already tried
  • Recent changes made

Next Steps: Speed up your site with our Performance Optimization Guide.

Please rate this article to help us improve our Knowledge Base.

0 0