"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.
- In hPanel, open File Manager and edit
public_html/wp-config.php. - 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); - Reload the broken page once.
- 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.
- In File Manager, rename
.htaccessto.htaccess-old. (Turn on "show hidden files" if you cannot see it.) - Reload your site. If it works, the old file was the problem.
- 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:
- Open
wp-contentand rename thepluginsfolder toplugins-off. WordPress now thinks there are no plugins. - Reload the site. If it loads, a plugin is the culprit.
- Rename the folder back to
plugins. All plugins appear deactivated in wp-admin. - 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');towp-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 see | Most likely cause | First thing to try |
|---|---|---|
| Error right after installing or updating a plugin | That plugin | Rename its folder in wp-content/plugins |
| Error after changing permalinks or a redirect plugin | .htaccess | Rename .htaccess and re-save permalinks |
| Error after switching PHP version | Old plugin or theme code | Switch back, then update the plugin |
| Error only on big pages or uploads | PHP memory limit | Raise memory_limit in hPanel |
| Error on the whole site with no recent changes | Server-side issue | Check 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.