WordPress recently was all over the news, gaining momentum for security errors to fix. It was recently made known to the public that a serious 0day vulnerability has been made public, which could allow hackers and exploiters to gain admin access as easily as posting a single comment containing the malicious code. Now that’s something you probably want to avoid.
In light of these news, here’s a quick rundown to look out for on your own site in order to protect yourself against any sort of attacks:
- Install only essential, and frequently used plugins. (Also check out our recently published post that relates to the things to do and not to do when it comes to installing new WordPress plugins.)
- Do your best to find a solid Web Application Firewall that will protect your WordPress site.
- Check your plugins and how frequently they’re updated, especially once an exploit has been released.
- Akismet Comment Protection comes very handy if you’ve got comments enabled.
- Make backups, check your sites logs (either raw or through an app), do all you can to protect yourself and your users.
It goes without saying that security is going to be the biggest concern that you’re going to fix on your site, with security comes a lot of other things, but if you can get all that sorted and figured out to a certain extent, everything else will be a breeze. Now let’s take a look at common WordPress errors and how to fix them, one similar roundup we did late last year, where we talked about common WordPress theme errors. Lets try and expand on that.
1. Connection Time Out
Time outs can occur sometimes on WordPress websites, until they get fixed. In most cases, there are two factors that come into the play. It’s either your server resources that are being forced to do more than they’re capable of doing, or there are database queries way too large for the installation to handle.
Usually you can fix this by adjusting the memory limit within your php.ini file, and the easiest way to do is by creating a new “php.ini” file and filling it with memory=256MB or however much free memory you’re able to allocate, as this can significantly increase the performance of your server and WordPress installation. After you’ve done that, you can upload the php.ini file to your server and it should work just fine. In case you need further information or support regarding this issue, we recommend that you contact your hosting provider.
2. Exhausted Memory Error
This error directly correlates with what we’ve learned in the above paragraphs.
Fatal error: Allowed memory size of 22445566 bytes exhausted (tried to allocate 11223344 bytes) in /var/www/wp-includes/plugins.php on line 11
If you find yourself in front of this error, the best way to solve it is by increasing the memory limit as already shown above. Another good place to start is the P3 (Plugin Performance Profiler) plugin – which will give you a better idea of what is causing errors and why.
3. Internal Server Error
“500 Internal Server Error” is probably the most frequently seen WordPress error, certainly the most common one since it is so easy to trigger. Here are few of the reasons why the “500 Internal Server Error” pops up:
- Server overload
- Corrupted .htaccess file
- Plugin malfunction
- Theme malfunction
While WordPress doesn’t directly display where these errors are coming from, the easiest way to access the root cause is to look within the servers log files for that particular domain. There you could find what is triggering this error, and then from there it will be easier to fix it. We’ve also noticed that most of the time users are having this error when their site is hosted on a shared hosting environment and website traffic exceeds the allocated limit of the hosting plan. In that case you might want to contact your hosting provider and upgrade to a larger hosting plan.
4. Plugins & Themes Won’t Delete
Usually this has to do with system permissions, but it does happen quite frequently, and can get a little bit annoying to know that you’ve got files piling up; especially when vulnerabilities are sprouting into the open like there’s no tomorrow.
The alternative to files that can’t be deleted is to delete them directly – either through the server console, or by using the website management suite that you’re using and deleting the theme/plugin that way. But in general it is recommended to check the configuration of the file permissions on your server to enable WordPress taking care of theme/plugin deletion automatically.
5. Error Establishing A Database Connection
The last error on our list is all about databases. It’s another common one if you’ve got problems with your database, and to recap – here are the top three reasons why it happens and how to fix it:
- WP-Config.php – this is where your database config resides, more often than not, this is where you can fix your error. Check whether all the info you entered is correct, also check the file permissions of the config file.
- Hosting Provider – frequently it is also the hosting provider that can cause these errors, mostly it’s that the database server is experiencing some issues and will be fixed shortly. If it persists, you could ask them to give you additional days of free hosting as a reward, or look for a new provider.
- Security Check – to be absolutely sure, you could employ tools such as Sucuri SiteCheck to triple check the status of your site, although by now the site should function as intended.
In any case, if you have the necessary skills to take care of WordPress fixes and manage the site on your own, including the database server, you usually will have no trouble finding what the cause of the errors is. If you’re not familiar with managing a website/server, we recommend to not change any site/server configurations on your own, unless you are absolutely sure that you won’t break any functionality of your site. Otherwise you might want to contact your hosting provider instead and ask for help or additional resources.