Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

Whenever, there is any problem with the server or any file, you will see HTTP Error 500. An Internal Server Error: The site is currently unable to handle this request. Since this error does not show any information about what is the reason for the occurrence, may result in frustration.

This is the most common WordPress error and it never has the straightforward solution. It requires a lot of troubleshooting and patience. Before fixing the 500 Internal Server Error, let’s see the cause why it happens.

What is the Cause of this Error?

This error can happen with any site running on any web server. It is not particularly for WordPress only. The very known causes of why this error occurs are :

1. Plugin & Theme

2. Corrupted .htaccess file

3. Memory Limit

4. Corrupted WordPress Root Directory ( wp-content and wp-includes folders )

5. Problem with your Host Server

How to Fix 500 Internal Server Error on Your WordPress Website?

If you are encountering with the same error, try the solutions given below.

Method 1) Check the Error Log

The first thing you should do after getting this error checks your error log file. Most likely, you will find the root cause of the problem. By checking the error log, you will be able to find out which plugin and theme were causing the issue.

Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

Method 2) Checks for Corrupted .htaccess File

While troubleshooting the Internal Server Error in WordPress, check for the corrupted .htaccess file. You can do this by renaming your .htaccess file to something else such as .htaccess-test. To Rename the .htaccess File, you need to login to your site.

Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

Once you are logged in, you will find the .htaccess file in the same folder where wp-content & wp-includes folder exists. After renaming your .htaccess File, try visiting your site to check whether the problem is resolved or not.

If it is, give yourself a clap and don’t forget to regenerate the .htaccess file. Go to Settings >> Permalinks and click on Save changes without making any change. This will regenerate your .htaccess file for you with proper rewrite rules.

Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

If this is not the root cause of your problem then continue reading the article.

Method 3) Increase the Memory Limit

Sometimes “HTTP 500 Error – Currently unable to handle this request ” can happen if you are exceeding your PHP memory limit. If you are seeing the error only when you try to login or uploading an image to wp-admin, then you need to increase your PHP memory limit in WordPress and refresh your site to test whether or not this is causing your 500 internal server error.

You can increase your memory limit by following methods:

  • Using Constant
  • Open the wp-config.php file, and add WP_MEMORY_LIMIT constant to the wp-config.php file.

    Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

  • Creating a Blank File
  • 1. Create a blank text file called php.ini .

    2. Paste this code in there: memory=64MB.

    Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

    3. Save the file and re-upload it to your root directory. Refresh your site and check for the error. If you still see the error, then you are not having memory limit issue.

    And if you don’t see the error. You still have some task to do because your problem is temporarily fixed. You still need to find the real cause of exceeding the memory limit.

    This could be due to a bad code in a plugin or theme.

    Method 4) Deactivate all Plugins

    If you are still able to access the wp-admin area of your website, just deactivate all your plugins one by one and check for your site by refreshing after each deactivation.

    Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

    There is no other way to do this. You have to deactivate the plugins and check for the error. If the error disappears, it was likely generated by the plugin you just deactivated prior to refreshing.

    Delete the plugin or find the replacement if it is very much important to your site. If you don’t feel you can replace the plugin, go and contact the developer.

    If you are not able to access the wp-admin area of your site, you may need to use FTP client or you can use WP File Manager WordPress Plugin.

    Open the Root Directory, Go to the wp-content folder. wp-content folder contains plugins, themes, and other folders.

    Click on the plugins folder, Rename the plugins folder to something else like plugins-testing. This will deactivate all the plugins on your site. Refresh your site and check whether the error is gone or not.

    Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

    If yes, then it is because of the faulty plugin. Activate each plugin one by one and refresh your site after each activation, to find which plugin is causing the error. If your problem is not solved yet, continue reading the article.

    Method 5) Deactivate the Active Theme

    Disable the Theme and check the site is working in default theme or not. If you are using a custom theme, disable the theme by renaming it and see if it is running or not. If the theme is a child theme, disable the parent theme and see if it helps you.

    Method 6) Re-uploading Core Files

    If you are still stuck with the problem, re-upload the wp-content and wp-includes folder from a fresh WordPress Install. This will not remove any of your data, but it will definitely solve the problem in case any file was corrupted.

    Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

    You need to visit wordpress.org website and click on Download WordPress button.
    1. Unzip the downloaded WordPress.

    2. Connect to your WordPress site ( either by FTP or using File Manager Plugin ).

    3. On the left side, Open the WordPress Root Directory.

    4. Now, select the wp-content and wp-includes folder and click on Upload, this will replace the directories with freshly installed WordPress folders.

    Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

    5. Allow overwrite changes.

    Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

    This will replace your older folders with the new WordPress folders. And will resolve the problem, if it generated because of the corrupted files.

    Method 7) Call your Hosting Provider

    If you have applied all of the methods mentioned above and still you are facing the issue then you need to contact your web hosting provider and ask them for support. They will be able to check the server logs and find out the root cause of the problem.

    WordPress Plugins

    • Backup Bank
    • Captcha Bank
    • Captcha Booster
    • Clean Up Booster
    • Clean Up Optimizer
    • Coming Soon Booster
    • Contact Bank
    • Facebook Like Box
    • Gallery Bank
    • Gallery Master
    • Google Maps Bank
    • Limit Attempts Booster
    • WP Mail Bank
    • WP Mail Booster

    Localhost is currently unable to handle this request HTTP error 500 in Ubuntu

    How do I fix this is currently unable to handle this request HTTP error 500?

    How to Fix the 500 Internal Server Error in WordPress.
    Back up your website..
    Enable the WordPress debugging feature..
    Deactivate your plugins..
    Disable your currently active theme..
    Check your . htaccess file..
    Check your PHP memory limit..
    Replace your WordPress core files..

    How do I fix 500 Internal server error in Ubuntu?

    A permission issue. When the webserver has no permissions to access the site files, it may throw an HTTP 500 error. The solution to this issue is to change the website file's permissions recursively .

    How do I fix HTTP error 500 in Linux?

    How to Fix HTTP error code “500 internal server error”.
    1.Refresh the Page. ... .
    2.Check Your Server Logs. ... .
    3.Check Permissions. ... .
    4.Changing Permissions. ... .
    5.Examine Your Scripts. ... .
    6.Check the Apache Files. ... .
    7.Granting Permissions With an .htaccess File. ... .
    8.Is the ..

    How can I fix 500 error in php?

    How to Resolve 500 Internal Server Error.
    Step 1: Debugging the Issue..
    Step 2: Empty . htaccess File..
    Step 3: Debug . htaccess Issues..
    Step 4: Increase PHP Memory Limit..
    Step 5: Check if the Admin Works..
    Step 6: Revert Recent Changes..
    Step 7: Audit Your Plugins/Extensions/Modules..
    Step 8: Check File Permissions..