If you want to easily fix WordPress 500 internal server error, then you’ll love this detailed guide.

Example of WordPress 500 Internal Server Error in Browser Window

You shouldn’t panic when you see the internal server error on your WordPress site. It doesn’t matter if your site is hosted on 000webhost free web hosting or any other hosting provider.

Even though this error doesn’t tell you what’s wrong, you can easily fix this error with the solutions in this post.

Before trying these solutions, we highly recommend backing up your WordPress site just to be on the safe side should anything go wrong.

Keeping backups is of great importance, and it’s a good habit to form. By the way, if you experience the 500 internal server error (or any other, for example, 502 Bad Gateway) after making recent changes to your site, you can simply restore a backup you created prior to the changes.

That aside, let’s get started.

Causes of 500 Internal Server Error in WordPress

The WordPress 500 internal server error in WordPress can be caused by a number of issues such as:

  • Corrupted .htaccess file
  • PHP memory limit issues
  • Problematic plugin(s)
  • Corrupted WordPress core files

Now, let’s go over these causes one by one and outline a solution for each.

Corrupted .htaccess File

More often than not, a corrupted .htaccess file throws the internal server error in your face.

.htaccess (short for Hypertext Access) is a configuration file used by your web server to control the directory it lives in (in this case your WordPress directory) and all sub-directories under that directory.

To determine if a corrupted .htaccess file is the cause of the WordPress 500 internal server error on your site, we begin the diagnosis by renaming your existing .htaccess file.

Renaming .htaccess

Login to your WordPress directory (the folder where your site lives) using FTP. You’ll know you are in the right directory if you see sub-folders such as wp-content, wp-includes and wp-admin:

viewing WordPress directory in FileZilla

In most hosting environments, your WordPress directory site is usually the Home or Public_html directory. If you installed WordPress on a sub-domain such as yoursite.com/someurl, your WordPress directory is someurl.

Next, locate your .htaccess file and right-click on it. Next, choose Rename. Rename your .htaccess file to something like .htaccess_old:

rename .htaccess to fix internal server error

After renaming your .htaccess file, reload your site to see if this solution fixes the 500 internal server error. If you can no longer see the internal server error, you can pop the bubbly.

Recreating .htaccess File

Next, login to your WordPress admin dashboard, navigate to Settings -> Permalinks and click the Save button at the bottom of the screen:

Save permalinks to create new .htaccess file automatically

Saving your permalinks creates a new .htaccess file for you automatically.

If the error persists, read on to discover more solutions.

PHP Memory Limit Issues

At times, you could be getting the 500 internal server error in WordPress because you are exhausting your PHP memory limit. Fixing PHP memory limit issues is as easy as pie.

Pro Tip:
Increasing your PHP memory limit can also fix the memory exhausted error, which is as baffling as the internal server error.

Increasing PHP Memory Limit for WordPress

You can increase your PHP memory limit by editing your wp-config.php file that is inside your WordPress directory (the same directory where the .htaccess file lives).

  1. Login to your WordPress directory and download wp-config.php file to your computer:downloading wp-config.php from WordPress directory
  2. Open the wp-config.php using a code editor such as NotePad++ or Atom and add the following code just above the line that says /* That's all, stop editing! Happy blogging. */ :
    define ('WP_MEMORY_LIMIT', '300M');

    This code instructs WordPress to increase the PHP memory limit to 300 MB.

  3. Next, save the changes and upload wp-config.php to your WordPress directory:upload wp-config.php to WordPress directoryDon’t hesitate to overwrite the existing wp-config.php file:overwrite old wp-config.php

Internal Server Error When Accessing Admin Area

As long as we’re talking about memory limits, it’s important to point out that you could see the 500 internal server error only when you try to upload an image or login to your WordPress admin area.

If this is the case, you can increase the memory limit by following these steps:

  1. Using preferred text editor, create a new file and add this code in there: memory=64MB
  2. Save the file as php.ini. Ensure you get the extension (.ini) right by choosing All types in the Save as type field:
    create php.ini file
  3. Upload this file to the wp-admin sub-folder within your WordPress directory using FTP.

Fixing PHP memory limit using the php.ini file only works for localhost installations or/and WordPress VPS hosting. Use the wp-config.php file method above if you have 000webhost’s free WordPress hosting.

Increasing your PHP memory limit might fix the WordPress 500 internal server error, but it’s just a temporary fix since it means something on your site is eating up your server resources. For a complete diagnosis, you might need to dig into your error logs.

But even if increasing PHP memory limits doesn’t fix this error, it is time to check whether the problem lies in your plugins.

Problematic Plugin(s)

