In Support, we have thousands of conversations per month in the chat and help our customers solve error messages and problems with their WordPress websites every day. In our article, we show you step by step how to fix four of the most common WordPress errors.
No other content management system (CMS) is as easy to use as WordPress: themes and plugins are installed and managed with just a few clicks, without you needing any previous technical knowledge. With a market share of over 40 percent WordPress has practically become the operating system of the internet.
WordPress is perfect for today's web thanks to its ease of use, active community and wide range of options for customizing your website. This makes it all the more frustrating when your WordPress suddenly starts having problems. But there's no need to panic! Today, I'll show you how to solve four typical WordPress errors quickly, easily and independently.
Our tips for fixing typical WordPress errors
To provide you with the best possible troubleshooting support and to share the knowledge from our many years of support experience, today I will explain the possible causes and the corresponding solutions for four typical WordPress problems.
WordPress error #1: White screen of death
The "White Screen of Death" (WSOD) is an analogy to the Blue Screen of Death, which is displayed in Windows in the event of a system crash. As the name suggests, with WSOD the website simply remains white in the frontend or backend (wp-admin) - without any error message or further information.
Possible causes and solutions for white screen of death
Cause 1: Incompatible plugins or themes
The error is very often caused by a faulty combination of plugins or themes, for example:
- A plugin is not compatible with another plugin or with the active theme.
- A plugin/theme was uploaded twice via S/FTP in different versions.
- A plugin/theme cannot be used with the set PHP version.
One of these errors causes WordPress to go into a state of shock and provokes the white screen of death.
Problem analysis: Are your plugins and themes incompatible?
The first approach is to undo your recent changes. Think about what changes you have made. Have you perhaps installed a new plugin or changed a theme? Plugin and theme updates can also lead to this misbehavior.
First of all, you should determine whether the error occurs on all websites or only on certain websites. For example, is only your contact page affected? If you have just integrated a contact form on it, it can be concluded that this contact form plugin is responsible for the WSOD.
Does the white screen of death appear in the entire frontend on all URLs? Then it may be the theme itself or a plugin that is integrated throughout the website - for example, a widget in the footer, a slider in the header or a plugin for the navigation.
If it remains white even when calling up the backend (yourwebsite.com/wp-admin), it is most likely the theme or a misconfiguration of the web server.
"*" indicates required fields
Check your debugging log!
A look at the error.log of your server or the debugging log of WordPress itself(WP Debug Mode) often helps. You can activate this by editing the wp-config.php of your WordPress installation and adding /* That's all, stop editing! Happy blogging. */ insert the following lines:
<p>define('WP_DEBUG',true);</p>
<p>define('WP_DEBUG_DISPLAY',true);</p>
If your installation already has a 'WP_DEBUG' entry, but this is set to false, you can simply change this value to true and only have to add the following line below it:
define('WP_DEBUG_DISPLAY',true);
If you then call up your problem page again, you will see the corresponding reasons for errors instead of the white page. The errors that start with Fatal Error or Parse Error are usually the ones that cause the white screen of death.
WordPress Debug at Raidboxes
If you have your WordPress hosting with Raidboxes, you can activate the debugging log with just one click in the settings of your box. You will receive the debugging log output under the link provided in your settings.
Now you can see exactly which file generates an error at which point and why it occurs. I have an example for you to illustrate this. We see the following information in the parse error:
The error therefore occurs:
- In the file /wp-content/plugins/contact-form-7/wp-contact-form-7.php
- In line 12
- Apparently there is an unexpected sign there, in this case a
“<”
.
The following solutions are available for incompatible plugins and themes:
Solution 1: If you can, restore a backup. This will simply restore your WordPress installation to the state it was in before the error occurred.
Solution 2: If you do not have a backup, you have no choice but to rename the folder of the suspicious plugin or theme via S/FTP. This will deactivate it. In our example, it would be the folder of the Contact Form 7 plugin.
If you are not sure which plugin is causing the error, try the following: Gradually rename all plugin/theme folders. If the error disappears after renaming a folder, you have identified the culprit. With Raidboxes, you can also simply use the plugin and theme management in the dashboard to deactivate them.
Tip: Often the problem is simply a renamed theme folder, so you should check this via S/FTP for the correct spelling!
Cause 2: Server error
1) Problem: Too little PHP memory limit
The typical error message in the error.log is:
"Fatal error: Allowed memory size of XXXX bytes exhausted (tried to allocate XXXX bytes) in..."
Furthermore, there may be a white page on which the error message Internal Server Error appears.
What happens here is as follows:
A PHP task consumes more memory than the value specified by the hoster.
Solution: In this case, it is usually sufficient to add the following line to wp-config.php:
define('WP_MEMORY_LIMIT','256M')
The '256M' stands for the amount of RAM to be used in MB. For example, '512M' could also stand for 512MB.
However, you should bear in mind that a value that is too high can cause your site to crash completely. Consequently, you should only increase your PHP memory limit if your plan provides the necessary RAM. If you only have a small amount of RAM in your plan, you should consider upgrading your plan with your host.
2) Problem: Max Execution Time exceeded
When installing larger WordPress themes or plugins and when importing or exporting large amounts of data, the following error may occur, which is usually displayed in the backend:
Fatal Error: Maximum Execution Time of XX Exceeded in XXX
This means: The time that a PHP script is allowed to run has been exceeded. This often happens when importing many products into WooCommerce or exporting order data.
Solution: Increase the max_execution_time. A note in advance: Normally, the runtime specified by the hoster is sufficient. To avoid unnecessarily long loading times and problems, the max execution time should only be increased in individual cases (e.g. for a large file upload) and then reduced again.
With Raidboxes, you can set the max_execution time for the frontend and the backend separately via the box settings:
With some hosters you can edit the .htaccess via S/FTP and insert the line php_value max_execution_time 300 . The 300 stands for the maximum number of seconds a script may run. In this case 5 minutes.
WordPress error #2: Problems with SSL
Since the General Data Protection Regulation (GDPR) came into force in May 2018 at the latest, an SSL certificate should be part of your mandatory program. It is not for nothing that most browsers now display a warning message if a website is not delivered in encrypted form. This makes it all the more annoying if SSL errors occur on your WordPress website.
Possible causes and solutions for SSL problems
Cause 1: Certificate no longer up to date
With the free certificates from Let's Encrypt at the latest, this error should actually be a thing of the past. However, there are certain certificate types that have an expiry date. If this expires, an SSL error may occur.
Solution: The easiest way is to integrate an SSL certificate without a validity period, which some hosters such as Raidboxes provide free of charge and renew automatically. If this service is not offered by your hoster, you will have to manually renew the certificate. The best way to do this is to set a reminder and contact the provider of your certificate in good time to renew it.
Cause 2: Domain not yet entered on certificate
When an SSL certificate is issued, you specify the domains for which this certificate is to be valid. In this way, a possible entry can be http://domain.com. If a redirect from http://www.domain.com or is then set up afterwards, this domain has no SSL and an error is displayed.
Solution: The new domain must be added to the SSL certificate and this must then be renewed. As this is a rather time-consuming and complicated process, you should contact your web host for this.
With Raidboxes, it is sufficient to switch SSL off and on again in the box settings after adding the additional domains.
Cause 3: Mixed content error
If SSL is set up in WordPress, the http:// address in the database must be replaced with https:// by default. With Raidboxes, this is done automatically when SSL is set up. However, in around 5 to 10 percent of cases, there may still be resources that are loaded via HTTP. This can be the case with hardcoded images or CSS/JS files, for example. In Chrome, the URL is then gray and not green.
Problem analysis and solution:
First, you need to check whether you actually have mixed content errors on your website.
- Press F12 on your website (CMD+F12 on the MAC) and the developer console will open. At the bottom of the console, fields with "Mixed Content" appear with a yellow background.".
- Now make a backup of your website.
- Install the plugin Better Search Replace. After activation, you will find the plugin under "Tools" > "Better Search Replace".
Enter the following in the "Search for" field: http://
and in "Replace with": https://
Then select all tables in the table field and "Test run?" should be checked at the bottom.
Now click on "Start search/replace" at the bottom - When the test run has found some tables, you can uncheck "Test run?" and start the real run.
- After the real run is finished, check the website again to see if you still have mixed content errors (see step 1).
- If mixed content errors still occur, check the source code to see where the resources are still integrated with "http" instead of "https" and replace them accordingly.
WordPress error #3: 504 gateway time-out
A 504 gateway time-out error can occur quite frequently if you have a large number of plugins that also communicate with external services. The error message means that a PHP process is taking longer than 30 seconds. If you own the website, the error is often directly associated with a problem on the server. However, this is not always the case.
Possible causes and solutions for 504 Gateway Time-out
A 504 gateway time-out error occurs when a server that acts as a gateway, i.e. the server that establishes a connection to another server, cannot reach this other server within a specified time.
This error can be caused by a variety of elements involved. It can be your local network, your browser, your ISP (Internet Service Provider), your web server or even a plugin or theme from a third-party provider.
Cause 1: Local problem
Browser settings changed, a proxy activated, your internet provider has problems, your local DNS cache is outdated and many other possibilities can cause this error.
Solution: Test the URL on the website http://www.isitdownrightnow.com/. If you receive the message that the website is online ("yourwebsite.com" is UP and reachable), there is a local problem. However, if the result of the test is "yourwebsite.com" is DOWN, then this indicates a problem with your DNS, your web server or a WordPress plugin or theme.
Cause 2: DNS problems
The DNS (Domain Name System) is responsible for converting your URL (such as raidboxes.de) into an IP.
When re-registering or moving a domain, it may take some time for all computers, DNS servers and providers to recognize the change. This can take up to 24 hours under certain circumstances.
Solution: First of all, you should check for a local problem. To do this, clear your DNS cache:
To clear your DNS cache on your device, first open your command line as follows.
- Windows: Press [Win key + R], there cmd and press Enter
- Mac: Start Terminal via the Dock on Programs > Utilities > Terminal
Then enter the following:
- Windows: ipconfig /flushdns
- Mac: dscacheutil -flushcache
Your local DNS cache will then be cleared and you can try again. If the error persists, check what other servers around the world are saying about it. To do this, go to www.whatsmydns.net and enter the URL in the search bar. Please make sure that A is selected in the second selection field so that only the A record is checked. This is responsible for the correct resolution of the domain name to the IP address. Then start the scan!
If the DNS record is up-to-date for all servers, you should see a green tick and the same IP everywhere. In most cases, this IP should point to the IP of your server (exception: if a CDN is connected upstream).
If errors are displayed in the form of a red X, this server does not yet have the correct entry. If there are different IPs, the server still has the old entry and has not yet been updated to the new one. In this case, just wait and see.
Cause 3: server-side problem
Visitor-intensive websites and e-commerce websites such as WooCommerce stores generate a large number of requests to the server, which cannot be cached due to their content and thus lead to a high server load - up to and including the server crashing.
Solution: If the performance of your hosting package is not sufficient for your website, you may need to upgrade it. Alternatively, it often helps to switch to another host whose server architecture offers better performance. You are welcome to carry out a free test move to Raidboxes with your WordPress website. This will not disrupt the operation of your live website, as you will have a completely separate environment with its own URL that is not indexed by search engines. In over 80 percent of cases, there is a significant increase in performance and a reduction of 504 errors to 0.
Cause 4: Traffic spam, DDoS attacks, bot attacks
DDoS attacks and SPAM traffic can crash your website because they generate so many (uncached) hits that your server crashes.
Solution: A CDN such as Cloudflare, which filters access to your website and blocks spambots and attacks, often helps to filter such attacks. In very persistent cases, you can exclude (block) the IP addresses of the attackers from accessing your website.
With Raidboxes you can easily do this via your box settings:
Cause 5: Problems with plugins and themes
In individual cases, very long-lasting requests from plugins or themes can lead to 504 gateway time-out errors. If you have just updated a theme or plugin, try deactivating it first.
With Raidboxes you can do this via your plugin/theme settings of your BOX - even if you can no longer access your WordPress backend.
If you do not have access to your WordPress backend on other hosts, you can connect via S/FTP and search for the relevant theme or plugin in the ../wp-content/themes or ../wp-content/plugins folder and rename the folder. This will automatically deactivate the corresponding element.
If you are not sure which plugin or theme is causing the problem, first switch to a standard theme such as Twenty Twenty-Two.
If this solves the problem, it is most likely due to the theme or a connection between the theme and plugins. Please contact the manufacturer of the theme. If not, deactivate all plugins and reactivate them one after the other until you have deactivated the relevant plugin. Then try to reinstall this plugin. If this does not help either, contact the manufacturer of the plugin.
WordPress Error #4: Error Establishing a Database Connection
The Establishing a Database Connection Error is a super-GAU among WordPress errors. The error message means that your server no longer has access to the database or can no longer reach it.
Almost all the information that your website needs to run correctly is stored in your WordPress database. Not only the content of your pages and posts, but also login information as well as plugin and theme settings are stored in the database.
Only images, plugin files and theme files and WordPress core files are not stored in the database, but in the file system of your website, which you can access via S/FTP, for example.
Possible causes and solutions for Error Establishing a Database Connection
If your page remains white and only the error message "Error Establishing a Database Connection" appears, your page cannot establish a connection to your database or the necessary information is missing or incorrect. In most cases, you will no longer be able to log into the WordPress backend in this case.
Cause 1: Incorrect data in the WP Config
In most cases, it is simply incorrect information about the database connection that causes the error. This error often occurs after a move to a new server or hoster and is quite simple to rectify:
Solution: For all system-relevant errors (and this one in particular!), you should first create a backup of your website. With Raidboxes, you simply create a manual backup in your Box Backups. With other hosters, you may have to back up the entire website or at least the files that you change locally beforehand.
Now obtain the information required to establish a connection to the database. These are
- Database name (DB_NAME)
- MySQL Username (DB_USER)
- MySQL password (DB_PASSWORD)
- MySQL Hostname (DB_HOST) [This is the server]
- Table Prefix ($table_prefix) [usually 'wp_']
You can usually find this information in your hoster's dashboard. In most cases, not all information is required. With Raidboxes, for example, you only need the table prefix, as the remaining entries are read and controlled automatically.
If you have the necessary information, download the wp-config.php from the root directory of your WordPress installation via S/FTP, make a local copy of it as a backup and edit the original with an editor such as Notepad++.
There you will find the following lines (note: $table_prefix will not be included in all cases):
Compare this information with the information you have just obtained. Save these changes and upload the file back to the main directory of your server (overwrite the original file, as you have a local backup). If the information is now correct, you should be able to use your website normally again.
Cause 2: Faulty database
An error may have crept into your database.
Solution: WordPress may be able to repair the database automatically. To do this, go to yourdomain.com/wp-admin. If you see here that your database can be repaired, add "/* That's all, stop editing! Happy blogging. */" the following line in the WP Config:
define(‘WP_ALLOW_REPAIR’,true);
Then go to yourwebsite.com/wp-admin/maint/repair.php.
If this fixes your problems, don't forget to remove the line from wp-config.php.
Cause 3: Problems with your hoster
The SQL server may be down and unavailable. A maximum database size may also have been reached. Or the resources of your web host are exhausted.
Unfortunately, this often happens with shared hosting. This is because you share a server with many other websites. If a website uses a lot of resources there, this is naturally at the expense of your website. That's why we always recommend high-performance hosting that is specially adapted to WordPress to avoid such overloads.
Solution: Contact your web host or check their status page (if available) to see if there are currently any problems with the server. If necessary, have the hoster display the CPU load and switch to another server if the load is too high. If this does not improve the situation, you should consider switching to a different hoster.
Conclusion
I'm sure you know the feeling of panic when you suddenly find yourself sitting in front of a white screen or can no longer log into the WordPress backend. The important thing is to keep a cool head, systematically get to the bottom of the cause and then work through the appropriate steps to solve the problem. I hope that this article can help you analyze and fix these typical WordPress errors in the future.
Which WordPress problem have you had to deal with the most so far? Feel free to leave your feedback in the comments.
"*" indicates required fields