Quantcast
Channel: How To’s & Tutorials – ThemeFuse
Viewing all articles
Browse latest Browse all 114

How To’s & Tutorials3 Annoying WordPress Errors And How To Fix Them

$
0
0

WordPress is definitely a loveable platform, which doesn’t mean it doesn’t have its moments. It can frustrate us with white screens of death, unexpected PHP errors, dysfunctional plugins or service crashes, some of them requiring lots of time and effort to fix. Still, the good thing about WordPress is that there is nothing that can’t be fixed, and that’s exactly what this article is trying to explain.
fixing wordpress errors

1. Error: Blank Admin and Blog pages on WordPress

How does it happen?

These errors are often a result of irresponsive themes or improper installations and upgrades. You try to access the blog or the admin login page, but all you see are blank pages. There is no way to lay hands on the dashboard. What do you do?

Solution 1: Use FTP to rename the currently installed theme folder

When you rename your current theme folder using FTP, WordPress will pick the default theme and will restore the service, enabling you to access the wp-admin afterward.

– Go to the wp-contents/themes directory using FTP.
– Change the name of the present theme folder. For instance, ‘YourThemeName’ can become ‘YourThemeName2’.
– Go to the WordPress wp-admin and try to log in.
– Compare the themes to see whether they are compatible with the WordPress version you’re running.
– Check whether the coding of your theme can be executed.

Solution 2: Use FTP to reset the plugin folder.

– Go to the wp-contents directory using FTP.
– Change the name of the plugins folder to ‘plugins-temp’.
– Open a new folder named ‘plugins’ inside the wp-content folder.
– Go to wp-admin and try to log in.
– Change the plugin from ‘plugins-temp’ to ‘plugin’, and start activating them one after the other. Check whether there are plugins that are incompatible with your current WordPress version.

2. Internal Server Errors

This is probably the most common error encountered at least once by every WordPress user. The most annoying thing about it is that you only get to see the ‘Internal Server Error’ message, and there is no indication of what has to be fixed. Another problem related to this error is that, unlike other WordPress errors, it can be caused by many different causes. Let’s check what can cause it:

  • Corrupted functions of some plugin
  • Corrupted functions on the theme
  • Corrupted .htaccess
  • Exhausted PHP memory limit

What can be done?
If it is your first time to experience it, remember not to panic. Solutions are available:

a. Alter the .htaccess file

Corrupted .htaccess files are the most frequent reason for these errors. In order to fix them, use the FTP File Manager to login into the root directory, and replace the name of your .htaccess file with .htaccess.old. Once done, click refresh and wait for the browser to fix the error. Most probably, the error will be gone once the screen is restored, and you’ll need to go to Settings -> Permalinks and select the Save Changes option in order to reset the .htacess and to flush write the rules. In case the operation was not successful, recheck the plugins.

b. Deactivate the plugins

deactivate plugin
It is not rare for recently installed plugins to cause the error, which is a lucky circumstance for you because you’ll know exactly what to uninstall or remove. A more serious situation is when the error has cropped up caused by an old plugin or revealed incompatibility on a later stage. This is something you won’t know unless you deactivate all plugins, and look for the one that is causing the problem.

But how are you supposed to deactivate the plugins when you can’t access your WordPress admin page? You have no insight in the administrative menu and the posts contained in the WordPress Codex. What you can do is to skip the WP Admin post and check the How to Properly Uninstall WordPress Plugins. If the error is gone, you’ll need to reactivate plugin by plugin to see which one has caused the damage. Remove it, and find a good substitute. A useful thing to do is to contact the author of that plugin and to inform him of the error so that other users won’t experience the same problem.

c. Alter the themes

In case plugins are not the culprits of the error, it is very likely that you’re experiencing a theme problem. Switch the theme with Twenty Sixteen, and reload the site. If the error is still there, you’ll need to go to the folders and upgrade some of them.

d. Check the wp-admin and the wp-includes folder and repair them

In case you’re still struggling with the same error, try to replace the wp-admin and the wp-includes folder with fresher WordPress install versions.

e. Increase the PHP memory limit

php memory limit
If nothing works, you’ll have to drill deeper to examine the cause, and deal with few server issues. As you can imagine, handling internal server errors is difficult and frustrating, and there will be few obstacles to overcome, but that doesn’t mean you are supposed to handle the issue to an expert. This is how you do it yourself: In case you want a fast and temporary solution, you can fire up the code editor yourself, and create a new text file called php.ini inside it.

After that, open the file, and add the following code:

memory=128MB

(adding a larger value is also possible)

Save the file and upload it to /wp-admin/. In case you increase the memory limit but the problem continues appearing, contact the web host to check whether there is an external problem that is exhausting your memory. It could happen that the functions on your theme are broken or poorly designed, or that there is a dysfunctional plugin that is causing the damage without you being able to fix it. The host has all information on your server logs, and will definitely be capable of solving the problem.

3. Error: Establishing a Database Connection

establishing_a_database_connection

It doesn’t take much to explain this error – it simply speaks for itself. From the very moment, it appears, it becomes clear that something went wrong while connecting to the WordPress database, and that you need to streamline that connection, to say at least.

What can cause an error in the database connection?

wp-config.php errors
– Hosting provider problems
– A hacker attack! This should warn all those among you believing that database access is no big deal.

How can you solve this problem?

a. Alter the wp-config.php file

Go to your wp-config.php file using FTP and check whether the host, the database name, the username and the password are correct. If you’re not that familiar with altering wp-config.php files, read something about it first.

b. Contact the web host to fix the issue

If it seems like there is nothing to change in your wp-config.php file, and WordPress is still reporting problems, you should consult your hosting provider. They will locate the problem immediately, and tell you whether you’ve exceeded the quota of your database and caused the server to go down. In case they report no problem on their behalf, it may be the time for you to tackle some security issues.

c. Scan the website for compromised security

With all hackers around, you simply can’t be 100% safe, especially if you haven’t taken some basic security precautions. In order to protect your website from hackers’ attacks, try scanning it with Sucuri SiteCheck and similar tools. If the tool reveals a threat, try to keep calm, and ask for professional help.


Viewing all articles
Browse latest Browse all 114

Trending Articles