How To Fix 500 Internal Server Error In WordPress

46Shares
WordPress Internal Server Error
  • Save

Have you ever tried to visit your WordPress site only to be greeted by a message saying Internal Server Error or something similar?

It might even be happening to you right now:

 Internal Server Error WordPress
  • Save

It’s a scary error, because like the error establishing a database connection message, your site completely disappears.

Don’t worry too much, though. The internal server error message is fixable and your WordPress site’s data should still be entirely intact.

In this post, you’ll learn:

  • What the internal server error is, as well as some of its causes.
  • How to fix the internal server error in WordPress.

What Does The “Internal Server Error” Message Mean?

Internal server error (sometimes called a 500 internal server error), is a generic error message that your server gives you when it runs into a problem. Basically, it’s telling you that “something” went wrong… but it’s not very specific about what that “something” is.

That’s not a very satisfying explanation – but again, it’s not a very specific error.

What Causes The “Internal Server Error” Message?

Because this error message is so broad, there’s not a single problem that causes it.

With WordPress, the most common causes are:

  • A corrupt .htaccess file.
  • A plugin issue.
  • Hitting your PHP memory limit.
  • Corrupt WordPress core files.

We’ll show you solutions for how to fix all of those problems. But if you want to quickly narrow down exactly what’s going on, consulting your server’s error logs is a helpful way to diagnose exactly what’s causing the problem.

If your host uses cPanel, you can view error logs by going to your cPanel dashboard and clicking on Error Log:

Error Log
  • Save

Unfortunately, as you can see from the image below, these error logs aren’t always the most user-friendly documents to read:

Error log
  • Save

If nothing obvious sticks out in the error logs, you can:

  • Consult your host’s support for help understanding what the issue might be.
  • Jump straight into some of the common fixes that I’m about to outline below.

Note: The following are confirmed hosts that offer cPanel hosting:

How To Fix “Internal Server Error” In WordPress

Here are some of the most common ways to fix this message in WordPress. I recommend that you start at the top (Potential Fix 1) and work your way down.

Potential Fix 1: Generate A New .htaccess File

Your .htaccess file is a configuration file for your web server. WordPress uses it to, among other things, set up your permalink structure.

Because it controls the configuration of your web server, even a tiny mistake in your .htaccess file can cause something like the internal server error message.

Thankfully, this problem is easy to fix – all you need to do is force WordPress to generate a new .htaccess file.

Here’s how:

Step 1: Rename your existing .htaccess file.

To get started, you need to rename your existing .htaccess file. You can do this by either:

  • Connecting to your site via FTP. You can use FileZilla to do that.
  • Using your cPanel’s built-in File Manager tool.

I’m going to show you the process using File Manager because it’s the simplest for most users. But the core principles are the same no matter which method you use.

You can access File Manager right from the cPanel dashboard:

File Manager
  • Save

Once you open File Manager, look for the .htaccess file in the root of your site.

Right-click it, and choose Rename:

.htaccess
  • Save

Rename it to something like “.htaccess_old”.

Now, all you need to do is create a new .htaccess file to replace it.

Step 2: Generate a new .htaccess file.

To force WordPress to generate a new .htaccess file, go to your WordPress dashboard.

Then, navigate to Settings → Permalinks.

You do not need to change any settings.

Just click the Save Changes button, and WordPress will automatically generate a new, clean .htaccess file:

Permalinks
  • Save

And that’s it! Hopefully, your site is working again.

Potential Fix 2: Deactivate Your Plugins And Find Faulty Plugin

If your .htaccess file wasn’t the problem, the next thing that you can try is deactivating your plugins.

Often plugin issues or conflicts can cause the internal server error. This is especially likely if you saw the error immediately after activating a new plugin.

By deactivating your plugins, you can find the problematic plugin and remove it.

How to deactivate plugins if you can still access your dashboard:

If you can still access your WordPress dashboard, go to the plugin management area and use the checkbox to deactivate all of your plugins at once:

WordPress dashboard
  • Save

Then, reactivate them one by one to hopefully find the problematic plugin.

How to deactivate plugins if you can’t access your dashboard:

With the internal server error in WordPress, you are most likely not able to access the WordPress admin dashboard. In this case, you’ll need to take a slightly different approach and deactivate plugins using FTP.

  • Connect to your site via FTP or File Manager. You can use FileZilla.
  • Navigate to the /wp-content/ folder.
  • Rename the plugins folder to something like plugins_old.
Rename Plugins Folder
  • Save

Once you rename the folder, all of your current plugins will be deactivated.

Now try opening your WordPress dashboard, and if you are able to access it, you should pat yourself on the back. The issue is one of the plugins.

