Create WordPress Error Logs and Troubleshoot 8 Most Common WordPress Errors

About the Editorial Staff
14 Min Read
Create WordPress Error Logs and troubleshoot common WordPress errors

WordPress error logs should be created if you are getting these common yet tiresome WordPress errors.

Debug error logs record the critical errors your site encounters when the site is Live. The errors are categorized into NOTICE, WARNINGS, and FATAL Errors. The WordPress error logs are very useful for the maintenance and smooth functioning of a website.

Create WordPress Error Logs and Troubleshoot 8 Most Common WordPress Errors

If you are getting a white screen, or the WordPress site is not loading properly; getting WordPress warning errors, or if the plugins are not working properly, the debug error logs in WordPress will record these issues and categorize them for ease in troubleshooting.

Creating WordPress Error Logs

You can either create the WordPress error logs manually or with the help of plugins. 

Some plugins will automatically log your errors in WordPress so that you can check and fix them accordingly.

Manually, you can locate the WordPress debug log code in the wp-config.php file. You can enable this code to log the errors present on the site. Just make sure that the enable logging code is set to “true” and the display warning and errors code is set to “false”.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );

This will enable WordPress to log your errors but they will not be displayed on your website for the viewers to see. 

Now, let’s find out what these common errors are and how to resolve them.

You can also skip right through the list to the one that you are experiencing and find out how to troubleshoot the particular WordPress errors

  1. Too many redirects
  2. 403 forbidden WordPress
  3. 503 service unavailable WordPress
  4. WordPress increase memory limit
  5. WordPress database connection
  6. Permalinks not working WordPress
  7. Crawl errors in WordPress
  8. White Screen of Death

Before we proceed, remember to create a backup before making any changes!!!

Now, let’s find out what these are.

1. Too many redirects

The most common issue that we experience while using WordPress is the redirect issue. The error that comes on the screen says “err_too_many_redirects” or “The page isn’t redirecting properly”.

This error can occur due to various reasons, the most common being one URL redirecting to another URL, and that URL redirecting towards the first URL, causing an infinity loop.

Create WordPress Error Logs and Troubleshoot 8 Most Common WordPress Errors

You can troubleshoot this WordPress error by clearing your browser’s cache and cookies.

For Google Chrome

  1. Click on the browser settings menu
  2. Select More Tools
  3. Click on Clear Browsing Data
  4. Select ‘Clear cookies and other site data’ and ‘Cached images and files
  5. Click on the ‘Clear data’ button

Your browser cache will be cleared. Make sure your cookies are enabled and restart your browser.

For Mozilla Firefox

  1. Click the menu button and select Options.
  2. Select Privacy & Security 
  3. In the Cookies and Site Data section, click on Clear Data
  4. Remove the checkmark for Cookies and Site Data.
  5. Select Cached Web Content
  6. Click on the Clear button.
  7. Restart Browser

This will resolve most of your redirect errors.

2. 403 forbidden WordPress

“403 Forbidden – Access Denied” Errors in WordPress are displayed when your server permissions don’t allow access to a specific page.

You can get 403 Forbidden errors while trying to log in while installing WordPress, or when visiting a certain page on the WordPress site. In some instances, you might only see “Access Denied” or “You don’t have the authorization to access this page”.

Create WordPress Error Logs and Troubleshoot 8 Most Common WordPress Errors

There are various reasons you might be getting these 403 reasons, like, security plugins that have not been configured properly, a corrupt .htaccess file, or file permissions.

Corrupt Plugins

You can temporarily disable all the plugins to verify if the error is caused by plugins or not. If the error stops showing, you can start enabling one plugin at a time to determine which one is causing the issue.

This is a hit and trial method but effective in this case.

Corrupt .htaccess files

  1. Connect to your website using an FTP client or file manager in cPanel.
  2. Locate the .htaccess file in the root folder of the WordPress site.
  3. Download the .htaccess file to your computer to make sure that you have a backup.
  4. After that, delete the file from your server.
  5. Try to access your website.
  6. If the error was caused due to a corrupt .htaccess file, then the issue would be resolved after this.
  7. Generate a fresh .htaccess file from your WordPress admin page.

Corrupt .htaccess files can also cause WordPress 500 errors or 500 Internal server errors.

File Permissions

File permissions give you control over who can access the files on your website. An issue with file permissions can give you 403 forbidden errors.

If this is the reason you are getting a 403 issue or you are unable to resolve the error by trying the above troubleshooting method, you must contact your web hosting support.

Certain Web Hosting companies provide the best and most helpful customer support you can ever receive.

You can also check out:   Managed Cheapest WordPress Hosting

3. 503 services unavailable WordPress

503 Service Unavailable Errors can appear if your server cannot be reached or your web server is unable to get a response from a PHP script.

There are various reasons due to which you are experiencing this issue. It can be as simple as dysfunctional WordPress plugins, a corrupted theme, snippet code, DDoS attack, heavy usage, or a server glitch.

