Fixing Common WordPress Errors

WordPress errors can be frustrating, but most have straightforward solutions. This guide covers the most common errors and how to fix them.

White Screen of Death (WSOD)

A blank white page with no error message.

Causes:

  • PHP memory limit exceeded
  • Plugin or theme conflict
  • PHP errors

Solutions:

  1. Enable debug mode - Add to wp-config.php:
    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    Check wp-content/debug.log for errors.
  2. Increase memory limit - Add to wp-config.php:
    define('WP_MEMORY_LIMIT', '256M');
  3. Disable plugins via FTP - Rename wp-content/plugins folder to plugins_old
  4. Switch theme via database - In phpMyAdmin, change template and stylesheet values in wp_options

Error Establishing Database Connection

WordPress cannot connect to the database.

Solutions:

  1. Verify wp-config.php credentials (DB_NAME, DB_USER, DB_PASSWORD, DB_HOST)
  2. Check that database exists in cPanel → MySQL Databases
  3. Ensure user is assigned to database with all privileges
  4. Try 'localhost' or '127.0.0.1' for DB_HOST
  5. Check if MySQL server is running (contact support if unsure)

500 Internal Server Error

A generic server-side error.

Solutions:

  1. Check .htaccess - Rename to .htaccess_old and reload site
  2. Regenerate .htaccess - Go to Settings → Permalinks → Save
  3. Increase PHP limits - In php.ini or .user.ini:
    max_execution_time = 300
    memory_limit = 256M
  4. Check error logs - cPanel → Metrics → Errors
  5. Disable plugins - Rename plugins folder via FTP

403 Forbidden Error

Access is denied to the requested resource.

Solutions:

  1. Check file permissions - Folders: 755, Files: 644
  2. Check .htaccess - Look for deny rules blocking access
  3. Disable security plugins - Some block legitimate access
  4. Check ModSecurity - cPanel → Security → ModSecurity

404 Not Found (on all pages)

Pages exist but return 404 errors.

Solutions:

  1. Go to Settings → Permalinks and click Save (rebuilds .htaccess)
  2. Check that .htaccess exists and is writable
  3. Ensure mod_rewrite is enabled

Memory Exhausted Error

PHP has run out of allocated memory.

Solutions:

Increase memory limit in wp-config.php:

define('WP_MEMORY_LIMIT', '256M');

Or in .htaccess:

php_value memory_limit 256M

Scheduled Maintenance Error

"Briefly unavailable for scheduled maintenance. Check back in a minute."

Solution:

Delete the .maintenance file from your WordPress root directory via File Manager or FTP.

Syntax Error

"Parse error: syntax error, unexpected..."

Solutions:

  1. If caused by recent edit: Fix the code error in the mentioned file
  2. Use FTP to access and correct the file
  3. Restore from backup if unsure of the change

Connection Timed Out

The server took too long to respond.

Solutions:

  1. Deactivate all plugins and test
  2. Switch to a default theme
  3. Increase PHP limits
  4. Check for resource-intensive processes

Prevention Tips

  • Always backup before making changes
  • Update one thing at a time
  • Use staging sites for testing
  • Keep WordPress, themes, and plugins updated
  • Use quality themes and plugins from reputable sources

Need Help?

If you can't resolve an error, contact our support team with the error message and recent changes you made.

Hjälpte svaret dig? 0 användare blev hjälpta av detta svar (0 Antal röster)