How To Fix WordPress Theme Common Error?

WordPress is an excellent web building tool and a widely used CMS. The reason for its popularity is the amazing features and attributes that are provided by the platform. Around 50 to 60% of websites that use a CMS are built on WordPress. While WordPress is extremely easy to use, there are a few common errors that can make it annoying.

However, the best part is that the error you face on your website has most likely been reported and solved by someone before you. Remember for WordPress development companies its has a huge online community and a lot of documentation for its tools.

We have listed here some common errors that people generally encounter with their WordPress site.

How to fix WordPress Error establishing a Database Connection

This tells you that the connection with the database has been broken. Causes may be :

Problem with your hosting server
Error in wp-config.php file
Your site might have been hacked

Solutions :

1) Hosting Server

Fix problems with your hosting server by talking to your WordPress hosting provider regarding the problem. He would be able to tell you whether your database shuts down for exceeding its quota or there is some other issue with the server.

2) WP-Config.php File Error

Open your wp-config.php file using FTP or file manager. Now, check if database name, host, username, and password are correct. If you find any discrepancy, correct them immediately.

3). Scan your Website to check if it’s been Hacked

WordPress is the most preferred open-source platform but is vulnerable to security threats. It is a top target for hacking. Run a security check on your entire website to find out whether it is compromised. If you find that your site has been hacked, immediately change your login details and restore your website from the backup.

Fix White Screen of Death

This error shows a white screen of death with no error message, leaving you clueless as you have no idea what to do, how to fix it.

Causes:
It is often caused by an exhausted memory limit or poorly coded theme/plugin

1) Increase the Memory Limit

Exhausted memory limit is one popular reason of this error, so it is recommended to increase the memory limit. To increase the limit, open your wp-config.php file and add the following line of code within the main PHP tags.

define(‘WP_MEMORY_LIMIT’, ’64M’);This increases your memory limit to 64M.

2). Replace your Theme with the Default Theme and Disable all Plugins

In case the problem persists, disable all your plugins and replace your currently active theme with the default WordPress theme and check if it still shows a white screen of death. If the issue is resolved, either your theme or one of your plugins is causing a white screen. Activate one plugin at a time and see its effect on the website. If the problem is gone, check your theme’s functions.php and remove any extra spaces at the bottom of the file.

How to fix WordPress 500 Internal Server Error

This is one of the most common errors that almost every WordPress website encounters at least once. The potential causes are:

Exhausted PHP memory limit
Corrupted plugin functions
Corrupted theme functions
Corrupted .htaccess

1) Increase the memory limit as mentioned in the previous step.

2) Edit .htaccess file

Open your .htaccess file from the file manager and rename it with .htaccess old. Refresh your website and see if the problem persists. If it’s gone, click on settings > permalinks and save changes to reset .htaccess.

3) Deactivate all the Plugins

If there was no resolution to the problem, even after changing your .htaccess file, you might want to check your plugins. So, first of all, deactivate all your installed plugins. Now go to your website, refresh it and check if the error is gone. If it’s gone, activate your plugins one by one and see which plugin has caused the problem.

4) Replace WP-Admin and WP-Includes Folders

If no tricks worked out, try replacing your wp-includes and wp-admin folders with fresh copies by reinstalling WordPress. Save and upload them. Refresh the browser and see if the problem is resolved.

How to recover WordPress Admin Email & Password

It’s common to forget your email or password. It may happen that when you click on the lost password link to recover the details, you never get the reset link in your inbox. The actual cause for this is unknown, but you can still work out a solution.

1) Edit your Functions.php file and add the following line of code.

wp_set_password(‘DesiredNewPassword’, 1);

Put a new password in place of where it says “DesiredNewPassword.” Save the file and upload it again. Log into your website, remove the code from the file and upload it again.

2) Reset your Email and Password via PHPMyAdmin

Log into cpanel. Click on phpMyAdmin and select your website’s database. Click on the wp_users table and edit your record. Enter a new value for user_pass and remember to convert your password into MD5.

How to fix WordPress Connection Time Out Error

This error is usually caused by an overburdened shared server.

Solutions
Increase your PHP memory limit
Deactivate all plugins and next remove the plugin that was causing the problem.
Switch to a default WordPress theme to check if your theme is causing the problem.

How to Fix WordPress 404 Page Error

This cause of this error is your website not able to find the page you’ve specified.

Solution:
Reconfigure your permalinks. You can also manually rewrite the rules to overwrite default permalink settings.

WordPress Parmalink error

How to fix WordPress Memory Exhausted error by increasing PHP memory limit

A memory exhausted error causes a white screen of death when a WordPress plugin or a script exhausts the default memory limit.

Solution
You need to increase your PHP memory limit. To increase the limit, open your wp-config.php file and add the following line of code within the main PHP tags.

define(‘WP_MEMORY_LIMIT’, ’64M’);
Replace your theme with the default theme and disable all plugins

Fix Unavailable for Scheduled Maintenance Error

You may get this error due to an interrupted or unfinished WordPress update.

Solutions
Manually update your WordPress installation. Secondly, delete your .maintenance file by going into the root directory.

Wrap up

WordPress is a powerful software but has its flaws. In today’s post, we have discussed certain common errors with their causes and solutions. As a user, you should try to find the errors and get rid of them permanently.