fb

We all know that WordPress is easy-to-use and it can help you to save your web development cost by more than 40% when compared to custom website development.

But working on WordPress websites can sometimes drive us crazy.

wordpress errors website developers india

Being a team of WordPress developers in India, we also encounter these issues quite often and we know how to fix them.

So, in this blog post, we thought to share some of those common WordPress errors that you may also encounter during your website development along with their solutions. It may be helpful for you to read this blog post. 


Also, as a precautionary note, we would like to mention here that before you implement any of the suggested measures in this blog post to your website, just make sure to backup your website first.

#1 Internal Server Error

One of the most common error that your WordPress website may throw back on you is “Internal Server Error”. If you already have been using a WordPress website for quite some time, you probably know what we are talking about here.

The annoying thing here is that this error doesn’t give you any hint where could the possible error be. But experienced web developers do know the possible cause of this error and how to fix it. 

Below are some of the reasons that may cause “Internal Server Error”:

  • Corrupted .htaccess (this is where we start investigating first).
  • Corrupted plugin codes
  • Corrupted theme codes
  • Exhausted PHP memory limit

How to fix the “Internal Server Error” warning.

  • Fixing .htaccess file: If we encounter this issue, the first thing that our WordPress developers would do is access the .htaccess file on the server via FTP file manager, rename it to “.htaccess_old”  and refresh the browser to check if the error is no more visible. If the error doesn’t appear anymore, then we would just go back to ‘wp-admin”, click “Settings > Permalinks” and click on the Save Changes button to reset the .htaccess and flush write rules.

    However, if the error still persists even after renaming the “.htaccess” file, then we go to the next step of the investigation.

  • Deactivating plugins: The “Internal Server Error” warning could also occur because of the plugin that you recently installed on your WordPress website. So, the next step is to disable all the plugins and see if the error still persists.

    But the challenge is, you can’t access your ‘wp-admin’ when your website is showing “Internal Server Error”.

    So, you can perhaps access the plugins folder through the FTP file manager and rename all of the plugins of your website. Once you do that, you can refresh your browser and check if the website doesn’t show the error message anymore.

    If it doesn’t, you may rename back the names of all the plugins one by one and check after each rename, when your website does show the “Internal Server Error” warning again. This way you can figure out which plugin has caused the issue and you can replace this plugin with an alternative solution. However if the error message is still there, you can follow the next step of investigation. 

  • Switch your WordPress theme: Switching your website theme to the default theme of WordPress may also help sometimes to fix the “Internal Server Error” which means that your theme has some issues and you will have to engage a website builder to fix it for you. But by switching over the theme, you can at least figure out if the error is caused because of your theme. But if switching over the theme doesn’t help you either, you can proceed to the next step. 

  • Repair ‘wp-admin’ and ‘wp-includes’ folders: Here, you will be required to replace the ‘wp-admin’ & ‘wp-includes’ folder with the newer ones from the fresh WordPress install.  
  • Increasing PHP memory limit: If nothing else works, this is the last option that you could follow. You may need to increase the PHP memory limit on your server through the php.ini file. If you are unsure about it, you can either hire a website developer or can request your web hosting company to do it for you. 

#2 Error Establishing A Database Connection

This one is a very common error that almost every WordPress developer encounters. 

Most of time, the warning message of “Error Establishing A Database Connection” occurs on the new websites while deploying them on the server, however, sometimes it can show up on the running websites too. 

This error is usually occurred because of the wrong database credentials in the configuration file of WordPress (wp-config.php) however sometimes there could be other reasons too. Like there could be an issue on your web hosting side or it can be a hack too!

So, to conclude the reasons behind the warning message “Error Establishing A Database Connection”, majorly there are 3 causes:

  • Misconfiguration of the wp-config.php file
  • Web hosting issue
  • Security issue (your website may be hacked)


How to resolve the “
Error Establishing A Database Connection” issue:

  • Fix wp-config.php file: You can access the “wp-config.php” on your server through the FTP file manager and make sure that it has the correct database name, database username, and password. 
  • Contact web hosting: If fixing the wp-config.php file doesn’t work, then you can contact your web hosting provider to check whether the server is down or your database was shut down for exceeding its quota.
  • Secure your website: If none of the above ways work out, then you must consider securing your website. Firstly you can hire a website builder to clean all the infected codes on your website and then you can subscribe with any security provider such as Sucuri and integrate their firewall with your website. 