Create WordPress Error Logs and Troubleshoot 8 Most Common WordPress Errors

In certain cases, the issue is resolved on its own and the error goes away. However, there are instances where either you have to resolve the issue on your own or contact your Web Hosting Company customer support.

  1. You can troubleshoot this WordPress error by disabling all the plugins temporarily. 
  2. Rename the plugins folder from the wp-content directory. 
  3. Check if you are still getting the error. 
  4. If not, rename the plugins folder back to the original.
  5. Enable the plugins one by one and opening each page on your website separately to find out which plugin might be giving you this particular error.

If your issue is not resolved here, you can switch to a default theme from cPanel, and see if the error still pops up. If not, then that’s great.

If you are still experiencing issues, contact the support team of your Web Hosting company. 

4. WordPress increase memory limit

As the error name suggests, we are dealing with issues related to insufficient memory. 

If you are getting WordPress Memory limit exhausted error, then you can increase your memory limit by making a few changes inside wp-config.php.

  1. Open the file via FTP
  2. Add define(‘WP_MEMORY_LIMIT’, ’64M’) before “That’s all, stop editing!”
  3. You can also increase the memory to 128M or 256 m, as per your requirements.

Alternatively, you can also upgrade your hosting plans if your site is growing very quickly.

5. WordPress database connection

The reason that you are getting this WordPress error can be attributed to an incorrect database entered in the wp-config.php file. 

You can also encounter this error if your web server is down.

So, to resolve this, all you have to do is check whether the details that are present in the wp-config.php file are correct or not. Open the file through FTP and cross-verify your data.

If the issue is not resolved, it is better to contact your web hosting support rather than making changes that might impact your data.

Error 404 or Permalinks not working can be caused due to new plugin installation, or updating an old plugin leading to compatibility issue.

If you are restoring your backup files or migrating your WordPress site to a different server/domain, you might encounter this issue.

Most importantly, if your .htaccess file has been modified in any way, it can result in a broken permalink.

 

Create WordPress Error Logs and Troubleshoot 8 Most Common WordPress Errors

There are a few ways to resolve this issue. 

  1. You can refresh the permalink settings from the dashboard. 
  2. Toggle from standard settings to a different setting
  3. Change it back to standard. 
  4. Save these changes and check if the issue is resolved.

If not, you can try to reset the .htaccess to the default code. These are configuration files for use on web servers. Modification or incorrect entry in these files can result in 404 errors. 

Follow these steps to reset .htaccess to default code:

  1. Login to your server via FTP.
  2. Locate WordPress.
  3. Create a .htaccess backup file and download it by double-clicking it. Rename the file back to the original.
  4. Open the downloaded .htaccess file in a text editor.
  5. Delete all text within it and copy the default .htaccess code.
  6. Save the file and upload the file to the server.

This should resolve your issue and the error should stop occurring. 

7. Crawl errors in WordPress

Crawl errors occur when the search engine is unable to access a page on your website and in turn, the bot is unable to crawl the page and the links.

There can be two types of crawl errors: site and URL.

Site errors mean that the search engine bots cannot access your complete site and hence it cannot be crawled. 

Trust me; you don’t want this to happen!!!

Site errors can occur due to:

  1. Server downtime which will show you a connection timed out error;
  2. If the crawlers are unable to read the robot.txt file, the search engine bot will postpone crawling;
  3. A DNS issue, which is a temporary issue, occurs if the bot is unable to access the site at the moment but will do it later.

URL errors occur mainly due to internal links that lead to pages that have been deleted or there have been a modification to the permalink. This means that the search engine bots will not be able to find the page when it crawls the link.

For this, check which resources are blocked to the search engine bot and fix the links or the robot.txt file if that’s what’s giving you the errors.

You can manage and maintain your site from the Search Console. 

8. White Screen of Death

As the name suggests, all you get is a white screen and no error is displayed. This occurs due to PHP code errors or memory limit issues. 

WordPress site not loading properly due to WSoD is usually the easiest to resolve. Try these methods to troubleshoot the White Screen of Death.

  1. Clear your browser and WordPress cache.
  2. Switch to the default theme.
  3. Disable all plugins and use the hit and trial method to find out which plugin might be the reason for WSoD.
  4. Increase memory limit.
  5. Fix any crawl errors that you might find on the search console. 
  6. Check for file permissions. 
  7. Update PHP version

Conclusion

We hope you now understand the importance of creating WordPress debug error logs and how it helps in resolving your WordPress errors. Always remember to create a backup and if you are still experiencing issues contact your web hosting support for further assistance.

If there are any other WordPress errors warnings that you want the solution for, you can let us know in the comment section. We’ll do our research and let you know how to troubleshoot those errors.

WordPressHosting is a WP, Themes and Plugins writer who focuses on WordPress, SEO tools, and Plugins. WordPress Hosting has focusing on the largest WordPress Hosting and theme resource site in the industry.
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *