Ways To Fix 500 Internal Server Error WordPress – Step-Wise

Updated on

How to Fix 500 internal server error wordpress

 

So, out-of-the-blues there is a 500 Internal Server Error in WordPress is one of those common wordpress errors that create the most panic because, when it arrives, we usually have no idea why. But, rest assured, it is very common and can be solved.

Considered the best CMS, WordPress is recognized all over the world. This site publication platform is popular especially for its user-friendliness and ease of use. The improvements that have been made make it a great CMS for all types of websites.

Thanks to this platform, creating a blog or a site at a lower cost is now within everyone’s reach. To have a powerful and dynamic site, it is necessary to ensure the installation of this CMS on the host.

Although this is a very simple operation to perform which does not require technical knowledge, it sometimes happens that we are faced with a few small problems.

Are you getting Error 500 message when trying to access wp-admin dashboard or after changing url ?

Are you not able to log into admin page (HTTP 500 error)?

Fixing 500 internal server error will require troubleshooting that will take time and patience. This in depth tutorial on how to fix 500 internal server error wordpress is created especially in order to offer some advice for those who encounter this problem, but also to give solutions to fix it.

There are a few common causes, such as having a corrupted .htaccess file, exceeding your PHP memory limit, and having improper file permissions.

Few other common wordpress errors you might need help with.

What is a Http 500 error in WordPress?

Whether it is a site update or a first installation of the CMS on the host, the WordPress 500 error can occur at any time. Do not panic, because it is a mistake like the others. A WordPress 500 error is nothing other than an internal server error that is frequently encountered on WordPress sites, but also on other sites.

A 500 Internal Server Error error message suddenly appears on your site when this occurs. There are many causes that can cause it, namely the error configuring the .htaccess file, the contradiction of sessions, very slow loading of the site, the addition of a new file or a new folder on the server or still using too many resources on the server.

This message also appears in the event of an incorrect configuration of a theme or plugin. There are still other causes, but what we have just mentioned are the most frequent. To be able to repair them quickly and efficiently, you must first discover their origin.

Error 500 is an internal server error commonly encountered on WordPress and other sites. When this happens, the 500 Internal Server Error message will appear on your site.

How to Fix the

Causes of WordPress 500 internal server error

The http 500 internal server error is a very generic HTTP status code, which means something went wrong on the website’s server, but the server couldn’t specify what the problem is.

Case 1:

The most frequent cause is a configuration error in the .htaccess file. This is the procedure by which we always start when error 500 occurs since it only takes a few minutes to correct.

Case 2:

When the error appears intermittently and the loading of the site is very slow. Conflicting sessions may be the source of this error. Another reason could be that the WordPress site is using too many resources on the server.

Case 3:

Error 500 appears when you have just added a new file or folder to your server. In this case, the new file or folder does not have the correct authorization number.

The error may have other origins, including a plugin or a misconfigured theme, but it would be complex to name them all here. WordPress site owners who are unfamiliar with 500 error correction are always recommended to seek the help of an expert who could assist with this task.

Obviously, there is always a risk of creating another more serious bug when trying to correct a WordPress error.

The 500 internal server error messages can be viewed in many ways because each website is allowed to customize the message.

Variations for 500 Internal Server Errors

  • 500 internal server error
  • HTTP 500 – Internal server error
  • Temporary Error (500)
  • Internal server error

Because the website you’re visiting is causing an error on 500 internal servers, you could see it on any browser on any operating system, even on your smartphone.

In most cases, 500 internal server error in wordpress are displayed in the browser window, as are web pages.

Now, the million-dollar question, what causes the “500-Internal Server Error”?

“Well, There Is No One Word Answer Here.”

As we mentioned above, internal server error messages indicate that something is wrong overall.

In most cases, “wrong” means programming a page or site, but it is likely that the problem is at your disposal, which we will investigate below.

More specific information about the causes of a specific HTTP 500 error is often provided when it occurs on a server that uses Microsoft IIS software. Look for numbers after 500, such as HTTP Error 500.19 – Internal Server Error , which means that the configuration data is incorrect.

A server-side error can happen owning to a variety of factors, spanning from a minute bug into the code to the incorrect uploading of the file.

However, the two most common causes of this WordPress error is the corrupted .htaccess file and second reason, when you’ve exceed the PHP memory limit.

The “.htaccess file” happens whenever you make any change at the backend of the website, like installing a new plugin or modify the error.

On the other hand, the “PHP memory limit” is a scenario when your website has poorly-codded plugins or too many plugins installed.

In many cases, the error 500 is caused by a failure in the .htaccess file of your website.

This does not mean that you have caused it by editing that file, but it may have been due to some process that has been carried out on your website.

How to Fix 500 Internal Server Error WordPress ?

solve 500 Internal Server Error on Your WordPress Website

Misconfigured .htaccess file

Look for the .htaccess file on your WordPress site server, then simply change the file name to old.htaccess. This will correct the error in 90% of the cases. If this procedure does not work, try the following.

