How to Manage Common WordPress Errors?
By Catherrine Garcia ; July 31st, 2019
Tagged:
1
2
3
4
5

Since the advent of WordPress over 15 years ago, the platform has helped millions of businesses and individuals to build websites and establish their presence online. Today, around one-third of the total websites use WordPress as content management system (CMS) because of its ease-of-use and simplicity.

However, nobody is perfect, not even WordPress. After building a website, you might run into several errors that impact your seamless experience. If you have been using it for a while, then you might have faced some problem at least once.

But the good news for you is that every problem in WordPress has a solution. This is because of its broad user base and developer community who have run into similar problem on their way and found out the solution.

In this article, we have gathered information about few of the most common WordPress errors that can happen with anyone at any time. You will also find the right ways to fix those errors. Before you go for fixing these errors, please ensure that you create a backup of your site (in case something goes wrong).

1.     Internal server error

‘Internal server error' or ‘500 Internal Server Error' is caused when something is wrong with server. However, the server can't find what's wrong.

This error can be fixed using a number of techniques:

  • Check .htaccess

Some of the main directives of server are stored in .htaccess file. Internal server error will occur if the file gets corrupted.

To know if the file is corrupted, visit the server using FTP and find the file. Rename the file and reload the website. Now check if the issue is fixed.

  • Increase memory limit

Lack of memory can also cause this error. Hence, open the wp-config.php file and add this code to it:

define('WP_MEMORY_LIMIT', '64M');

The memory will be increased to 64 MB and might fix the error.

  • Deactivate the plugins

If above steps don't work, try to deactivate all the plugins. After doing it, reload the website to check if the error is gone.

 

2.     Syntax error

Sometimes there are slight typos in code snippets in functions.php, which cause the syntax error. Even a semicolon or bracket missing in code can show this error.

To solve this, you have to find the mistake in code. Your browser can help you know which file is having the error. After finding the file, visit it in server via FTP. Edit the file and check which line of code is showing error message.

If you know how to correct it, then do it. if not, then delete that code and upload the file again.

 

3.     Error establishing a database connection

This error occurs when the database connection is broken. It can be because of error in wp-config.php file, website hacking, or issue with server.

  • Fix wp-config.php file error

Check the database details in wp-config.php file. Ensure that you have used the correct name, host, username and password.

  • Check if your site is hacked

Attackers have become advanced today and can hack your site despite the best security practices. Therefore, scan the entire site to know if someone has compromised it. If it is hacked, then immediately update the credentials and restore the site from backup.

  • Fix server error

Contact the service provider from whom you have chosen web hosting options. Sometimes you surpass the database quota, or something goes wrong at hosting server. These can cause the site error. Your web host will fix it if the problem is at their end.

 

4.     404 error for WordPress pages and posts

Sometimes, when you visit an existing post or page on your site, it shows 404 error. The main cause of this error is faulty permalinks.

To fix it, you will need to reconfigure the permalinks from Settings > Permalink. You can manually make changes to .htaccess file by adding the following lines of code:

#BEGIN WordPress

<IfModulemod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

#END WordPress

 

5.     White screen of death

Sometimes you see white screen of death without any message. In such a scenario, you can't get to know what is wrong and what to fix.

This error can occur because of insufficient memory limit, or poorly coded theme or plugin. Follow steps below to solve this issue:

  • Increase memory limit

Lack of memory can also cause this error. Hence, open the wp-config.php file and add this code to it:

define('WP_MEMORY_LIMIT', '64M');

  • Use default themes and plugins

If the error isn't solved after increasing memory limit, then try to disable the active themes and plugins. Use default ones in place of them. Now check if the site is working.

To know which theme or plugin is causing error, activate them one by one, and keep checking the site after every step.

 

6.     Image upload issue

This issue can happen in a number of ways. Sometimes, the images on your site stop appearing, you can't upload images, or images get broken.

The main cause of these issues is fault in file and folder permissions. It doesn't allow WordPress to fetch files from right folders. Folder permissions are sometimes manipulated because of mistake by the administrator, poor plugins, or website hacking.

To solve such issues, you need to change file attributes from FileZilla. In File Permissions, set the upload directory and all the folders to permission level 744. Then check the ‘Recurse into subdirectories' and ‘Apply to directories only' options. Finally, click OK.

This way, the FTP client will use the right file permissions to directories, and your issue will be solved.

 

Wrapping up:

Since, there are millions of websites out there that use distinct WordPress themes and plugins, things can go wrong. These are few of the most common errors in WordPress that can happen any time. Without any worries, you can easily manage these errors on your own and make your site good to go.

Which of the following issues you have faced or are currently facing? Have you used the above tips to solve those issues? Let us know via the comments section below.

About author

Catherrine Garcia is currently working at pixelchefs.com as a web developer. She is also a passionate blogger and loves to share her knowledge through articles on various technical topics.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Flash can be added to this post.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

To prevent automated spam submissions leave this field empty.