3 common WordPress errors and how to fix
January 29, 2015
/
3 common WordPress errors and how to fix

Smashing your desk in frustration? Is an annoying error causing you to fall out of love with WordPress?
It’s a wonderful platform both for blogging and CMS, but no software is without its flaws. This article overviews 3 of the most common WordPress errors, providing handy solutions to the ‘The White Screen of Death’, ‘Internal Server Error’ and ‘Error Establishing Database Connection’. Some of the tips contained within this article can be applied to other errors, so even if your site hasn’t fallen over, you might learn something useful for the future…1) The white screen of death
One of the most infamous errors, it has resulted in broken crockery across the globe. It will most likely be down to one of three things:- Exhausted memory
- A plugin
- A theme
Exhausted Memory
Reaching the memory limit is often the problem behind this error. To increase your memory, access your wp-config.php file — navigate to the root file of your site using an FTP client or the File Manager in your hosting panel. Within the main php tag you will need to add a line of code, which will increase your memory limit to 64M:define('WP_MEMORY_LIMIT', '64M');
Plugins
If you have access to the dashboard then troubleshooting plugins is simple. Simply click on ‘Plugins’ and disable the most recently installed one, if this doesn’t help then you can deactivate all of your site’s plugins, select all the plugins using the topmost tick box and choose ‘Deactivate’. If you don’t have access to the dashboard, then an alternative way of testing plugins is via FTP. If you have an FTP client, then simply navigate to the relevant directory. Open up ‘wp-content/plugins’, which will contain all the plugins you’ve installed. Simply rename the ‘plugins’ folder slightly, maybe add a word at the end – so ‘plugins’ becomes ‘plugins-test’. Alternatively you can also use this same methodology to rename the folders of the individual plugins, which will test each plugin individually – rather than all of them at once. If you’re happy to reinstall your plugins, simply rename the folder back to its original name. If a plugin is at fault, there could be one of many reasons. The best approach is to simply remove it and find a plugin that achieves a similar result. Try and find a more recent plugin, or one that has been updated so that it won’t cause issues.Themes
If troubleshooting your plugins hasn’t helped, then annoyingly it could be your theme. The first thing to do is backup your theme folder. You can then simply delete your theme, and WordPress will install a default theme. If you’ve determined that the theme is at fault, then you will want to look at your theme’s functions.php file. Some poor coding may be the issue, if you’re not confident in adjusting this yourself, then perhaps contact the theme’s author. Purchasing a trustworthy theme whose author offers support is always advised. Still thumping the desk in frustration? There is another method that might help – Enabling Debug mode.Enable PHP debugging
If the solution above haven’t fixed your issue, then you will have to dig a little deeper. The process outlined below will help to identify your problem. However, fixing the problem once you’ve discovered what it is might require some more advanced skills. Firstly, open up the wp-config.php file. Then locate the following line:define('WP_DEBUG', false);
//define('WP_DEBUG', false);
define('WP_DEBUG', true);define('WP_DEBUG_LOG', true);define('WP_DEBUG_DISPLAY', false);@ini_set('display_errors',0);
2) Internal server error
If you’ve received a 500 internal server error, then you might not be aware of the really bad news – it could be one of many problems! So make a highly caffeinated hot drink, take a breather, and be prepared for some more troubleshooting. The good news? Some of the methodology is the same as the previous section.Plugins or theme
Refer to the ‘Plugin’ and ‘Theme’ sections of the previous section. The troubleshooting methodology is exactly the same.Exhausted memory
Again, this process is the same as the previous section.Bad .htaccess
Not any of your plugins, or your theme? Time to check if your .htaccess file has become corrupted. Firstly rename the file — again just add ‘temp’ or something similar on the end. Can’t see the file? Then you’ll have to make sure that you’ve enabled ‘viewing of hidden files’. How to achieve this will depend on your FTP client, but it will be fairly simple. For example in Filezilla, simply select ‘Server’ from the top and then select ‘Show hidden files’. Now onto the next step, firstly go back to the WordPress admin area. Navigate to ‘Settings – Permalinks’, and then reset your permalinks. You’ve now generated a new version of the working file, so you can check to see if the problem has been fixed.Enable PHP debugging
This has also been covered in the above section, so once again, scroll up.3) Error establishing database connection
There could be several reasons for this error. It is commonly a server error, but it might be that you’ve simple changed your database login details. It’s important to establish if you receive this error on both the front and back end of your site. If you see the same error message in the back end (wp-admin) – ‘Error establishing a database connection’, then you can skip the next step. However, if you’re seeing a different error message which includes something along the lines of ‘…..The database may need to be repaired…’ then you should add the following to your wp-config.php file:define('WP_ALLOW_REPAIR', true);
WP-Config file
Have you changed your root password, or database password? If so, 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');