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.
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.
Table of Contents
In This Post
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.
- Too many redirects
- 403 forbidden WordPress
- 503 service unavailable WordPress
- WordPress increase memory limit
- WordPress database connection
- Permalinks not working WordPress
- Crawl errors in WordPress
- 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.
You can troubleshoot this WordPress error by clearing your browser’s cache and cookies.
For Google Chrome
- Click on the browser settings menu
- Select More Tools
- Click on Clear Browsing Data
- Select ‘Clear cookies and other site data’ and ‘Cached images and files
- 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
- Click the menu button and select Options.
- Select Privacy & Security
- In the Cookies and Site Data section, click on Clear Data
- Remove the checkmark for Cookies and Site Data.
- Select Cached Web Content
- Click on the Clear button.
- 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”.
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.
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
- Connect to your website using an FTP client or file manager in cPanel.
- Locate the .htaccess file in the root folder of the WordPress site.
- Download the .htaccess file to your computer to make sure that you have a backup.
- After that, delete the file from your server.
- Try to access your website.
- If the error was caused due to a corrupt .htaccess file, then the issue would be resolved after this.
- 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 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.
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.
- You can troubleshoot this WordPress error by disabling all the plugins temporarily.
- Rename the plugins folder from the wp-content directory.
- Check if you are still getting the error.
- If not, rename the plugins folder back to the original.
- 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.
- Open the file via FTP
- Add define(‘WP_MEMORY_LIMIT’, ’64M’) before “That’s all, stop editing!”
- 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.
6. Permalinks not working WordPress
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.
There are a few ways to resolve this issue.
- You can refresh the permalink settings from the dashboard.
- Toggle from standard settings to a different setting
- Change it back to standard.
- 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:
- Login to your server via FTP.
- Locate WordPress.
- Create a .htaccess backup file and download it by double-clicking it. Rename the file back to the original.
- Open the downloaded .htaccess file in a text editor.
- Delete all text within it and copy the default .htaccess code.
- 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:
- Server downtime which will show you a connection timed out error;
- If the crawlers are unable to read the robot.txt file, the search engine bot will postpone crawling;
- 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.
- Clear your browser and WordPress cache.
- Switch to the default theme.
- Disable all plugins and use the hit and trial method to find out which plugin might be the reason for WSoD.
- Increase memory limit.
- Fix any crawl errors that you might find on the search console.
- Check for file permissions.
- Update PHP version
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.