In my years at SK Techs I saw almost every way a WordPress site can break on a server. The good news is that most errors come down to a few common causes. Once you know them, you can usually fix things quickly instead of disabling plugins at random.

Here are the three I see most.

1. "Allowed memory size exhausted"

This means a plugin, page builder or report tried to use more memory than PHP allows. Many hosts set the limit to 64 or 128 MB, which isn't enough for a modern business site.

Fix: raise the limit to at least 256 MB. You can add this line to wp-config.php:

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

or change memory_limit in your host's PHP settings. If the error keeps coming back, find out which plugin is using so much memory rather than raising the limit forever.

2. "Error establishing a database connection"

WordPress can't reach the database. Usually it's one of two things:

  • Wrong details. Check that the database name, user, password and host in wp-config.php exactly match what's in your hosting panel. This often happens after a migration.
  • The database server has stopped. On busy servers MySQL can crash when memory runs out during a traffic spike. If your details are correct, ask your host to check the database service.

3. 504 Gateway Timeout

The web server waited for PHP to finish, gave up and showed a 504. Common causes:

  • A plugin calls an outside API that never answers.
  • A slow search or report scans a huge table with no index.
  • A backup job runs in the middle of the day while visitors are on the site.

Fix: find the slow request in the logs, move heavy jobs like backups to quiet hours, and add caching so fewer requests reach PHP at all.

Error logs are your best friend. Read them before you start switching plugins off.

Your host's error_log file, or the PHP error log in cPanel, will usually tell you the exact file and line that failed. That saves hours of guessing.

If you'd like help tracking down a stubborn error, send me a message.