basic-htaccess-file-wordpress

These are the rules shown in the image above:

#BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#END WordPress

Loading of the site is slow and the error appears intermittently:

Start by deleting the active sessions of your website in your browsing history. If that doesn’t fix the problem, check the error logs and find the source of the 500 error, then check the resource usage in the FTP server.

New file or folder added to the server:

Just change the authorization number for the new file. Find the file (or files) you just added to your server, click the right button of your mouse, then change the authorization number to 644. If it is a folder, change it number for 755.

Each WordPress  error has its own way of fixing!

The 500 WordPress error can appear at any time. You should no longer be surprised when you experience this problem. Of course, this error can panic a WordPress beginner. On the other hand, the more you panic, the more the problem will seem huge to you.

The first reflex that you must have when faced with such a situation is therefore to find the cause that may well have triggered this error. Once the origin is detected, you can repair it by following these few tips:

In case of an incorrect configuration of the .htaccess file, you must search for this file on the server of your WordPress site. Once found, simply rename the file to old.htaccess and the error will be corrected automatically in 90% of cases. If the repair was not successful, you can proceed with other techniques.

Check if a new file or folder has just been added to your server. If this is the case, you only have to change its authorization number by clicking the right mouse button on the file found. The authorization number is 644 for a file and 755 for a file.

The other technique is dedicated to repairing an error that appears intermittently after a slow site load. In this case, you must first delete all active sessions from your website that are in your browsing history. In some cases, this is enough to resolve the problem. If not, we recommend that you check the error logs and look for the source of the 500 error so that you can check the resource usage in the FTP server.

If none of these solutions is chosen, do not hesitate to ask your hosting provider for help. You just need to open a technical ticket via the “support” section of your customer area. Thanks to the server logs that the latter keeps, he has every right to get to the bottom of things.

You should know that if you access your WordPress installation through the CPanel of your hosting or by FTP you will find a file called php_errorlog.Php_errorlog file

There you will see a list of errors sorted by the date that can give you a clue to locate the problem.

But since it is an internal server error it may be difficult to interpret the problem so let’s see what steps to take to fix it.

Enable Debugging

To see whether this is the case, you’ll need to edit the wp-config.php file in your website’s root directory. Download the file (via FTP), open it (using a text editor) and search for ‘WP_DEBUG’. If you find the line, simply change false to true and re-upload the file to the server.

If this line isn’t yet in your config file, create it using the following line of code:

define( "WP_DEBUG", true );

Reload your website and see if the error changes.

Methods to fix internal server error (error 500) wordpress

1) Error 500 by the .htaccess

We have already seen that the most common is that the error 500 occurs because the .htaccess file is damaged. So we will start here.

Step 1

To check if the error is there, access the files of your WordPress installation (here is a tutorial on how to do it by FTP) and locate the .htaccess file

If you don’t see it, it may be hidden. In that case, you must search among the menus of your FTP program to make the hidden files visible (it is usually in the View menu).

Step 2

As soon as you find it, rename it. For example: .htaccess.old

Rename htaccess

500 internal server error .htaccess

Now go to your website and reload to see if the error has disappeared.

If you have, it is because the internal server error (or error 500) was caused by a failure in the .htaccess. Now follow the instructions in step 3.

In case the error persists, leave the name of the file .htaccess as it was at the beginning and read the solutions below.

Step 3

You must generate a new .htaccess file. To do this, in your WordPress administration panel, go to Settings> Permanent Links and click save changes.

Save permalinks

How to fix 500 internal server error

That will generate a new error free .htaccess file.

2) Internal server error 500 due to plugins

If the problem was not in the .htaccess it may be in one of the plugins.

Step 1

If you just installed a plugin and the error occurred at that time, you have it easy. Uninstall it and everything will return to normal.

Step 2

But sometimes it is not so easy to locate the problem and it may be due to conflicts between two or more plugins.

In that case, you will have no choice but to disable all plugins. If you do not have access to the WordPress administration panel, you must access it by FTP.

One trick to disable all plugins at once is going to the wp-content folder and rename the folder plugins to plugins.deactivate

If the 500 error has disappeared, and you can access the administration panel, you will know that it was caused by one of the plugins.

Step 3

Now go activating them one by one again and checking if any of them give an error. This way you will find the plugin that is causing the scare and you can find an alternative to it.

If you haven’t fixed error 500, read on.

3) HTTP 500 Error due to theme

If you have not solved the error, the cause may be your WordPress theme. Activate any other theme, for example, one that WordPress has by default.

If the problem persists, read on.

4) Error 500 Due to damaged folders

If you have tried all the steps above and the problem persists you may have to repair the wp-admin and wp-includes folders .

Don’t worry because this will not delete any information from your website.

To repair them you just have to download the latest version of WordPress from wordpress.org, unzip the .zip file, copy the wp-admin and wp-includes folders and replace them with those from your website.

5) WordPress error 500 due to memory limit

