E-Mail has been successfully sent.

WordPress Troubleshooting: Handling typical errors

In this article, we look at the most common causes of errors with a WordPress site and show you the most common solutions.

Table of contents Table of contents

ATTENTION
Before making any changes to the WordPress instance, we recommend that you create a backup of your site!


Error during installation

Errors can occur during installation, which are usually due to incorrect information in the configuration file. Therefore, check the following information for correctness:

  • Database name
  • User name for the database
  • Password for the database
  • Database prefix already used in previous installation?

→ More about databases

 

White Screen of Death (WSOD)

A common error in which the page simply remains white and no content is displayed.

Cause 1: Incompatible plugins or themes

Start by undoing recent changes, such as adding new plugins or themes. Then check whether the error only occurs on certain pages. If so, a newly installed plugin could be the cause. If a white screen occurs on all pages, the theme or a common plugin could be causing the problem, such as a slider in the header, a footer widget or a navigation plugin. If the backend is also affected, the problem could be due to the theme or the server configuration.

→ Handling errors with plugins/themes


Error log

All errors are continuously logged in the /wp-content/debug.log file. You can view this error log via the STRATO login in the package under Databases and Web spaceManage web space, download it with an FTP programme such as Filezilla or display it directly in the WordPress dashboard with a plugin such as Error Log Monitor (provided the backend is still working).


Error 404: Page not found

This error indicates that the requested page was not found. This may be due to an incorrect path specification, outdated browser data, missing name resolution (DNS) or missing information at the destination (e.g. page content moved/deleted). We will go into the most common causes in detail:

Solution 1: Clear browser cache & cookies

A first method of troubleshooting is to delete the browser cache and cookies.


The error also occurs frequently if the .htaccess file has been deleted or something has gone wrong with the rewrite rules. The next two solutions will help you with this.

Solution 2: Updating the permalink structure

In the WordPress backend, navigate to »Settings« and select »Permalinks Settings«. Then click on »Save changes« to update the permalink structure.

This will update your permalink settings and rewrite rules and rewrite them in the .htaccess file. In most cases, this measure solves the WordPress 404 error, making your post accessible again.

If the problem persists, the .htaccess file must be adjusted manually. To do this, follow the next step.

Solution 3: Renew forwardings

Another potential source of error is the .htaccess file in which redirects are defined. To ensure that WordPress can generate the URLs correctly, download the file and adjust the content.

Access your server with an FTP programme and search for the ‘.htaccess’ file (beginning with a dot and therefore often only visible if hidden files are also displayed). It is located in the main folder, together with the ‘wp-content’ and ‘wp-includes’ folders. Open the .htaccess file with a text editor (if not possible directly, then after prior download) and replace the existing code with the following:

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

</IfModule>

# END WordPress

This will also update your permalink structure. To be on the safe side, clear your browser cache before accessing the page to avoid incorrect displays from the cache.

Tip: Use the Redirection plugin to identify incorrect URLs more quickly.

Solution 4: Deactivate plugins/themes

Plugins extend the functionality of your website, but can occasionally cause conflicts or impair performance. Check that your themes and plugins are up-to-date and compatible with your WordPress version. Firstly, set the default settings and deactivate all plugins to rule out errors in the basic version.

→ Handling errors with plugins/themes

 

Error 503: Service Unavailable

The HTTP status code 503 indicates that the server is temporarily unable to process the request, either due to an overload or planned maintenance work. Especially in the event of a sudden increase in data traffic, it can happen that the resources are exhausted and the website is then unavailable.

This situation usually normalises again within a short time as soon as the data traffic drops. After a certain time, visitors can access your content again. However, longer-lasting errors may indicate more serious problems on the server.


Error causes:

  • Server utilisation:
    • Sudden traffic peaks
    • Resource consumption exhausted
  • Server communication problems
  • Maintenance work
  • DDoS attack (Distributed Denial of Service) / unauthorised use by third parties
  • Incorrect DNS configuration
  • Plugin or theme incompatibility


Solution 1: Update WordPress & plugins

  • Update WordPress: Check that you are using the latest version of WordPress. WordPress updates often contain bug fixes that can resolve the 503 HTTP error.
  • Update plugins: Make sure that your plugins are also up to date. Outdated plugins can occasionally cause problems with WordPress.


Solution 2: Deactivate plugins/themes

Plugins can cause conflicts or impair performance. Check that your themes and plugins are up-to-date and compatible with your WordPress version. First set the default settings and deactivate all plugins to rule out errors in the basic version.

→ Handling errors with plugins/themes


Solution 3: Disable WordPress Heartbeat API

The WordPress Heartbeat API regularly sends information to the server. Excessive use of the Heartbeat API can lead to a 503 HTTP error.

You can temporarily disable the Heartbeat API by adding the following code to your ‘wp-config.php’ file:

 PHP define(‘WP_HEARTBEAT_INTERVAL’, 0);


Solution 4: Reduce server load