If you go to the Plugins section of your WordPress, it will show the error “the plugin has been deactivated due to an error; plugin file does not exist.”

Don’t worry… we have figured out that the problem is one of the plugins.

To reactivate them one by one:

  • Rename the plugin folder from plugins_old to plugins.
  • Now from the WordPress dashboard, activate each plugin one by one.
  • After activating a plugin, browse 3-4 pages on your blog. Repeat this step until you find a plugin whose activation causes the internal server error.

In a majority of situations, this will fix the internal server error problem.

Potential Fix 3: Increase Your Web Hosting PHP Memory Limit

Still not working? Don’t worry… there are still more things that you can try.

Another potential issue is that your WordPress site is hitting its PHP memory limit. By default, WordPress tries to allocate 40MB of memory for single-site installs (as long as your host allows it).

But if you’re experiencing difficulties, you can manually increase this limit (again, as long as your host allows it).

To do this, you’ll need to edit your wp-config.php file. You can access it either via FTP or cPanel’s File Manager:

Edit wp-config
  • Save

Add the following line of code right before the /* That’s all, stop editing! Happy blogging. */ message:

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

  • Save

Remember – this will only help if your host hasn’t already set a PHP limit that’s lower than 64M.

For this reason, if you don’t notice a change after editing your wp-config.php file, I recommend reaching out to your host to see what your current PHP limit is.

Potential Fix 4: Reupload Core WordPress Files

If your site still isn’t working, you can try uploading a clean copy of the core WordPress files.

For this solution, I recommend using an FTP program over File Manager.

Note: Make sure you have taken a complete backup of WordPress before doing this step. You can read about WordPress backups here.

To do this, go to WordPress.org and download the latest version of WordPress:

Download the latest version of WordPress
  • Save

Once the download finishes, extract the ZIP file and delete the:

  • Entire wp-content folder.
  • wp-config-sample.php file.
  • Save

Then, upload all of the remaining files to your WordPress site via FTP. Your FTP program will show you a prompt about duplicate files. When this happens, make sure to choose the option to Overwrite duplicate files.

Fixing The “Internal Server Error” Message

At this point, one of these solutions has hopefully helped you fix the internal server error message on your WordPress site.

If not, I recommend speaking to your host’s support team and asking them to go through the error logs with you to pinpoint the issue. And if they can’t help, you might need to hire an actual WordPress developer to diagnose things.

Or, you can always leave a comment and we can try to figure out the issue together!

Let me know if you’ve faced this issue and what steps you took to overcome it…

Was this helpful?

Thanks for your feedback!
  • Save
46Shares
Authored By
A Blogger, Author and a speaker! Harsh Agrawal is recognized as a leader in digital marketing and FinTech space. Fountainhead of ShoutMeLoud, and a Speaker at ASW, Hero Mindmine, Inorbit, IBM, India blockchain summit. Also, an award-winning blogger.

