What is 500 internal server error and how to fix it? Print

  • 0

Note! This guide is for Linux hosting services. If you're using Windows hosting, please refer to the appropriate  guide.

One of the major reasons for encountering this error with your Wordpress website, is having incomplete or false code within the .htaccess file.

Common mistakes in the codes can include typos, wrong syntax, or simply when the web server does not support one or more of the commands within the .htaccess file.

 

Finding the faulty code

First, login to your control panel.

Rename the .htaccess file. If the problem is resolved, create the file locally with a popular text editor like Notepad++ or Vi and then upload it to your host. (Do not overwrite yet)

In order to find the command that's causing trouble, comment out each line one by one and try running the website. (you can comment a command by placing the # sign in the beginning of the line.) Once you have found the corrupted or wrong command, delete it and copy/paste the remaining code into the newly created .htaccess file. Now you can deleted the old .htaccess file.

 

Increasing PHP memory limit

Occasionally if some of the WordPress elements are using too much resources, you may run into this error. (Internal server error)

If you're only encountering this error while logging into the WordPress dashboard, you can fix it by following these steps:

In order to increase the PHP memory limit, enter this code into the .htaccess file:

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

This command increase the memory limit for WordPress and it need to be placed within the .htaccess file. Depending on your hosting plane, the maximum memory limit may vary somewhere between 96 to 128 megabytes.

The values for the PHP memory limit can one of the following: 64, 96, 128.

Important reminder! A need for high memory while running the website might be a sign of faults within the active plugins. Therefor you need to deactivate all the plugins and test each, one by one so you can find the faulty plugin.

You should also take into account that sometimes two different plugins might be causing a conflict and increasing the memory use.

 

 

 

 

 


Was this answer helpful?

« Back