Home › Knowledgebase › KB-1222

Wordpress critical error instead of homepage

Summary

This guide helps you troubleshoot and resolve: Wordpress critical error instead of homepage. Follow the steps below to fix the issue.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

Common Causes

WordPress critical errors typically appear as a white screen with a simple message stating there has been a critical error on your website. This prevents visitors from accessing your homepage and blocks you from logging into the WordPress admin dashboard. These errors are usually caused by a conflict between plugins, an incompatible theme, a failed update, or a mismatch between your site's code and the server's PHP version.

Quick Fix Steps

  1. Check your email for a WordPress recovery message containing a special login link.
  2. Attempt to access your site via a private or incognito browser window.
  3. Verify that your domain name and hosting services are active and not expired.

Detailed Instructions

Obtain File Access Credentials

To edit WordPress files, you will need access to your hosting control panel or an FTP client. Most Australian hosting providers supply these details in your welcome email or within the client portal.

Important: Always create a full backup of your website files and database before editing core files such as wp-config.php or .htaccess. Incorrect syntax can prevent your site from loading entirely.

Enable WordPress Debug Logging

Debug logging helps you identify the specific file or plugin causing the crash by recording detailed error messages to a log file.

  1. Log in to your hosting control panel and open File Manager, or connect via FTP using your credentials.
  2. Navigate to the root directory of your WordPress installation (usually public_html or httpdocs).
  3. Locate and open the wp-config.php file for editing.
  4. Find the line define( 'WP_DEBUG', false ); and change it to define( 'WP_DEBUG', true );.
  5. Add the following lines directly below the WP_DEBUG line:
  6. define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  7. Save the wp-config.php file. If using FTP, upload the file back to the server.
  8. Refresh your website in the browser to trigger the error.
  9. Navigate to the /wp-content/ folder and open the debug.log file to view the specific error details.
If debug.log is empty or not generated: Ensure that WP_DEBUG_DISPLAY is set to false so errors are written to the file rather than the screen. Check that your hosting account has permission to write to the /wp-content/ folder. If the file remains empty, check the error logs within your hosting control panel (cPanel > Metrics > Errors or Plesk > Log Files) as an alternative to WordPress debug logging.

Deactivate Plugins via File Manager

If a plugin conflict is causing the critical error, renaming the plugins folder will deactivate all plugins at once, allowing you to regain access to your dashboard.

  1. Open the File Manager in your hosting control panel or connect via FTP.
  2. Go to /wp-content/.
  3. Right-click the plugins folder and select Rename.
  4. Change the folder name to plugins_old.
  5. Attempt to log in to your WordPress admin area.
  6. If the site loads, rename the folder back to plugins.
  7. Go to Plugins > Installed Plugins in your WordPress dashboard.
  8. Activate plugins one by one, refreshing the site after each activation to identify the faulty plugin.

Switch to a Default Theme

Theme incompatibility, especially after an update, can trigger a critical error. Switching to a default theme isolates the issue.

  1. Access your site files via File Manager or FTP.
  2. Navigate to /wp-content/themes/.
  3. Rename your current active theme's folder (for example, change my-theme to my-theme_old).
  4. WordPress will automatically revert to a default theme installed on your server.
  5. Check if the homepage now loads correctly.

Check and Rename the .htaccess File

A corrupted .htaccess file can cause server-level critical errors and prevent your homepage from loading.

  1. Open File Manager in your hosting control panel or connect via FTP.
  2. Navigate to the root directory of your WordPress installation.
  3. Ensure hidden files are visible (in cPanel File Manager, click Settings and enable Show Hidden Files (dotfiles)).
  4. Locate the .htaccess file.
  5. Right-click the file and select Rename, changing it to .htaccess_old.
  6. Refresh your website to see if it loads correctly.
  7. If the site works, go to Settings > Permalinks in your WordPress dashboard and click Save Changes to generate a new .htaccess file.

Increase PHP Memory Limit

A common cause of critical errors is exhausting the PHP memory limit. You can increase this via wp-config.php or your hosting control panel.

Via wp-config.php

  1. Open wp-config.php in File Manager or via FTP.
  2. Add the following line before the line that says /* That's all, stop editing! Happy publishing. */:
  3. define( 'WP_MEMORY_LIMIT', '256M' );
  4. Save the file and refresh your website.

Via cPanel

  1. Log in to cPanel and navigate to Software > Select PHP Version.
  2. Click Options.
  3. Locate memory_limit in the list and increase the value (e.g., to 256M).
  4. Click Save and refresh your website.

Check PHP Version Compatibility

WordPress requires a specific PHP version to function correctly. An outdated or incompatible version can cause site crashes.

  1. Log in to your hosting control panel.
  2. In cPanel, navigate to Software > Select PHP Version. In Plesk, go to Websites & Domains > PHP Settings.
  3. Review the current PHP version assigned to your domain.
  4. Update the version to match the requirements of your WordPress installation and installed plugins.
  5. Save the changes and refresh your website.

Troubleshooting

Database Connection Errors

If the critical error mentions a database connection issue, your site cannot communicate with its database.

Failed Automated Updates

A failed WordPress core update can leave your site in maintenance mode or trigger a critical error.

Disable Debug Mode After Troubleshooting

Once you have identified and resolved the issue, you should disable debug mode to prevent sensitive error information from being written to your server or displayed to visitors.

  1. Open wp-config.php via File Manager or FTP.
  2. Change define( 'WP_DEBUG', true ); back to define( 'WP_DEBUG', false );.
  3. Remove or comment out the WP_DEBUG_LOG and WP_DEBUG_DISPLAY lines if they are no longer needed.
  4. Save the file and refresh your website.

Avoid editing the wp-config.php file unless you are comfortable with code. Incorrect syntax can prevent your site from loading entirely.

If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.

Still Having Issues?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket