Skip to content
Your Tech Read
Your Tech Read
Web & Cloud Hosting

How to Fix the “500 Internal Server Error” in WordPress

In this article 13 sections
  1. What Usually Causes It
  2. Before You Start
  3. Fix 1: Replace the .htaccess File
  4. Fix 2: Switch Off All Plugins
  5. Fix 3: Switch to a Default Theme
  6. Fix 4: Check PHP Memory and PHP Version
  7. Fix 5: Replace WordPress Core Files
  8. Fix 6: Check File Permissions
  9. Tips for Hostinger and cPanel Hosts
  10. When It Happened to Me
  11. How to Stop It Happening Again
  12. FAQ
  13. Final Word

“500 Internal Server Error” is one of the least helpful messages a website can show. It doesn’t say what broke or where. It just tells you the server hit a problem it couldn’t handle, and gave up.

On a WordPress site, that problem is nearly always one of a few things: a damaged .htaccess file, a plugin or theme that crashed, PHP running out of memory, or a PHP version your site doesn’t like. The good news is that each of these can be checked in a few minutes, usually without any coding.

This guide goes through the fixes in the order most likely to work, with notes for Hostinger and other cPanel hosts. Your posts and pages are safe. A 500 error stops WordPress from loading; it doesn’t delete your content.

What Usually Causes It

Cause Common after Fix
Damaged .htaccess file Changing permalinks, installing a security or cache plugin Fix 1
Plugin crash or conflict A plugin update or new install Fix 2
Theme error A theme update or editing functions.php Fix 3
PHP memory limit reached Page builders, WooCommerce, big imports Fix 4
Wrong PHP version A host upgrade or switching versions Fix 4
Damaged WordPress core files A failed update Fix 5
Wrong file permissions Migrations, manual uploads Fix 6

If the error appeared right after you did something specific, such as updating a plugin, start with the fix for that.

Before You Start

Take a backup if your hosting panel still works. Most hosts back up daily, but a fresh copy before you change files means any mistake can be undone. See how to back up and restore a WordPress site.

Open your hosting File Manager. All the fixes below happen there, so you don’t need the WordPress dashboard. On Hostinger it’s in hPanel under Websites → your site → File Manager. On cPanel hosts it’s an icon on the main screen. Your WordPress files sit in public_html (or a folder named after your domain).

Find the real error first

A 500 error hides the cause, but the server usually records it. Two quick ways to see it:

  • Check the error log in your hosting panel. Look for “Error Logs” or “Logs”. The latest lines often name the exact file and plugin.
  • Turn on WordPress debug logging. In wp-config.php, set:

define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );

Reload the broken page, then open wp-content/debug.log. A line mentioning /wp-content/plugins/plugin-name/ tells you which plugin to switch off. Set WP_DEBUG back to false when you’ve finished.

If the log points to the cause, jump straight to that fix. If not, work through them in order.

Fix 1: Replace the .htaccess File

.htaccess is a small settings file that controls how your server handles links and redirects. Plugins edit it often, and one bad line causes a 500 error across the whole site.

  1. In File Manager, open your site’s main folder. Turn on show hidden files if you can’t see .htaccess.
  2. Rename .htaccess to .htaccess-old. Don’t delete it.
  3. Reload your site.

If the site works, log in and go to Settings → Permalinks → Save Changes. WordPress writes a fresh, clean .htaccess. If you had custom rules in the old file, such as redirects, copy them back one at a time.

Fix 2: Switch Off All Plugins

A crashed plugin is the most common cause after .htaccess.

  1. In File Manager, open wp-content.
  2. Rename the plugins folder to plugins-off. This switches every plugin off at once.
  3. Reload your site.

If it loads, rename the folder back to plugins. Your plugins will now show as inactive in the dashboard. Turn them on one at a time, reloading the site after each, until the error returns. That’s the culprit. Delete it, roll back to an older version, or contact its developer.

Fix 3: Switch to a Default Theme

If plugins aren’t the problem, the theme might be, especially after editing functions.php or updating the theme.

  1. In wp-content/themes, rename your active theme’s folder, for example mytheme to mytheme-off.
  2. WordPress falls back to a default theme like Twenty Twenty-Five, as long as one is installed.
  3. Reload your site.

If it works, the theme is at fault. Restore the theme’s last working version from a backup, or undo your last edit. For more on theme crashes, see how to fix the WordPress white screen of death, which often has the same causes.

Fix 4: Check PHP Memory and PHP Version

Raise the memory limit

If the error log mentions “Allowed memory size exhausted”, PHP ran out of memory. Add this line to wp-config.php, just above /* That’s all, stop editing! */:

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

This only works up to the limit your hosting plan allows. If it doesn’t help, raise PHP’s memory limit in your hosting panel’s PHP settings, or ask support to do it.

Switch the PHP version

Old plugins can break on a newer PHP version, and a very old PHP version can break modern plugins. In your hosting panel, find the PHP version setting (on Hostinger: Advanced → PHP Configuration; on cPanel: Select PHP Version or MultiPHP Manager). If the error started after a PHP change, switch back to the previous version and test. Long term, update or replace plugins that don’t support current PHP.

Fix 5: Replace WordPress Core Files

If an update failed halfway, some core files may be damaged.

  1. Download a fresh copy of WordPress from wordpress.org and unzip it on your computer.
  2. Delete the wp-content folder and the wp-config-sample.php file from the unzipped copy, so you don’t overwrite your content or settings.
  3. Upload the remaining files and the wp-admin and wp-includes folders to your site, replacing the old ones.

This replaces WordPress itself but leaves your themes, plugins, uploads and wp-config.php untouched. If you’re not comfortable doing this, ask your host’s support.

Fix 6: Check File Permissions

Wrong permissions, often after a migration, can make the server refuse to run files. The usual safe settings are 755 for folders and 644 for files, with wp-config.php sometimes set stricter by your host. Most File Managers let you check permissions by right-clicking a file. If many files look wrong, ask your host to reset them rather than changing hundreds by hand.

Tips for Hostinger and cPanel Hosts

On Hostinger:

  • hPanel shows recent errors and resource use for each website. If you’re hitting CPU or memory limits, that can cause 500 errors during busy periods.
  • You can restore a daily backup from hPanel’s Backups section, which is often the fastest fix if the error started after a specific change.
  • Hostinger’s sites run on LiteSpeed servers. If you use the LiteSpeed Cache plugin, purge its cache after every fix, so you’re not looking at an old error page. See LiteSpeed Cache vs WP Rocket for more on caching.

On cPanel hosts:

  • Use Errors or Metrics → Errors in cPanel to see the latest server errors.
  • MultiPHP INI Editor lets you raise memory_limit and max_execution_time without editing files.

If you use Cloudflare: a 500 error page with Cloudflare branding still usually means the problem is on your server, not Cloudflare. Fix the server first, then purge Cloudflare’s cache. Cloudflare for beginners explains how it fits in.

And if nothing works, contact your host’s support. Tell them the exact error, when it started and what you’ve tried. They can see server logs you can’t.

When It Happened to Me

I’ve seen this error on my own blog. I opened the site one day and, instead of my homepage, there was just “500 Internal Server Error”. No warning, and nothing I could point to that I’d changed.

I didn’t fix it myself. A friend who works as a developer looked into it and got the site back up. I never found out exactly what the cause was, and at the time I didn’t know where to start.

That’s partly why I wrote this guide. Looking back, the steps above are the ones I’d try first now: check the error log, rename .htaccess, switch off plugins. If you have a developer friend or a good host’s support team, though, don’t be shy about asking. Sometimes the quickest fix is someone who can read the server logs.

How to Stop It Happening Again

  • Update plugins and themes one at a time, and check the site after each.
  • Keep automatic daily backups stored off the server.
  • Remove plugins you don’t use, especially ones not updated in a year.
  • Test big changes on a staging site if your host offers one.
  • Keep your PHP version current, but check plugin compatibility before switching.

For every other common error, from database problems to redirect loops, see our WordPress troubleshooting guide.

Related guides: How to Fix “There Has Been a Critical Error on This Website” in WordPress · How to Fix “Error Establishing a Database Connection” in WordPress (Step by Step)

FAQ

What does a 500 Internal Server Error mean in WordPress?

It means the server hit a problem it couldn’t handle while loading your site. In WordPress, it’s usually a damaged .htaccess file, a plugin or theme error, or a PHP memory or version problem.

Will a 500 error delete my posts?

No. Your content is stored in the database, and none of the fixes in this guide touch it.

How do I fix a 500 error if I can’t log in?

Use your hosting File Manager. Rename .htaccess, switch off plugins by renaming the plugins folder, and check the error log, all without the dashboard.

Why does the 500 error only appear on some pages?

Usually a plugin that runs on certain pages, like a contact form, shop or page builder, is failing. Check the error log while loading that page.

Is a 500 error my host’s fault?

Sometimes. If nothing on your site changed and other sites on the same account also fail, contact your host. Most of the time, though, the cause is a plugin, theme or setting on your site.

Does a 500 error hurt SEO?

A short outage doesn’t. If Google can’t reach your pages for days, rankings can drop. Fix it quickly and check Google Search Console afterwards.

Final Word

The 500 error looks vague, but its causes aren’t. Check the error log, replace .htaccess, switch off plugins, try a default theme, then look at PHP memory and version. Most sites are back within half an hour.

Once yours is working again, take a fresh backup and keep this page bookmarked. Next time, you’ll know exactly where to look.

Leave a comment

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