There are several possible solutions to this:

  • Deactivate unnecessary plugins: If you have installed many plugins that are not required, it is advisable to deactivate them in order to conserve server resources.
  • Improve the speed of your website: A slow website can increase server utilisation. You can improve website speed by optimising the size of your images and using a cache, for example.
  • Optimise your images: Large images can put a strain on server resources. Optimising the image size can help to make them smaller and faster.
  • Use a cache: The use of a cache makes it possible to save static content such as images and CSS files in the visitor's browser. This reduces server utilisation, as this content does not have to be reloaded from the server every time a page is visited.
  • If in use: Temporarily deactivate your Content Delivery Network (CDN)
  • Check your logs and activate ‘WP_DEBUG’.

  • Expand the server resources: If you have tried all other steps and the 503 HTTP error persists, it may be necessary to expand the server resources. You can do this by booking additional storage space and more CPU power via your STRATO login or by contacting our service hotline, or by ordering a higher-quality product.
 

Error 504: Gateway Time-out

If you encounter the 504 error, this means that a PHP process is taking longer than 30 seconds to complete. The possible causes for this are manifold and can include the local network, the browser used, the internet service provider (ISP), the web server as well as a plugin or theme from a third-party provider.


Cause 1: Local error

To diagnose the problem, you should first find out whether it is a local error or indicates an error in the server:

You can check this by entering the URL on the website https://www.isitdownrightnow.com/. If you are shown that the website is online (‘yourwebsite.com’ is UP and reachable), this indicates that the cause is on your side (local). However, if the test result is ‘yourwebsite.com’ is DOWN, this could indicate a problem with name resolution (DNS), the web server or a WordPress plugin or theme.


Cause 2: DNS resolution

DNS converts your domain name into an IP address. After some time, old information may still be stored in the DNS caches and must first be resolved.

To clear the DNS cache on your devices, open the input console or a terminal:

WindowsPress [WIN key + R], enter ‘cmd’ and press Enter
MacOpen the terminal via the dock under Programmes → Utilities → Terminal

Enter the following there:

Windowsipconfig /flushdns
Macdscacheutil -flushcache

Once you have done this, your local DNS cache will be cleared and you can try again. However, it can take up to 24 hours for all interfaces worldwide to be updated.


If the error persists, you can check the DNS records worldwide at www.whatsmydns.net by searching for your domain name there. As the A record is to be checked, select ‘A’ in the second field. Start the scan and check whether a green confirmation and the same IP address are displayed everywhere. If errors occur in the form of a red X or different IPs are displayed, the server has not yet updated the entry and you should repeat the process after a few hours.


Cause 3: Attacks

DDoS attacks and SPAM traffic can overload your website with a flood of requests and cause it to crash.

Solution: A Content Delivery Network (CDN), such as Cloudflare, can help by filtering traffic and blocking spambots and attacks. In extreme cases, the IP addresses of the attackers can be blocked to prevent access to the website.


Cause 4: Plugins/Themes

Occasionally, lengthy requests from plugins or themes can also lead to timeouts. If you have recently updated a theme or plugin, switch it off again for the time being.

→ Handling errors with plugins/themes


Cause 5: Performance

If none of the previous solution steps have led to success and timeouts continue to occur, the question of insufficient performance remains unanswered. Further measures to improve performance may help here.

It may turn out that only an upgrade to a higher-quality product can fulfil the requirements. In this case, our service hotline or our product overview at www.strato-hosting.co.uk will be happy to advise you accordingly.

 

Common source of error: Plugins/Themes

Foreword

Themes (designs) and plugins enhance a CMS, such as WordPress, both visually and functionally. As many such ‘add-ons’ exist and many different developers can programme and provide them, it is all the more difficult to check whether they all work and are compatible with your installation.

In general, you should only use additional content that is recommended, has been known and trusted for a long time or is frequently and well rated.

Each of these plugins is a potential source of errors in itself and must always be kept up to date. When the main application (e.g. WordPress) is updated, the additional packages should also be updated promptly. However, this is the responsibility of each developer and user.

Procedure
To finally check whether a plugin or theme is causing the error you have just investigated, it is best to proceed step by step:

1. If you are not sure which plugin or theme is causing the problem, first switch to a standard theme, such as Twenty Twenty-Two or more recent.

a) 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.

b) If not, deactivate all plugins and reactivate them one by one until you have identified the plugin that is causing the problem. Then try to reinstall this plugin. If this does not help either, contact the manufacturer of the plugin.

2. If you do not have access to your WordPress backend, 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 it. This automatically deactivates the corresponding element.

2.1 Alternatively, we recommend creating a new (plugins/themes) folder with a different name and moving the content from the original folder to the new one. Now you can gradually move individual contents back again and check each time whether the error occurs again.

If the error then occurs, you know which plugin/theme you last moved in. You should then check this element for updates or, until a final solution is found, leave it out of the original folder or rename it.



Further information:

→ Compatibilty Checker bis PHP 8.0

Was this article helpful?
Info: 84ef131391ee71413d364fd6fe8414133a79baaf