5 Most Common WordPress Errors And Their Solutions
WordPress is the most popular CMS in the world powering 29% of the global internet. WP is the first choice for millions of people across the globe to create a website, blog or eCommerce sites. It is one of the best platforms to take your business or brand to masses, boost brand identity and increase return on investment.
There are quite a few errors that pop up on every WordPress site every now and then
So stick to this guide until the end.
1.Error ‘403 Forbidden’ in WordPress.
Error ‘403 forbidden’ is one of the most common and dreadful errors in WordPress that can come across at one point or another.
One of the primary causes for this error in WP is because of imperfectly installed or configured security plugins. Some of the WP security plugins block IP addresses if they suspect them to be harmful. Another possible reason can be incorrect file permissions on the server and .htaccess file.
Solution for Error Caused By WP Plugins
- First of all, temporarily deactivate all WP plugins available on your site, including the security plugins.
- Check if it is resolving your issue. If your issue gets resolved, it simply says one of the WP plugins was responsible for this error.
- To find out the plugin responsible for the error, activate all plugins one by one until you don’t reproduce the ‘403 forbidden’ error again.
Solution to Error Caused by .htaccess file
- First, connect to your site using the file manager or FTP client in cPanel. Now look for the .htaccess file in the root folder.
- Download this .htaccess file to your computer so that later on you can take a fresh backup of it.
- Now delete this file from your server. Access your site and see if the error is resolved. If yes, now you can create a new .htaccess file from your WP admin area.
2.WordPress Automatic Logout Issue
WordPress sets a cookie in your browser to authenticate a login session. This cookie is set for the WordPress URL stored in your settings section. If you are accessing from a URL that does not match the one in your WordPress settings, then WordPress will not be able to authenticate your session.
The WordPress URL and the Site Address are two different URLs (notice one has www. and the other doesn’t).
A simple fix for this login issue is to make sure that you have the same URL in your Site Address and WordPress Address fields in your WordPress settings. This means that you need to choose either www or a non-www URL in the both fields.
Login to your WordPress dashboard and go to Settings » General.
If you can’t access the admin area, then you can update these fields by editing the wp-config.php file.
Connect to your website using an FTP client,and locate the wp-config.php file in your site’s root directory. You need to download this file to your Desktop and open it in a text editor like Notepad. Add this code just above the line
1 define(‘WP_HOME’,’http://example.com’);
2 define(‘WP_SITEURL’,’http://example.com’);
If you prefer to use www in URL, then use this code instead
1 define(‘WP_HOME’,’http://www.example.com’);
2 define(‘WP_SITEURL’,’http://www.example.com’);
3. 503 Service Unavailable Error
This error usually occurs when your web server is not receiving a proper response from a PHP script. And this PHP script can be your WP theme, plugin or custom code snippet.
To fix it, we will disable all unnecessary PHP scripts one by one until the error is resolved.
All your WP plugins are PHP scripts so you can deactivate them.
Since you can’t access your site directly because of the 503 error, you will have to connect to your website through an FTP client or File Manager in cPanel.
Once you’re connected, look for the WP root folder, it will be named as public_html. Open this folder and go to the wp-content directory. Now find the ‘plugins folder’, do right click and rename it. You may give it the name ‘plugins deactivated’ or whatever you like.Now access your site, see if the error has resolved. You should be able to visit your WP site if the plugin was behind this error. By replacing the name of your WP plugins directory, it automatically deactivates all of your plugins.
Now you need to correct the name of your WP plugins directory back. Change your plugins name back to its actual name i.e. plugin. This way WP will recognize all your old plugins, but they will be inactive by default.
4. Fixing the 502 Bad Gateway Error in WordPress
502 Bad Gateway error happens when some pages, scripts or queries take too much long time to complete and then rejected by the web server. Most of the time, this error gets resolved itself. But if it does not resolve itself within few minutes, you can use the following method to resolve it.
Few common reasons that cause this error.
- Your server is overloaded
- Buggy PHP scripts in your site
- Some technical Issues with your network and router
- Server down
- Browser Cache Overload
How to fix it,
Reload Your Site
Sometimes 502 Bad Gateway error is not as serious as you think. Perhaps your server is overloaded causing this error. You may try refresh button or F5 to reload the web page.
Clear the Cache of Your Browsers
Try to access your site in different browsers. If this error disappears in a new browser and comes back when you access your site through the old browser, it means it is the issue with the cache of your browser.
By clearing your browser cache you can experience fast accessing and loading speed of your site.
Fix the DND Issue
If above methods are not working for you, probably the error is in your DNS settings. Check if your domain is not on the right IP address. If not, you can seek the help of your web host.
5.White Screen and missing Buttons on “create new post” page.
One of the more common issues with WordPress is that it sometimes displays a “white screen” where you can’t click or interact when you’re trying to scribble down a new post.
Or, some buttons from the top bar aren’t available. The fixes to the problem are simple.
Clear the Browser Cache
Upon our search, we found users suggesting that clearing the browser cache worked for them. The first thing you should try to do is clear the browser cache or use another browser. This could very well be an issue with your computer.
Fix with wp-config
Open your wp-config.php file and add the following line at the very top after the php opening tag.
1 define(‘CONCATENATE_SCRIPTS’, false);
Conclusion
Without a doubt, WP is a strong platform, but like any great software it may encounter some errors. We hope you learned how to fix these errors in this tutorial.