Why does WordPress show a white screen and how can you fix common errors?
WordPress problems often arise from faulty plugins or themes, code and database errors, incorrect server settings, corrupted files or caching. Common fixes include disabling suspicious extensions, checking logs, file permissions and server limits, and restoring via backup or recovery mode.
Key Takeaways
The most common WordPress errors can often be fixed in just a few steps. This article covers the following causes and solutions:
- WordPress white screen of death: use recovery mode, deactivate plugins, fix code errors and enable debug mode
- 500 Internal Server Error: check for a corrupted
.htaccessfile, insufficient PHP memory and corrupted core files - Error establishing a database connection: check the login details in
wp-config.php, repair the database and ask your hosting provider to check the database server - Connection timed out: check server load, plugins, the PHP memory limit and the maximum execution time
- WordPress doesn’t save changes: clear the browser cache, your caching plugin’s cache and the server-side cache
- Other errors: maintenance mode after an update, syntax errors, failed automatic updates, image upload problems and a sidebar that appears below the content
1. WordPress white screen of death
In the past, serious WordPress errors often resulted in nothing more than a completely white page, giving rise to the rather dramatic term ‘WordPress white screen of death’. Today, WordPress is much more user-friendly and often displays specific error messages or provides access to recovery mode.
There are several possible causes of the WordPress white screen of death, including faulty plugins, PHP issues and various coding or database errors. It is therefore important to identify the exact cause before attempting to fix the problem.
Recovery mode for troubleshooting critical errors
Since WordPress 5.2, the CMS has included a built-in recovery mode that is automatically triggered by certain critical errors. If a serious PHP error occurs, WordPress may display a general error message instead of a white page and send an email to the administrator address. This email contains a special recovery link that allows you to access the backend despite the error. WordPress then indicates which plugin or theme is causing the problem and gives you the option to deactivate it directly.
Recovery mode only works if WordPress can detect and intercept the error. If the PHP error occurs too early in the loading process, no recovery email may be sent. In this case, you need to troubleshoot the problem manually via FTP or the file manager, as described in the following sections.
Error source 1: plugins
The WordPress white screen of death is often triggered by one of the following actions:
- You have activated a WordPress plugin that is not working correctly.
- You have changed the settings of an active plugin.
- You have modified the code of an active plugin.
If you have recently made one of these changes, open the plugins page in WordPress and deactivate the plugin you last modified. In many cases, this is enough to resolve the problem and remove the WordPress white screen.
If the WordPress admin page is no longer accessible because of the white screen, you can use WordPress recovery mode, provided you have received the corresponding email. If this is not possible, you need to access your WordPress files via FTP or your hosting provider’s file manager and deactivate the plugins manually. Proceed as follows:
- Open the directory where your WordPress files are stored.
- Open the
wp-contentfolder. - Locate the
pluginsfolder insidewp-content. - Rename the folder to deactivate all plugins at once.
Error source 2: code errors
If the error is not caused by a plugin, it may be because you have modified the functions.php file or another PHP file using the WordPress theme editor. In such cases, WordPress often displays a specific error message or switches the website to recovery mode. A typical message might look like this:
Parse error: syntax error, unexpected end of file in /home/name/public_html/wordpress/wp-content/themes/your_theme/functions.php on line 231textThis means that there is an error in the code, which may prevent the selected WordPress theme or WordPress framework from being displayed correctly. In this case, you need to restore a working version of the affected file.
If the WordPress admin page is not accessible, you can replace the faulty file via FTP or your hosting provider’s file manager:
- Open the directory where your WordPress files are stored.
- Open the
wp-contentfolder and then thethemesfolder. - Open the folder of your active theme.
- Locate the affected file.
- Upload a working version of the file, either from a backup or from the theme’s original files.
Alternatively, you can deactivate the entire theme by renaming its folder or temporarily switching to a different theme. If a default WordPress theme is installed, WordPress can then fall back to it. Afterwards, return to your browser and refresh your website.
When the cause of the error is unclear
Sometimes, the WordPress white screen of death appears for no obvious reason: you have not modified any plugins or changed your theme’s code. In such cases, it is best to troubleshoot the problem systematically. One useful approach is to enable WP_DEBUG, which can display specific error messages and help you identify faulty files or lines of code.
Open the wp-config.php file in the main directory of your WordPress installation and add the following lines:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);phpWith WP_DEBUG_LOG, all WordPress errors are recorded in the wp-content/debug.log file. WP_DEBUG_DISPLAY should remain set to false so that errors are not displayed publicly on the website. This is particularly important on live websites, as debug output may contain sensitive information such as database paths or server configuration details. You can then analyse the errors directly in the log file, which can be accessed via FTP or your file manager. Once you have finished troubleshooting, deactivate debug mode again by setting all three entries to false.
In addition to plugins, there are several other possible causes of the display error that may not be immediately obvious:
- Caching: If you use a caching plugin, clearing the website cache may resolve the problem. If you cannot access the WordPress admin page to clear the plugin cache, you can also try clearing your browser cache.
- Corrupted files: WordPress files may have become corrupted, for example due to malware or an incomplete update. Contact your hosting provider if you need help diagnosing the problem.
- Server issues: An overloaded or temporarily unavailable server can also cause a WordPress white screen. Check your email for notifications from your hosting provider or contact their support team.
2. Internal server error with a 500 status code
The error message 500 Internal Server Error is one of the most common server errors. In WordPress, it is often caused by plugins or problems with themes. Other possible causes include a corrupted .htaccess file or insufficient PHP memory. An internal server error can also affect the WordPress admin page while the rest of the website continues to work normally.
Since WordPress 5.2, built-in protection is also available for serious PHP errors. In such cases, WordPress may display a notice about a critical error instead of a classic 500 error, or send an email containing a recovery link.
Error source 1: corrupted .htaccess file
A common cause of the ‘500 Internal Server Error’ message is a corrupted .htaccess file. To check whether this file is causing the problem, log in to your server via FTP or your hosting provider’s file manager. Navigate to the WordPress root directory and locate the .htaccess file. Temporarily rename the file and then reload your website. If the site works again, the .htaccess file was most likely the cause.
Next, create a new .htaccess file by logging in to the WordPress admin area and going to ‘Settings’ → ‘Permalinks’. Save the settings again without making any changes. WordPress will then automatically generate a new .htaccess file with the default rewrite rules.
Error source 2: insufficient PHP memory
A 500 Internal Server Error can occur if WordPress or a plugin requires more PHP memory than the server provides. The error log may offer clues, for example messages such as ‘Allowed memory size exhausted’.
To investigate the problem, enable WordPress debugging with log output so that errors are recorded in a file. If a memory issue is confirmed, increasing WP_MEMORY_LIMIT in the wp-config.php file may help. You should also check your plugins and themes, as excessive memory usage is often caused by individual extensions.
Error source 3: corrupted core file
Although it is relatively uncommon, a corrupted WordPress core file can also cause an internal server error. In this case, replacing the affected core files with fresh copies can help eliminate the source of the problem.
Connect to your website via FTP or your hosting provider’s file manager. The wp-admin and wp-includes folders contain WordPress core files and can generally be replaced with fresh copies from a clean WordPress installation. This should not affect your personal WordPress customisations, provided you have not manually modified files in these folders. The wp-content folder, however, contains your themes, plugins and uploads. Do not replace or delete this folder, as doing so could remove important website content.
If other troubleshooting steps have failed, download a fresh copy of WordPress and replace the core files manually. Before doing so, back up your existing wp-config.php file and database, and make sure that the wp-content folder remains unchanged.
3. Error establishing a database connection
The message ‘Error establishing a database connection’ means that WordPress is unable to connect to the database. Without this connection, the website cannot load its content or provide access to the WordPress admin area correctly. Common causes include incorrect login details in wp-config.php, an incorrect database host or a server-side issue.
Error source 1: incorrect connection settings
First check the login details in your wp-config.php. These four entries are crucial:
define( 'DB_NAME', 'database_name' );
define( 'DB_USER', 'database_user' );
define( 'DB_PASSWORD', 'password' );
define( 'DB_HOST', 'localhost' );phpEven a small typo in the database name, username, password or host can prevent WordPress from establishing a connection. A common example is failing to update the host after a server migration or forgetting to change the password.
The value for DB_HOST is often localhost, but this is not always the case. Some hosting providers use a specific hostname or address for the MySQL database server. In these cases, you need to enter the value provided by your host. Depending on the hosting setup, you may also be able to use the IP address of the database server instead of its hostname.
Error source 2: your database is corrupted
This error is not the same as ‘Error establishing a database connection’, but it is closely related. In some cases, the frontend of your website may still work normally even though an error message appears in the WordPress admin area. This can happen when one or more database tables are unavailable or corrupted and the database needs to be repaired.
Open the wp-config.php file and locate the section containing your database name, username, password and host. Then add the following line:
define('WP_ALLOW_REPAIR', true);phpSave the wp-config.php file and upload it via FTP. Then open the following URL: https://www.your-site.net/wp-admin/maint/repair.php. On this page, you will see two options: ‘Repair Database’ and ‘Repair and Optimize Database’. Before continuing, make sure you have created a complete backup of your database.
Select ‘Repair Database’ and wait for the repair process to finish. Then open your website in a new browser tab and check whether it is displayed without any errors.
After completing the repair, remove the corresponding line from wp-config.php or set it to false. Otherwise, the database repair page can be accessed without logging in.
Error source 3: the MySQL database server is down
This scenario can occur when your hosting provider’s server reaches its capacity. If your website receives a sudden surge in traffic, the database server may become overloaded. With some hosting providers, a large number of websites share the same server. If one of these sites experiences a significant traffic spike, it can affect other websites on the same server.
To rule out a server-side issue, contact your hosting provider’s support team and ask them to check the status of the database server. There may be a technical problem, or the provider may be carrying out scheduled server maintenance that has not yet been communicated to you.
4. Connection timed out
The message ‘Connection timed out’ means that a request could not be completed within the permitted time. In WordPress, this usually occurs when the server, a plugin, a theme or an external service takes too long to respond.
Error source 1: server is overloaded
One of the most common causes is an overloaded server. This can happen with shared hosting, too many simultaneous requests or resource-intensive processes. If the server doesn’t respond quickly enough, the browser or an internal WordPress process will abort with a timeout.
Error source 2: faulty plugins or themes
Plugins and themes can cause timeouts if they trigger too many queries, start faulty processes or call external services that don’t respond in time. Temporarily deactivate all plugins and check whether the error disappears. Then reactivate them one by one. If necessary, also switch temporarily to a default theme.
Error source 3: exhausted PHP memory limit
If the available PHP memory is insufficient, processes may stop unexpectedly or take an unusually long time to complete. In such cases, increasing the WordPress memory limit in wp-config.php may help. WordPress uses a default memory limit of 40 MB for single-site installations and 64 MB for multisite installations, so any manually defined value should generally be higher:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );phpHowever, with shared web hosting, the memory limit can usually only be increased up to a certain level. If you need a higher limit, you may have to contact your hosting provider and ask them to increase it. Bear in mind that some shared hosting plans impose a relatively low PHP memory limit.
Error source 4: PHP maximum execution time too low
A timeout can also occur if a PHP script takes longer to run than the server allows. In such cases, you may see a message such as ‘Maximum execution time of 30 seconds exceeded’. The relevant setting is max_execution_time, which can be configured in php.ini. It determines how many seconds a script is allowed to run before it is terminated. In web environments, the default value is often 30 seconds.
If your website regularly times out during certain operations, such as imports, large uploads, updates or resource-intensive plugins, increasing this value may help. For example, the setting in php.ini might look like this:
max_execution_time = 60ini5. WordPress doesn’t save changes
If changes in WordPress are not immediately visible, this does not necessarily mean they were not saved. In many cases, an older cached version of the website is still being displayed. Common causes include the browser cache, a caching plugin, server-side caching by your hosting provider or a CDN.
Solution 1: fully reload the page
Browsers store content in their cache so that pages load faster on subsequent visits. Try performing a hard refresh of the page. On Windows, this usually works with [Ctrl] + [F5] or [Ctrl] + [Shift] + [R], while on a Mac you can usually use [Cmd] + [Shift] + [R].
Solution 2: clear the browser cache
If a hard refresh does not help, clear the browser cache completely. This is useful if the browser is still loading older versions of files such as stylesheets, JavaScript or images. Then reopen the page and check whether the changes are visible. This step is particularly important after editing CSS, theme files or the website layout.
Solution 3: clear the cache in WordPress or in the hosting
If the old version is still visible, the problem may no longer be caused by the browser but by caching on the server. Many WordPress websites use additional caching layers, such as caching plugins, server-side caching from the hosting provider or a CDN. These systems serve cached versions of pages to improve loading times, which means changes may not appear immediately even though they have been saved correctly.
Clear the following caches in this order:
- the cache of your caching plugin
- the server-side cache provided by your hosting provider
- the CDN cache, if you are using a CDN
Many hosting providers offer options such as ‘Clear cache’, ‘Purge cache’ or ‘Flush cache’, either in the customer control panel or directly in the WordPress dashboard.
Solution 4: check that changes are saved in the editor
If the page is not only showing outdated content but changes are also not being applied in the editor itself, there may be a problem with the saving process. This is particularly relevant when using the block editor, as WordPress processes content there via JavaScript and the REST API. If an error occurs during this process, changes may not be saved correctly, even if they initially appear to have been.
In this case, temporarily deactivate all plugins and check whether the problem still occurs.
Solution 5: check upload and path
If you have made changes directly to files, such as CSS, template or theme files, also check that the modified file has actually been uploaded to the server and is stored in the correct folder. It is quite common to edit the correct file locally while an older version remains on the server, or to overwrite the wrong file accidentally.
This is particularly worth checking if you use a child theme or have several versions of a theme stored on the server. In these cases, make sure the file path is correct.
6. Ongoing maintenance mode after an upgrade
If WordPress gets stuck during an update, your website may continue to display the message: ‘Briefly unavailable for scheduled maintenance. Check back in a minute’. The cause is usually a file called .maintenance, which WordPress automatically creates in the root directory during an update. Normally, this file is deleted once the update is complete. If that does not happen, the website remains stuck in maintenance mode.
In most cases, the solution is simple:
- Log in via FTP or your hosting provider’s file manager.
- Open the root directory of your WordPress installation, i.e. the folder containing the
wp-config.phpfile. - Delete the
.maintenancefile and then reload the website.
If the problem persists, the maintenance file was probably not the only issue and the update itself may have failed. In this case, check the most recently updated plugin, theme or, if applicable, WordPress core, and reinstall or update it manually. Server logs or WordPress error logs can also help identify why the update was interrupted.
7. Syntax error
A syntax error is usually caused by a small but important mistake in the code syntax. A missing comma or an incorrect bracket can be enough to break an entire script. This type of error often occurs after code has been added manually to a theme file, functions.php, a plugin or a custom snippet. In many cases, the error message identifies the affected file and line number, helping you locate the problem quickly.
To fix the syntax error, you need to correct or remove the faulty section of code. The easiest way to do this is via FTP, your hosting provider’s file manager or another method that gives you direct access to the affected file.
Since WordPress 5.2, recovery mode can also help. In many cases, instead of displaying a WordPress white screen, WordPress shows an error message and sends a recovery link to the administrator email address.
8. Automatic update failure
WordPress automatically installs many minor and security-related updates in the background. If one of these updates fails, the website may become stuck in maintenance mode or display a message such as ‘Update failed’.
The first step is usually straightforward: delete the .maintenance file from the root directory of your WordPress installation, i.e. the folder containing wp-config.php. Then reload the website. If the site works again, check which update failed, whether it was a plugin, a theme or WordPress itself, and try running the update again. If the automatic update fails repeatedly, a manual update is usually the safer option.
If a message such as ‘Could not create directory’ appears during the update, check whether WordPress has write access to the affected folder. To do this, review the file permissions and ownership of the relevant files and directories.
9. Problems uploading images in WordPress
If you cannot upload images in WordPress, the problem is not necessarily caused by WordPress itself. Common causes include incorrect file permissions, restrictive server limits, image-processing issues or plugin conflicts. Modern image formats such as WebP and AVIF can also cause problems if the required server libraries are not configured correctly.
It is usually worth checking ‘Tools’ → ‘Site Health’ → ‘Info’ first. There, you can find details about media processing, file system permissions and the server environment. This can help you determine whether WordPress is able to process images correctly or whether there are signs of a server-side problem.
Solution 1: Check file permissions
If you suspect that file permissions are causing the problem, connect to your website via FTP, SFTP or your hosting provider’s file manager and open the /wp-content/ folder. Inside, you will find the /uploads/ directory.
First, check the permissions for the uploads directory and its subfolders. For directories, 755 is usually the appropriate value. Then check the files within these folders. For files, 644 is generally suitable. This combination is commonly used for standard WordPress installations.
Solution 2: Server settings
Another common cause of image upload problems is server limits that are set too low. This applies in particular to the PHP values upload_max_filesize, post_max_size, memory_limit and the maximum execution time. These settings determine how large uploaded files can be and how many resources are available for image processing. With high-resolution images or when WordPress automatically generates several image sizes, the default limits of some hosting packages may not be sufficient.
First, check your hosting control panel or PHP configuration to see the current values. If uploads fail or error messages appear, increase the limits gradually. The following values can serve as a guide:
upload_max_filesize: at least 64 MB, or preferably 128 MB or more for image-heavy websites or high-resolution photospost_max_size: at least as high asupload_max_filesizememory_limit: at least 256 MB
If you cannot change these settings yourself, contact your hosting provider and ask them to adjust the values accordingly.
Solution 3: Modern image formats
If JPG or PNG files work but WebP or AVIF files do not, the problem is often related to image processing on the server rather than the upload folder. WordPress has supported WebP natively since version 5.8 and AVIF since version 6.5, so no additional plugin is required. However, whether these formats can actually be used depends on the hosting environment.
For AVIF, either Imagick or LibGD with AVIF support must be enabled on the server. In addition, PHP 8.1 or higher is required for the GD extension to process AVIF natively. You can check whether the necessary support is available under ‘Tools’ → ‘Site Health’ → ‘Info’ → ‘Media Handling’. If it is missing, errors may occur when uploading images or when WordPress automatically generates additional image sizes.
10. Sidebar appears below the main content
If the sidebar in WordPress appears below the main content instead of beside it, there is usually a layout issue. This can make the page look cluttered or broken, but in most cases the correct layout can be restored with a few adjustments.
However, this is not always an actual error. Many modern themes deliberately move the sidebar below the main content on smaller screens to improve readability on smartphones. First, check whether the issue also occurs on desktop devices or only at narrower screen widths.
Common causes of the problem
A common cause is faulty HTML code, for example when elements are not closed correctly. This can disrupt the page structure and prevent the sidebar from being positioned properly beside the main content. Incorrect or conflicting CSS rules can cause similar problems. If the main content and sidebar together require more space than the layout provides, the sidebar may be pushed below the content. Possible causes include:
- width values that are too large for the content area or sidebar
- additional padding or margins
- incorrect
max-widthvalues - incorrect Flexbox or grid settings
Changes to the CSS file or custom CSS can also cause the layout to shift unexpectedly.
Another possible cause is the theme or template structure. Modern WordPress themes, particularly block themes, do not always use traditional sidebars and may instead rely on layout blocks or template files. If a ‘Full Width’ template is selected or the sidebar has been removed from the template, it will no longer appear beside the content.
Plugins and page builders can also affect the layout. Tools for performance optimisation, CSS compression or visual page builders may alter how styles are processed and can unintentionally cause the sidebar to move.
Specific steps to resolve the problem
Narrow down the cause step by step:
- Check whether the problem only occurs on mobile devices as part of the responsive design.
- Check whether a different page template, such as ‘Standard’ instead of ‘Full Width’, is selected.
- Temporarily deactivate recently installed plugins or page builders to see whether they are causing the issue.
- Check any custom HTML code for unclosed elements, for example using an HTML validator.
- Review your CSS customisations, particularly widths, spacing and layout settings.
- Test whether the problem persists when you switch to a default WordPress theme.
If the sidebar still appears below the content after these steps, check the theme files or contact your hosting provider or the theme developer’s support team.