The WordPress 500 internal server error can be the result of a faulty plugin or two conflicting plugins. To tell if a plugin is the root of the error, you need to deactivate all of them first.

Login to the WordPress directory. Open the wp-content folder and locate the plugins folder:

renaming plugins folder to disable all plugins

Rename the folder to something like plugins_old to deactivate all plugins at once. Don’t worry, you won’t break your site or lose any plugin.

Reload your site to see if this solution fixes the internal server error. If so, it’s time to eliminate the problematic plugin.

Rename plugins_old back to plugins and login to your WordPress admin dashboard. Next, activate your plugins one by one while refreshing your site each time until the error reappears.

If you re-activate a plugin and the internal server error reappears, it means the last plugin is the culprit. Just delete the responsible plugin via FTP and notify the developer of the error.

Corrupted WordPress Core

Now if all the other solutions fail, perhaps the 500 internal server error in WordPress is caused by corrupted WordPress core files.

While this is rarely the case, things break all the time. To repair your WordPress core files, you must upload fresh versions of wp-admin and wp-includes folders.


  1. Head over to WordPress.org and download a fresh version of WordPress:
    download WordPress from WordPress.org
  2. Extract files from the WordPress .ZIP archive.
  3. Inside the WordPress folder locate the wp-admin and wp-includes folders:
    locate wp-admin and wp-includes folders inside the WordPress folder
  4. Login to your WordPress directory via FTP and upload the new wp-admin and wp-includes folders overwriting the older versions:
    uploading wp-admin adn wp-includes via FileZilla

Refresh your site to see if this fixes the error. Wait – did you just say you’re still seeing the 500 internal server error?

Well, you can use WordPress built-in debugging tool feature to figure out what’s causing this error.

Debugging WordPress

Enabling WordPress debugging mode allows you to write all errors to a file called debug.log that is stored inside the wp-content folder.

To enable debugging:

  1. Login to your WordPress directory via FTP and download the wp-config.php file
  2. Open wp-config.php file and add the following code just before the line that says /* That's it, stop editing! Happy blogging */ :
    define ('WP_DEBUG', true);
    define ('WP_DEBUG_LOG', true);
    define ('WP_DEBUG_DISPLAY'. false);
    @ini_set ('display_errors', 0);
  3. Save your changes and upload wp-config.php to your WordPress directory overwriting the older version

Now, reload your site to trigger the error. Open your WordPress directory, navigate to the wp-content folder and open debug.log. If you have a developer friend, they can help you to decipher the errors.

We can also lend a hand whenever you’re stuck, so don’t hesitate asking your questions in the comment section.


The WordPress 500 internal server error is mainly the result of a bad .htaccess file or exhausting your PHP memory limit. All the same, fixing this error is as simple as A, B, C, which means you needn’t panic whenever you encounter this error.

Did any of the above solutions fix the 500 internal server error for you? If so, please let us know in the comment section.

