Get 20% off
Tutorial

How to Fix the 500 Internal Server Error in WordPress

A 500 Internal Server Error tells you almost nothing. Here is how to find the real cause in WordPress and fix it, step by step, without guessing.

By OnlySaver Team · 28 October 2026 · 5 min read

How to Fix the 500 Internal Server Error in WordPress

"500 Internal Server Error" might be the least helpful error message on the internet. It basically means "something broke on the server, good luck." There is no hint about what, where or why.

The good thing is that in WordPress the list of usual suspects is short. Work through them in order and you will find the cause, usually in under twenty minutes, even if you have never edited a server file before.

Step 0: confirm it is really a 500 error

Different errors need different fixes. A 404 means a page is missing, a 503 usually means the server is temporarily overloaded, and a 500 means code failed while building the page. Check the exact status code with an HTTP status checker. If it says 500, carry on.

Also think about timing. Did the error start right after you installed a plugin, updated a theme or changed a setting? That change is your prime suspect.

Step 1: turn on the error log

Instead of guessing, ask WordPress to write the real error to a file.

  1. In hPanel, open File Manager and edit public_html/wp-config.php.
  2. Find define('WP_DEBUG', false); and replace it with these three lines:
    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
  3. Reload the broken page once.
  4. Open wp-content/debug.log. The last lines usually name the exact file and plugin causing the crash.

When you are done, set WP_DEBUG back to false so the log does not keep growing.

Step 2: reset the .htaccess file

A corrupted .htaccess file is a classic cause, especially after a security or redirect plugin edits it.

  1. In File Manager, rename .htaccess to .htaccess-old. (Turn on "show hidden files" if you cannot see it.)
  2. Reload your site. If it works, the old file was the problem.
  3. Log in to WordPress, go to Settings → Permalinks and click Save. WordPress writes a fresh, clean .htaccess.

Step 3: deactivate plugins (without wp-admin)

Here is a situation many site owners know too well. A small business owner in Jaipur clicks "update all plugins" on a Monday morning. One of the eight updates is not compatible with another plugin, and the entire site, including the admin area, shows a 500 error. She cannot log in to undo anything.

You can still turn plugins off from the file manager:

  1. Open wp-content and rename the plugins folder to plugins-off. WordPress now thinks there are no plugins.
  2. Reload the site. If it loads, a plugin is the culprit.
  3. Rename the folder back to plugins. All plugins appear deactivated in wp-admin.
  4. Activate them one by one, reloading the site after each, until the error returns. That plugin is your problem.

Then either roll it back to the previous version, look for an update, or replace it.

Step 4: switch to a default theme

If plugins are not the cause, test the theme. In wp-content/themes, rename your active theme's folder. WordPress falls back to a default theme such as Twenty Twenty-Four (if it is installed). If the site loads, your theme or a recent change to its functions.php is the issue.

Step 5: check the PHP version and memory

  • PHP version: very old plugins can break on new PHP versions, and new plugins can require a recent one. In hPanel you can switch versions under Advanced → PHP Configuration. Try the previous version to test, then fix the plugin rather than staying on old PHP forever.
  • Memory limit: if the log says "Allowed memory size exhausted", raise the limit in PHP Configuration, or add define('WP_MEMORY_LIMIT', '256M'); to wp-config.php.

Step 6: restore or ask for help

If you have tried everything above, restore a backup from before the error started. In hPanel this lives under Files → Backups, where you can restore files and the database separately. Pick a date from before the trouble started, restore, then clear your cache. You can also share the last lines of debug.log with Hostinger support; with the actual error message they can usually point to the cause quickly.

After the fix: make sure everything is healthy

  • Click through your main pages and a few older posts.
  • Run a broken link checker if you changed permalinks while fixing things.
  • Clear your cache plugin so visitors get the working version.
  • If the error appeared after a move from another host, double-check the steps in our migration guide.

Quick reference: symptom and likely cause

What you seeMost likely causeFirst thing to try
Error right after installing or updating a pluginThat pluginRename its folder in wp-content/plugins
Error after changing permalinks or a redirect plugin.htaccessRename .htaccess and re-save permalinks
Error after switching PHP versionOld plugin or theme codeSwitch back, then update the plugin
Error only on big pages or uploadsPHP memory limitRaise memory_limit in hPanel
Error on the whole site with no recent changesServer-side issueCheck hPanel notices and contact support

How to avoid 500 errors in future

  • Update plugins one at a time on important sites, not all at once.
  • Keep the number of plugins reasonable; each one is extra code that can fail.
  • Take a backup before every major update.
  • Stay on a supported PHP version.

A slow or unstable host makes these problems worse. If your current host gives you no error logs and slow support, our list of the best web hosting in India compares better options.

Get 20% off at Hostinger →

Free tools for this guide

Free tools from our sister sites, Byteary and JustChecker.

Frequently asked questions

What causes a 500 Internal Server Error?
The most common causes are a broken .htaccess file, a faulty plugin or theme, a PHP version mismatch and running out of PHP memory.
Does a 500 error hurt SEO?
A short outage does not. If Google keeps seeing 500 errors for days, it may slow crawling and drop pages, so fix it quickly.
How do I see the actual error message?
Turn on WP_DEBUG_LOG in wp-config.php, reload the page and read wp-content/debug.log. Hostinger also shows error logs in hPanel.
Can I fix a 500 error without wp-admin access?
Yes. Use hPanel File Manager to rename the plugins folder, replace .htaccess or change the PHP version.
Why does only one page give a 500 error?
Usually a plugin or a shortcode used on that page is failing. Deactivate plugins one at a time and test that page.
OnlySaver Team
We write plain-English guides to hosting and building websites. Questions? connect@onlysaver.com