#3 Syntax Error

This kind of issue happens when your website developer adds a piece of code to any of the existing files of your website.

The syntax error, in most cases, happens because of the:

  • Incorrect code
  • Missing character(s) in the code(s)
  • Unexpected character(s) in the code(s)

It can also happen when you update any of the existing plugins on your WordPress website. There could be some chances that your plugin developer didn’t close the codes properly, so when you update any plugin, your website may throw a syntax error.

The syntax error could be something like “Parse error – syntax error, unexpected $end in /public_html/your_site/wp-content/themes/your-theme/functions.php on line 12”.

How to fix the syntax error on your WordPress website?

  • Fix the affected code: If the syntax error has happened immediately after updating or installing any of the plugin(s), you probably know which plugin has the fault. You can access the plugin and the file and line number of the code as shown by the error message itself, and complete the missing code. If you are unsure about the codes, you can seek the assistance of your WordPress developer.
  • Try a new plugin: If you don’t know how to work with the codes and you don’t want to hire a developer too, then you can consider changing the plugin by trying out a new one. 

#4 Connection Timed Out

This error is not so common and it’s caused because of limited server resources or faulty codes. 

Below are the 3 major reasons for the “Connect Timed Out” error on a WordPress website. 

  • Resource-consuming plugins
  • Function errors in WordPress theme
  • Exhausted PHP memory limit

How to fix this error?

  • Deactivating plugins: You can access the plugins folder through the FTP file manager and rename all of the plugins of your website. Once you do that, you can refresh your browser and check if the website doesn’t show the error message anymore. This way you can find out the faulty plugin and fix it or replace it with an alternative. 
  • Switching over the theme: Switching your website theme to the default theme of WordPress may also help sometimes to fix the “Connection Timed Out” which means that your theme has some issues and you will have to engage a website builder to fix it for you. 
  • Increasing PHP memory limit: If nothing else works, this is the last option that you could follow. You may need to increase the PHP memory limit on your server through the php.ini file. If you are unsure about it, you can either hire a website programmer or can request your hosting company to do it for you.

#5 Warning: Cannot Modify Header Information – Header Already Sent By

This error is usually encountered by newbie WordPress developers. You may see a warning message below when you encounter this error. 

“Warning: Cannot modify header information – Header already sent by (output started at /website/wp-config.php:22)”

What cause the error “Warning: Cannot Modify Header Information – Header Already Sent By”?

The major reason for this error to occur on your website is the white/blank spaces in the codes of your file. In the above-given example, there could a space on the “wp-config.php” file at line number 22. 

How to fix this error?

  • You need to access your FTP file manager. 
  • Locate the file name through the error message. In our above example, the file name is “wp-config.php”
  • Download the file, go to the line number as mentioned in the error and remove the blank spaces. 
  • Save the file and upload to the same location. 
  • Refresh your browser. 

#6 WordPress Posts Returning 404 Error

Are you facing any issue with your WordPress website that only the homepage is working and the rest of the posts or pages are showing a ‘404’ error? In other words, all of the pages except the homepage of your website are showing a page not found error?

Possible cause of posts returning  404 error:

  • There could be a problem with your permalink settings.

How to fix the posts returning 404 errors on your WordPress website?

Fixing this issue is pretty simple. You can follow any of the below methods:

  • Fix .htaccess file:  You can access your WordPress root directory through the FTP file manager and download the .htaccess file.

    If it doesn’t exist, create a blank text file, add the default .htaccess code to it and save it as .htaccess. After that, you can upload it back to the root directory of your server. You can find the default .htaccess code from a fresh WordPress setup. 

  • Save permalinks: Just go to Settings -> Permalinks and hit the Save Changes button.

#7 WordPress Memory Exhausted Error (White Screen of Death)

Also known as ‘White Screen of Death’, WordPress memory exhausted is a very common error that could be experienced by any website developer or webmaster. 

Possible cause of memory exhausted error:

Some of the plugins or codes are consuming much of your server’s memory.

How to fix ‘White Screen of Death’ or ‘Memory Exhausted Error’ on your WordPress website?

You can simply open your wp-config.php file (located at your website’s root directory) and add the following code:

define (‘wp_memory_limit’, ’64M’);

Recommended post: How to backup/upload a WordPress website using control panel?

Do you need a WordPress developer?
Get a Quote.

website development services in India

    Our Skills

    Get A Quote!
     

      close-link