Have you ever seen the 500 internal server error in the past? How did you fix it? Please share your fix with us in the comment section below.


  1. Alex

    Can a 500 Internal Server Error happen due to an issue on the hardware side? I have tried all of the solutions you have mentioned in this article but the problem not resolved for me.

    I am not using your hosting services but curious to know what other things can cause a 500 internal server error.

    • Freddy Muriuki

      Hey Alex,

      I don’t understand exactly what you mean by a hardware issue? Do you mean an issue with your server or your computer? I can see how a hardware problem with your web server could lead to the 500 Internal Server error, simply because the error mostly happens on the web server. Some users have experienced the 500 Internal Server error because of malware or virus infection on their computers, so you need to ensure you have the latest version of your operating system and a great antivirus program such as ESET Nod32. Other than that, I can’t think of any other thing that could cause the error. Regardless, please reply to this comment with more details and we will be more than glad to help you. Cheers!

  2. Jerome

    In the Debugging WordPress section, the line that says ‘WP_DEBUG_DISPLAY’ ends with an apostrophe instead of a semi-colon. If someone copies and pastes the code, they will get a white screen. Other than that, you wrote a very good article!

    • Domantas G.

      Hey Jerome,

      Thanks for noticing. Article updated!

  3. Jen

    I am unable to log into my WP. org Dashboard and receive a 500 Serve Error. Is there another way to access my website so that I can try the suggested fixes listed above in the article?

    • Freddy Muriuki

      Hey Jen, thank you for passing by and asking an excellent question, which, by the way, is a troubling concern for many other users.

      Now to answer you, the solutions in this post involve accessing your WordPress site (or, WordPress root directory) via an FTP program such as FileZilla (https://filezilla-project.org/).

      To use an FTP program, you must get the following details from your host: FTP Username, FTP Password, FTP Host and FTP Port.

      With these details, just log in to your WordPress root directory (this is the folder where your site lives), and follow the rest of this guide.

      Let us know how it goes, and if you need any help, please don’t hesitate to reach out. Let us know your thoughts. Thanks in advance!

      Best regards,

  4. spacexzone

    Problem solved.
    thanks for helping me.
    this article very helpful at all

    • Freddy Muriuki

      You’re welcome, we are glad the post was useful. Would you mind sharing this post with friends? Cheers!

  5. Vibhu


    I did everything as mentioned in the post. But still no luck. As soon as I change my website’s URLs to permalink structure, any of the posts page throws 500 internal error. Only the home page shows up.

    Any help will be really appreciated.

    • Freddy Muriuki

      Hey Vibhu,

      Sad you were unable to fix the 500 internal server error on your WordPress site.

      Let me know if I get this right. Are you getting the error after updating your permalinks?

      If so, clear your WordPress cache, and try renaming your .htaccess once again.

  6. suhail malik abbas

    nice post but i have live wordpress hosting

    • Freddy Muriuki

      Thank you for passing by and the compliment 🙂 We are glad you have live WordPress hosting, whatever you meant hehe. Enjoy your day!

  7. Shane

    Increasing PHP Memory Limit Worked for me! Thanks a lot

    • Freddy Muriuki

      Glad the post was helpful 🙂 You’re welcome and thank you for passing by Shane. Cheers, and share the post to help out somebody in need!

  8. Lisa @ Content Sisters

    Thank you, you’re a lifesaver! My problem was all the way down at the bottom of the list… WordPress core files. Something must have happened after the last automatic update. All fixed now. 🙂

    • Freddy Muriuki

      Hey Lisa!

      At times, something breaks during the update process, but we are glad the post was helpful.

      Thanks for passing by 🙂

  9. Saïd

    Thanks a lot! This 500 error set me back an hour, but it was finally the plugins part that brought everything back. However, I went one-by-one activating the plugins, and when they were all back on, it didn’t break my site again?

    Should I be concerned? Everything seems to be working ok, but I just don’t understand what cog threw everything out of whack.

    Thanks again.

    • Freddy Muriuki

      Hey Said!

      Thank you for passing by and sharing your experiences.

      At times, some plugins simply leave behind an error that gives you a false positive.

      I bet deactivating the plugins flushed out the error, which results in the scenario you explain.

      All the same, we are glad things worked out for you.

      Thank you for passing by and sharing, we truly appreciate your input.

  10. Bill

    I have something very strange and cant figure it out. All is fine, then upon a page refresh form just editing text, i get 500 error. It happens on chrome. Sometimes only one chrome profile (user), but not firefox or another profile. I’ve been through all of my chrome settings. I would imagine something in the server is seeing the chrome user profile as not having permission? Very confused. If it was corrupted wordpress file or plugin conflict i would think i would have same issue across different browsers on the same machine. Any thoughts?

    FYI, i’ve replaced hta access file a few times, resolves then just happens all over again a day later after all being fine for hours.

    • Freddy

      Hey Bill,

      Have you tried clearing your browser cache in Chrome?

      Let us know your thoughts 🙂

      Thanks in advance!

      Best regards

  11. Alif

    am getting “Error establishing a database connection”. Confirmed, DB credentials are correct. Updated the files again… But still error persists…

    Getting “error establishing…” error even in the repair.php.

    In Developer tools, getting “Internal Server 500” Error

    Any ideas…?

  12. Mark

    renaming the plugins folder worked for me – i slowly moved plugins over until i fonnd the dud. Yoast SEO believe it or not. a fresh istal of it worked.

    thank you so much!

  13. Faith

    This information is very helpful. I thought I had lost my website, not until I stumbled upon this. Thanks a lot!!

  14. Bobby

    Thanks you very much Freddy, for sharing this informative blog post about the simple ways to easily fix 500 internal server error in WordPress powered websites or blogs. Your blog is really very helpful for me as-well-as for anyone who is facing problem with server issues on their web hosting. Keep up the great work!

  15. Gita

    My problem solved.
    Thanks for helping me.
    This post really very helpful at all.

  16. SG

    I am only getting the 500 internal error when accessing the site, while logged into wordpress admin on my website. So, the admin area works, but if I navigate to any of my webpages, I get the error. If I log out (or use incognito, I don’t get the error)


Submit a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • php
  • my sql
  • intel
  • cloudlinux
  • nginx
  • cloudflare
  • wordpress