31 thoughts on “How To Fix 500 Internal Server Error In WordPress”

  1. Umar Ajaz

    Thanks For Sharing This Post. Before two days i facing internal server Error.
    After read this i fix this issue manually. THANKS

  2. Prady

    Hi Harsh
    Thanks for sharing this useful information. This article really helps me a lot. I am facing the same problem and not get the solution but after reading your article I get the solution. Your step by step tutorial will help people solve these problems without having to any issues.
    Thank you Again.

  3. Digember

    Thanks harsh aggarwal. It could have saved a day if I had read your article 2 weeks ago. I encountered a 500 internal server error on my Hostgator hosting and fixed it with deleting and uploading again my .htaccess file to my server.

  4. M Rahman

    Hi Sir,
    Thanks for such a very good article.
    Since last few weeks I’m wondering for a solution. Sometimes suddenly getting 500 Internal Server Error on one of my website, but the error exist only for few seconds, after that while i reload the page its working fine. ANy idea why its happening…?

    1. Harsh Agrawal

      @M Rahman
      You should start by optimizing your WordPress database and make sure you delete all orphaned tables. Take database backup before doing this.Also use Cloudflare if you are not using it. Hopefully this should fix the issue.

  5. Hari Mohan Sharma

    Hi Harsh,
    Very helpful article and its explanation. I have faced this problem once. It was because of a plugin. Thanks for providing a problem-troubleshooting article to fellow bloggers.

  6. Shantanu Sinha

    Hello Harsh,

    This is my first time over your site and I was sticked with out tittle right away, Good one over here 🙂

    Great tips over here and analog too over the 500 internal server and how to fix this headache. I am not that much of coding
    guy, so I have always struggled with my coding scenes with my wordpress.

    Till now I haven’t faced this type of errors but if one is using wordpress then they should know how to fix them

    The step by step guide you mentioned up here is of so much help and the doubts which we rising through the mind is clearing out
    , thus I would love to try my hands when ever I this 500 internal server error flash up on my screen

    Thanks for the share.

    Shantanu.

  7. Naeem Utmani

    Hi Harsh..
    Thanks a lot its really appreciated. i m new to wordpress i m facing such kind of problem thenks for the great Post

  8. Anshul sharma

    Hi harsh
    This article really help me a lot. I am facing the same problem and not get the solution but after reading your article I get the solution

    Thanks for posting
    Anshul

  9. Nitish Verma

    Thanks For Sharing This Post. Before two days i facing internal server Error.
    After read this i fix this issue manually.

  10. Abhishek Verma

    Hi Harsh,
    When I entered in the Blogging world, I choose free web hosting for learning Blogging & WordPress. When I was using a free web host, I found this error on my Website. But for now I have two blog. One hosted on BlogSpot and second one on BlueHost.
    So, I have no problem now.

    But really good & Helpful article.

    Thanks Harsh for this one.

  11. Vishwajeet kumar

    Hello Harsh,

    You nailed it. Few months ago I have also faced this type of issue. Actually I have deactivated a plugin and install a new one. It has altered my htaccess file and my blog received 500 error. Fortunately I had a backup of my htaccess file and I restored it.

    These tips you have shared here is very helpful to deal with this error. Thanks for sharing these great insights.

    Have a great day 🙂
    Vishwajeet

  12. Mazino

    When I moved one of my blog to WordPress, I was having this internal sever error constantly. I got frustrated and switch back to blogger. Now I know better how to fix it now if it occurs.

  13. Susan Velez

    HI Harsh,

    Great tips and thanks for showing us how to fix the 500 internal server error in WordPress. While I haven’t had to deal with these types of issues.

    I know that as a WordPress user, it’s nice to know how to fix these types of errors. Most people who are new to using WordPress tend to freak out when they see errors like this.

    Your step by step tutorial will help people solve these problems without having to freak out.

    I love how you created the step by step screenshots which will make it easy for anyone to follow along, regardless of what level they’re at.

    Thanks for sharing these tips.

    Have a great day 🙂

    Susan

  14. Gaurav

    I had faced this issue when i try to modified function file then i had no idea what Internal 500 error is? I get it in details here… Thankx Sir!!!

  15. Shailesh shakya

    Hello harsh sir,
    Nice article.
    It is really a terrible error without notifying anything. However, I have not encountered this due to following failure given above but I got this error due mismatch between database collation and encoding.
    Fortunately, I got the solution by just making both of them exactly same as they should be.

    By the way, thanks for sharing this guide…

  16. Jeevan Punetha

    Same problem I had also faced in the beginning. But I searched in youtube and I got the solution. There are a few websites who provide solution but they are tricky. Your articles are very simple, easy to understand and accurate.
    You are amazing Harsh……You solve problems of thousands of people specially newbies, that’s really appreciating.

    Thank you Harsh……in behalf of everyone and keep writing such awesome articles.

    1. Harsh Agrawal

      Hey Jeevan,

      Thanks a lot. I really appreciate it.

  17. Dev Pandey

    HI Harsh,

    Thanks for sharing this useful information. This is very important for those mainly setting up their hosting account or fixing internal error message. I also had this issue in the beginning and not to easy to figure the issue if you have not worked with DNS or IP settings.

  18. Ankit Mishra

    Hi Harsh
    I amazed to see this post today because yesterday I had got the same problem ERROR 500 that was saying error with http something. This had occurred because I did placed wrong code at function.php . In this error I can’t even able to open login page for my blog then I contacted my hosting provider and they simply changed the theme from their side and it got back. Before this I was like how will I get back my blog. Then I need to delete the theme that I was using and install it once again and have to set up too. Finally I got fixed..
    Thank you that you shared a method to fix it so that our shouters friends also if get this problem then won’t go in big trouble.

  19. Raghunath Samantaray

    Hi Harsh,

    Thanks for Sharing these tips, It’s helps every WordPress blogger. I already face this error on my blog due to memory limit.

    Thanks again for sharing these tips with us.

  20. Saurabh Dubey

    Is RAM also responsible for this type of error? I am using Godaddy hosting, Customer care service of Godaddy says RAM is causing this type of error. What is your opinion about this?

    1. Harsh Agrawal

      @Saurabh
      Underpowered hosting is one of the reasons for sure.

    2. amit gupta

      well i was also using Godaddy hosting for a months but i get lots problem on my hosting and saddest past is that godaddy does provide me any technical support . so i decide to migrate to host-gator. My web erorr was “pageok” when ever i try to login into dashboard

Leave a Comment

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

Scroll to Top
46 Shares