While WordPress is really easy to use, there are common WordPress errors that can make you panic or smash your desk in frustration. Good news is that the error you are seeing on your site had most likely been reported and resolved by someone before you. So that annoying error should not cause you to fall out of love with WordPress. Here are some common WordPress errors and how you can fix them.
In case you have received a 500 internal server error, your site might be suffering from one of the many WordPress errors. Just exercise some patience and be prepared for some serious troubleshooting.
Plugins or Theme
If you can access the dashboard, then click on “Plugins” and disable the one you installed recently. If this doesn’t help then select all the plugins using the topmost tick box and choose ‘Deactivate’ to deactivate all the plugins on your site.
If you don’t have access to the dashboard, then you can test the plugins via FTP. Navigate to the relevant directory and then open up ‘wp-content/plugins.’ This contains all the plugins you’ve installed. Rename this folder slightly to test whether the problem is from the plugins. You can as well test individual plugins by renaming their corresponding folders. If the plugins are not the cause of the problem, you can reinstall all of them by simply changing the name of the folder back to the way it was originally. If you have found the plugin which is at fault, there could be one of many reasons. So it is best to simply remove it and to find another plugin that achieves a similar result.
If your plugins are not at fault, then the problem could be with your theme. Start by backing up your theme folder then deleting your theme. WordPress will install a default theme. A problem with your theme could be resulting from some poor coding; so look at your theme’s functions.php file to find out if this is where the problem is. You may be forced to contact the theme’s author if you can’t do this on your own.
If the solutions above do not help then you can enable PHP debugging. Only follow these steps, if you are confident with your coding skills.
Open wp-config.php, then search for this line:
Add ‘//’ at the beginning of this line, so that it’s commented out.
Now, copy and paste this code below the above line:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); @ini_set('display_errors',0);
With the help of this, errors will be sent to a file naming error.log which is available in wp-content folder. In order to make changes, make sure the permission is set to 666 for this file.
It’s time for you to check if your .htaccess file has corrupted. Rename the file by adding “temp” or something similar on the end.
Enable “view hidden files” in order to look for .htaccess file in your FTP server. Now, login to your wp-admin and go to “Settings > Permalinks” and reset your permalinks. By doing this, a new version has been created for the working file. Check if the common wordpress errors have been solved.
This error is most likely as a result of one of three things:
For a theme or plugin issue, refer to the previous section. The methodology of troubleshooting is exactly the same.
This error occurs when you’ve reached the memory limit. Increase the memory by accessing the wp-config.php file. Within the main PHP tag you will add the code
define ('WP_MEMORY_LIMIT', '64M');
this will increase your memory limit to 64M which is always a safe amount.
This is commonly a server error, but it might result from other reasons. It could be that you’ve simply changed your database login details and this may require you to repair the database.
The error may result if you change your database password or root password. If that’s the case, then you’ll also have to change this in the wp-config.php file.
So jump into your wp-config.php file and make sure the information is correct.
define('DB_NAME', 'database-name'); define('DB_USER', 'database-username'); define('DB_PASSWORD', 'database-password'); define('DB_HOST', 'localhost');
It’s important to verify what your DB host value is, so that the final line is correct. In the majority of cases it will be localhost, but do some research just in case. If you’re running WordPress on a local server then replacing localhost with the IP address might fix the problem.
If you are seeing different error messages on front end and back end of your website, then you should add the following to your wp-config.php file:
After this, visit this url: http://www.yoursite.com/wp-admin/maint/repair.php, you will see an option is displayed to repair the database. Once you do the repairing, make sure to remove the above code from wp-config.php
As you can see, common WordPress errors have a way of fixing them. All that you need to do is either to do a little research to find out how to fix the error on your own or to find an expert who can help you fix the error.