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.
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
- Check your email for a WordPress recovery message containing a special login link.
- Attempt to access your site via a private or incognito browser window.
- 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.
- cPanel: Log in to your hosting dashboard and look for the FTP Accounts icon to create or view your FTP username and password.
- Plesk: Navigate to Websites & Domains > FTP Access to manage your credentials.
- File Manager: If you prefer not to use an FTP client, you can use the built-in File Manager tool directly within your hosting control panel.
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.
- Log in to your hosting control panel and open File Manager, or connect via FTP using your credentials.
- Navigate to the root directory of your WordPress installation (usually
public_htmlorhttpdocs). - Locate and open the
wp-config.phpfile for editing. - Find the line
define( 'WP_DEBUG', false );and change it todefine( 'WP_DEBUG', true );. - Add the following lines directly below the WP_DEBUG line:
define( 'WP_DEBUG_LOG', true );define( 'WP_DEBUG_DISPLAY', false );- Save the
wp-config.phpfile. If using FTP, upload the file back to the server. - Refresh your website in the browser to trigger the error.
- Navigate to the
/wp-content/folder and open thedebug.logfile to view the specific error details.
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.
- Open the File Manager in your hosting control panel or connect via FTP.
- Go to
/wp-content/. - Right-click the
pluginsfolder and select Rename. - Change the folder name to
plugins_old. - Attempt to log in to your WordPress admin area.
- If the site loads, rename the folder back to
plugins. - Go to Plugins > Installed Plugins in your WordPress dashboard.
- 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.
- Access your site files via File Manager or FTP.
- Navigate to
/wp-content/themes/. - Rename your current active theme's folder (for example, change
my-themetomy-theme_old). - WordPress will automatically revert to a default theme installed on your server.
- 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.
- Open File Manager in your hosting control panel or connect via FTP.
- Navigate to the root directory of your WordPress installation.
- Ensure hidden files are visible (in cPanel File Manager, click Settings and enable Show Hidden Files (dotfiles)).
- Locate the
.htaccessfile. - Right-click the file and select Rename, changing it to
.htaccess_old. - Refresh your website to see if it loads correctly.
- If the site works, go to Settings > Permalinks in your WordPress dashboard and click Save Changes to generate a new
.htaccessfile.
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
- Open
wp-config.phpin File Manager or via FTP. - Add the following line before the line that says
/* That's all, stop editing! Happy publishing. */: define( 'WP_MEMORY_LIMIT', '256M' );- Save the file and refresh your website.
Via cPanel
- Log in to cPanel and navigate to Software > Select PHP Version.
- Click Options.
- Locate
memory_limitin the list and increase the value (e.g., to256M). - 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.
- Log in to your hosting control panel.
- In cPanel, navigate to Software > Select PHP Version. In Plesk, go to Websites & Domains > PHP Settings.
- Review the current PHP version assigned to your domain.
- Update the version to match the requirements of your WordPress installation and installed plugins.
- 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.
- Verify that the database name, username, and password in
wp-config.phpare correct. - Check if your database server is responding via your hosting control panel.
- Repair the database by adding
define( 'WP_ALLOW_REPAIR', true );towp-config.phpand visitingyourdomain.com/wp-admin/maint/repair.php.
Failed Automated Updates
A failed WordPress core update can leave your site in maintenance mode or trigger a critical error.
- Look for a file named
.maintenancein your WordPress root directory. - Delete the
.maintenancefile via File Manager or FTP. - Refresh your website to see if it returns to normal.
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.
- Open
wp-config.phpvia File Manager or FTP. - Change
define( 'WP_DEBUG', true );back todefine( 'WP_DEBUG', false );. - Remove or comment out the
WP_DEBUG_LOGandWP_DEBUG_DISPLAYlines if they are no longer needed. - 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?
💻 Open a Ticket