If you have followed all the steps above and the error still persists, it could be a memory problem on the server.

For some reason (that your hosting provider can explain) something is causing your server memory to run out.

To fix it, it should be enough to increase the memory limit.

For this you can create a text file called php.ini and include the following code in it:

memory = 128MB

Then save the file in the  / wp-admin / folder of your WordPress installation.

To make your task easier, you can directly download the prepared php.ini file here.

Another option is to edit the wp-config file of your WordPress installation, adding the following line of code:

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

6) Check File Permissions

In your directory, WordPress permissions for folders and files should be 755 or 644. Setting permissions to anything else may cause problems, including 500 internal server errors.Make sure these are not set to anything other than 755 or 644.

update-file-permissions

Fixing 500 WordPress Error – Other Methods

 

The first thing to do to fix a WordPress 500 error the first time is to check the .htaccess file. When you have changed the file name, load the site to see if everything is set or not. In case of failure, it is advisable before moving on to something else to go to “Settings”, then to “Permalinks” found in your WordPress dashboard. Then click on the “Save” button which allows you to create a new file.

Among the other methods that you should adopt to repair a WordPress 500 error is increasing the memory limit size of PHP. Please note that this type of error may appear if your PHP memory limit is exhausted. To increase the memory limit size of PHP, the first thing to do is to create an empty text file called php.ini.

Then, you will paste this code into the file memory = 64MB. After saving the latter, launch the download in your folder/wp-admin/via FTP. If the memory limit is exhausted, it means that there is something that consumes your memory largely.

This remains to be determined so that the problem of this kind does not repeat itself. Be aware that this may well be a theme function or a poorly coded plugin. Only your hosting company can help you perform accurate and precise diagnostics by looking in the server logs.

 


Contact your HOST

Still cannot find a solution, your host may have it. it’s important that you go through all of these steps so you can explain to them that you’ve checked every nook and cranny of your file system and can’t find a single issue that would lead to the 500 internal server error that’s running on your site.ask them to check their server logs to see if the issue is there.

If you still get a 500 Internal Server Error on WordPress, the server is not working and you can go back to the host and provide them this URL stating it should load as it is only a 1 line file that does not depend on anything to load.


WordPress Core Issue

Your core WordPress installation may have an issue. This could be files missing, changed or corrupted. You want to make sure that your core WordPress installation is fresh and new to rule out this being the cause of your server WordPress 500 Internal Server Error.

Manually remove and re-install WordPress core files.

  1. Get the latest WordPress zip (or tar.gz) file.
  2. Unpack the zip file that you downloaded.
  3. Deactivate plugins.
  4. Delete the old wp-includes and wp-admin directories on your web host (through your FTP or shell access).
  5. Using FTP or your shell access, upload the new wp-includes and wp-admin directories to your web host, in place of the previously deleted directories.
  6. Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files).
  7. Upload all new loose files from the root directory of the new version to your existing wordpress root directory.

NOTE – you should replace all the old WordPress files with the new ones in the wp-includes and wp-admin directories and sub-directories, and in the root directory (such as index.php, wp-login.php and so on). Don’t worry – your wp-config.php will be safe.

Switch to a Default Theme

If deactivating your plugins didn’t solve the issue, it’s likely your theme’s the culprit. You can verify this easily by switching to a default WordPress theme. I recommend using Twenty Sixteen, which is the latest default theme. If switching to Twenty Sixteen solves the problem, you can re-enable all plugins and get to work finding the issue in your theme’s code.

PHP Version Issues

While old PHP versions usually don’t cause 500 internal server errors, it may be worth talking to your host and asking them to give you a newer version before spending valuable time and money

Ask your host what version of PHP you’re running.

Disabling all plugins in case of 500 error in WordPress

If none of the solutions mentioned above are effective, it can probably mean that the problem is caused by a specific plugin. As it will be difficult to detect, deactivating all WordPress plugins at the same time is, therefore, the best solution.

Then activate the extensions one by one until you find the plugin that caused the error.

Once detected, get rid of it and don’t forget to report it to its author. If this option to deactivate extensions could not fix the error, you can return the basic files, i.e. change the wp-includes and wp-admin files to new ones. This can be useful if a file has been corrupted.

If you are unable to resolve the 500 Internal Server Error problem with these different methods, contact your web host who will be able to debug the problem faster and more efficiently.

It is important to inform your web host of all the steps and techniques that you have tried to try to resolve your problem.

By the way, don’t forget to make a backup before dealing with the problem. It is so easy that you have no excuse not to do it.

Take advantage of the expertise of the professionals at WP hacked help. Our WordPress experts are reliable, competent, and they all have several years of experience in repairing and fixing common wordpress errors and issues. We can quickly fix 500 internal server error on your WordPress site .

If you need to fix http 500 error in WordPress site, we will be happy to provide you with solutions to correct the situation. Get in touch with us without delay to discuss your error to be corrected on your WordPress site.

Leave a Reply

Your email address will not be published. Required fields are marked *