How to Fix Internal Server Error (500)

How to Fix Internal Server Error (500)

Posted by

The “Internal Server Error (500)” in WordPress is a general server-side error, which means something is wrong on your server, but it’s not specific about what.


Error Example:

You might see:

500 Internal Server Error
The server encountered an internal error and was unable to complete your request.

How to Fix the 500 Internal Server Error in WordPress (Step-by-Step)


Step 1: Check .htaccess File

A corrupted .htaccess It is the most common cause.

How to Fix:

  1. Go to your site via FTP or File Manager.
  2. Locate and rename .htaccess to .htaccess_old
  3. Visit your website again.

If it works, go to Dashboard > Settings > Permalinks and click Save Changes to regenerate a clean .htaccess.


How to Fix Internal Server Error (500)
How to Fix Internal Server Error (500)

Step 2: Increase PHP Memory Limit

A server may be running out of memory.

Edit wp-config.php and add:

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

If not working, try increasing memory in .htaccess:

php_value memory_limit 256M

Or in php.ini:

memory_limit = 256M

If your host doesn’t allow memory changes, ask them directly.


Step 3: Deactivate All Plugins

A broken plugin can cause 500 errors.

How to disable:

  1. Go to /wp-content/
  2. Rename the folder plugins to plugins_old
  3. Check your site.

If it works, rename back and activate plugins one by one to find the bad one.


Step 4: Switch to Default Theme

Sometimes themes cause errors.

How to switch manually:

  1. Go to /wp-content/themes/
  2. Rename your active theme folder (e.g., mythememytheme_old)
  3. WordPress will fall back to a default theme like twentytwentyfour

Step 5: Check File Permissions

Incorrect file/folder permissions can cause server errors.

Set:

  • Folders: 755
  • Files: 644

Step 6: Re-upload Core WordPress Files

Corrupted core files can also be the cause.

Steps:

  1. Download fresh WordPress from wordpress.org
  2. Upload only the /wp-admin/ and /wp-includes/ folders via FTP to overwrite your site.

Do NOT replace wp-content or wp-config.php


Step 7: Check Server Logs

Check your server’s error logs (ask the host if needed). You’ll often find the exact issue, like a plugin, theme, or PHP fatal error.


Step 8: Contact Hosting Support

If none of the above helps, your server may have:

  • PHP version issues
  • .htaccess rules conflict
  • Server-side software crash

Ask your hosting provider to check logs and fix the error.


Summary Table

CauseSolution
Corrupted .htaccessRename it and regenerate via permalinks
Low PHP MemoryIncrease memory in wp-config.php
Plugin IssueDeactivate all plugins and test
Theme ErrorSwitch to default theme
File PermissionsSet files to 644, folders to 755
Corrupt WordPress FilesReupload /wp-admin and /wp-includes
Server-Side ErrorsCheck logs or ask hosting support

How Alexa Ranking Works