Support 24/7 Service status
Hosting
Email
Discounts
Help
Company
Sign in Support 24/7
Get started

Fixing common WordPress errors

What to do about a white screen, 'Error establishing a database connection', a 500 error, 'too many redirects' or a site stuck in maintenance mode on WordPress.

Updated 17 November 2026

Most WordPress errors come from a handful of causes, and you can fix them yourself in a few minutes. Before you change anything, it's worth knowing you can always restore yesterday's backup if a fix goes wrong.

You'll use DirectAdmin's File Manager for most of these (see Uploading your website). Your WordPress files are in domains/yourdomain.com/public_html/.

"There has been a critical error on this website", or a blank white page

Usually a plugin or theme that broke after an update.

  1. Check the admin email address for a message from WordPress. It often names the plugin at fault and gives you a link to sign in safely ("recovery mode").
  2. No email? In File Manager, open wp-content, and rename the plugins folder to plugins-off. If the site comes back, a plugin was the cause.
  3. Rename the folder back to plugins, then in WordPress go to Plugins and switch them on one at a time until the error comes back. That's the one to update, replace or remove.

If the theme is the cause, rename your theme's folder in wp-content/themes. WordPress switches to a default theme.

"Error establishing a database connection"

WordPress can't reach its database.

  • Check wp-config.php. The DB_NAME, DB_USER, DB_PASSWORD and DB_HOST lines must match the database and user in DirectAdmin (Account Manager → MySQL Management). DB_HOST should be localhost.
  • Changed the database password recently? Update it in wp-config.php too.
  • Just moved the site? The database name and user usually start with your DirectAdmin username, so they're different from the old host. See Creating a MySQL database.

"500 Internal Server Error"

  • A bad .htaccess file is the most common cause. Rename .htaccess to .htaccess-old. If the site works, go to Settings → Permalinks in WordPress and press Save to make a fresh one.
  • The PHP version may not suit an old plugin or theme: see Changing your PHP version and settings.

"Allowed memory size exhausted"

A page needed more memory than PHP allows. Raise memory_limit (see Changing your PHP version and settings), then look for the plugin that needs so much: it's often a page builder, a backup plugin or an importer.

"Too many redirects"

The site keeps sending the browser between two addresses.

  • In Settings → General, both addresses must be the same and start with https://. If you can't sign in, set them in wp-config.php:

    define('WP_HOME', 'https://example.com');
    define('WP_SITEURL', 'https://example.com');
    
  • Using Cloudflare? Set its SSL/TLS mode to Full, not Flexible (see Free SSL certificates).

  • Two plugins forcing HTTPS or redirects can fight each other. Keep one.

"Briefly unavailable for scheduled maintenance"

An update was interrupted. In File Manager, delete the file called .maintenance in your WordPress folder. Then run the update again.

Seeing the real error

To see what's actually wrong, turn on WordPress's debug log for a moment. Add these lines to wp-config.php, above That's all, stop editing:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Load the broken page, then open wp-content/debug.log. Remove the lines when you're done.

Still stuck? Open a ticket with the address of the page and what you see, and we'll take a look.

Still stuck?

Open a ticket and a real person will help you, any time of day.

Open a ticket Other ways to reach us

Ready to go live?

Pick a plan in a minute and your site's ready shortly after.

Get started