HTTP Error 500 in WordPress: 7 Fixes That Actually Work

HTTP Error 500 in WordPress internal server error with broken server connection illustration

If you have ever opened your WordPress site and seen a plain white screen with the message “HTTP Error 500” or “The server encountered an internal error,” I know exactly how that feels. Your heart sinks. You start wondering if you broke something permanently. The good news is that this error is almost always fixable, and in most cases, you can solve it yourself without hiring a developer. In this guide, I will walk you through every cause and every fix, step by step, so you can get your site back online as quickly as possible.

This guide is written for WordPress site owners of all skill levels. You do not need coding experience to follow these steps

What Is HTTP Error 500 in WordPress?

At its core, the 500 Internal Server Error is a standard HTTP response code. It means the server encountered an unexpected condition and could not complete your request.
You can also review how WordPress handles errors in the official documentation on WordPress.

At its core, the 500 Internal Server Error is a standard HTTP response code. It means the server encountered an unexpected condition and could not complete your request. Unlike a 404 error which tells you a page is missing, a 500 error means something on the server side failed without a clear reason.

Is This a WordPress Problem or a Server Problem?

This is the first question I ask. Technically it can be either, but in the vast majority of WordPress cases, the server hardware is fine — the problem lives in your WordPress configuration, a plugin, your theme, or a misconfigured file.

In most cases, your server hardware is fine WordPress itself is crashing before the page can load. That distinction matters because it means the fix is within your control.

7 Most Common Causes of HTTP Error 500 in WordPress

Before jumping into fixes, it helps to understand what actually causes this error. Once you know the most likely culprits, troubleshooting becomes much faster. Here are the seven causes I see most often.

1. Corrupted or Broken .htaccess File

WordPress htaccess file open in cPanel code editor showing corrupted or invalid code highlighted that is causing a 500 internal server error
A single corrupted line or invalid code entry in your .htaccess file is enough to trigger a 500 error — opening the file in File Manager and inspecting it is always the first place to check

The .htaccess file controls how your server handles incoming requests for your WordPress site. It is a small but incredibly important file. If something corrupts it or writes invalid code into it, your server cannot read the instructions and responds with a 500 error.

This happens more often than you might think. A plugin update, a permalink change, or even a failed WordPress update can silently damage this file.

2. Plugin Conflict After Installation or Update

Plugins are the number one cause of the HTTP 500 error in my experience. When a plugin has a PHP error, is incompatible with your current WordPress version, or conflicts with another plugin, it can crash the entire site.

This often happens right after you install a new plugin or update an existing one. If your site was working fine and then suddenly showed a 500 error, a plugin is the first place I would check.

3. Low PHP Memory Limit

I see this constantly on budget shared hosting — a site running WooCommerce, Elementor, and a handful of other plugins can easily hit a 64MB ceiling mid-page-load and crash.

The default memory limit on some shared hosting plans is only 32MB or 64MB. Many modern WordPress setups need at least 256MB to run smoothly. When the site hits that ceiling, you get a 500 error.

4. Incompatible or Faulty WordPress Theme

Your active theme runs code on every single page of your WordPress site. If that theme has a bug, a PHP error, or is incompatible with your current WordPress or PHP version, it will crash the site and produce a 500 error.

This usually happens after switching to a new theme or updating your existing one. I always recommend testing themes on a staging site before activating them on a live site for exactly this reason.

5. PHP Version Incompatibility

WordPress requires a compatible PHP version to run correctly. If your hosting account is using an outdated PHP version, or if it was recently updated to a newer version that your plugins or theme do not support yet, a 500 error can appear.

Older plugins that have not been updated in a long time are especially prone to this. They were written for PHP 7.4 and may not function correctly on PHP 8.0 or higher.

6. Corrupted WordPress Core Files

WordPress core files rarely cause problems on their own, but when they do — usually after a failed auto-update or a messy migration — the result is almost always a 500 error. I’ve seen this happen twice in the last year when a hosting provider’s auto-update script timed out mid-process.

Re-uploading clean core files from a fresh WordPress download fixes this without affecting your content or settings.

7. Incorrect File or Folder Permissions

Every file and folder on your hosting account has permission settings that control who can read, write, or execute them. If these permissions are set incorrectly, your server may refuse to run WordPress files and respond with a 500 error.

The correct settings for WordPress are 755 for folders and 644 for files. Any deviation from this, especially permissions that are too restrictive or too open, can cause server errors.

Before You Start: Quick Checks to Do First

Before you dive into technical fixes, there are a few quick checks worth doing. These take less than two minutes and can sometimes solve the problem instantly.

Clear Your Browser Cache and Cookies

I know this sounds too simple, but a cached version of a broken page can make a 500 error appear even after the actual problem is fixed. Before assuming anything is wrong, open your browser settings and clear the cache and cookies, then reload the page.

You can also test by opening your site in a private or incognito window. If it loads fine there, the issue was just a cached page in your regular browser.

Check If the Error Is on Every Page or Just One

This step narrows down the cause significantly. Open a few different pages on your site. Try the homepage, a blog post, and your contact page.

If the error only appears on one specific page, the problem is likely related to that page’s content, a shortcode, or a specific plugin running only on that page. If every single page shows the 500 error, the cause is something global like the .htaccess file, a sitewide plugin, or the active theme.

Is Your Entire Site Down or Only wp-admin?

Try visiting both your frontend (yoursite.com) and your backend (yoursite.com/wp-admin) separately. Note which one shows the error.

If only wp-admin shows the 500 error but your frontend loads fine, the problem is specific to the WordPress admin area. This often points to a plugin that runs only in the dashboard or an admin-specific file issue. If both are down, you are dealing with a more global problem that affects the entire WordPress installation.

How to Fix HTTP Error 500 in WordPress: Step-by-Step

Now we get to the part that actually matters. I will walk you through each fix in order of how likely it is to solve the problem. Start with Fix 1 and work your way down until your site is back online.

Fix 1 — Repair or Reset Your .htaccess File

The .htaccess file is the first thing I check whenever I see a 500 error because it is the most common cause and the easiest fix. Renaming or replacing this file takes less than two minutes.

How to Reset .htaccess via File Manager

Log in to your cPanel and open the File Manager. Navigate to your root directory, which is usually named public_html. You need to make sure hidden files are visible. Look for the option that says “Show Hidden Files (dotfiles)” and enable it if it is not already on.

Find the file named .htaccess. Right-click on it and rename it to something like .htaccess_old. This disables the file without deleting it, so you still have the original if needed. Now reload your WordPress site. If the error disappears, the .htaccess file was the problem.

How to Reset .htaccess via FTP

If you prefer FTP, connect to your server using a client like FileZilla. Navigate to your root WordPress directory. Enable the option to show hidden files, which in FileZilla is found under the Server menu. Locate the .htaccess file, download a copy to your computer as a backup, then rename the original on the server to .htaccess_old.

Check your site again. If it loads, you confirmed the cause.

Default WordPress .htaccess Code to Copy

After renaming the old file, you need to create a new one with the correct default WordPress code. The easiest way to do this is to log into your WordPress dashboard, go to Settings and then Permalinks, and click Save Changes without changing anything. WordPress will automatically generate a fresh .htaccess file for you.

If you cannot access the dashboard, create a new blank file named .htaccess in your root directory and paste this default code into it:

Save the file and reload your site.

Fix 2 — Deactivate All WordPress Plugins

If the .htaccess fix did not work, plugins are my next stop. The fastest way to test this is to deactivate every single plugin at once and then check if the error disappears.

Deactivate Plugins from the Dashboard

If you can still access your WordPress dashboard, go to Plugins and then Installed Plugins. Select all plugins using the checkbox at the top, choose Deactivate from the bulk actions menu, and click Apply. All plugins will deactivate instantly. Reload your site and check if the error is gone.

Deactivate Plugins via File Manager

If you cannot access the dashboard because the 500 error is blocking it, use cPanel File Manager instead. Navigate to public_html and then the wp-content folder. Find the folder named plugins. Right-click on it and rename it to plugins_disabled. Your server can no longer load any plugins because the folder name no longer matches what WordPress expects.

Reload your site. If it comes back online, plugins were the cause. Rename the folder back to plugins and then reactivate them one by one to find the specific problem.

How to Find Which Plugin Is Causing the Error

Once you have confirmed plugins are the cause, reactivate them one at a time. After activating each plugin, reload your site. The moment the 500 error returns, you have found the guilty plugin. Deactivate that one and contact the plugin developer, look for an update, or find an alternative plugin that does the same job.

Fix 3 — Increase the PHP Memory Limit

If deactivating plugins did not help, the problem might be that WordPress is simply running out of memory. This fix tells your server to allow WordPress to use more RAM.

Method 1: Edit wp-config.php

Log in to cPanel and open File Manager. Navigate to your root WordPress directory and find the file named wp-config.php. Open it for editing. Find the line that says “That’s all, stop editing!” and add this line directly above it:

Save the file and reload your site.

Method 2: Edit .htaccess

If editing wp-config.php did not change anything, try adding this line to your .htaccess file instead:

Add it near the top of the file, before the WordPress block. Save and reload.

What Memory Limit Should WordPress Use?

For most WordPress sites, 256MB is more than enough. If you run a WooCommerce store or use many heavy plugins, you might need 512MB. You can check your current memory usage in the WordPress dashboard under Tools and then Site Health. The information will show your current memory limit and how much WordPress is actually using.

Fix 4 — Switch to a Default WordPress Theme

If your active theme is causing the 500 error, switching to a default theme like Twenty Twenty-Three will immediately tell you whether that is the problem.

Switch Theme from the Dashboard

Go to Appearance and then Themes in your WordPress dashboard. Hover over a default WordPress theme (any theme with “Twenty” in the name) and click Activate. Reload your site to see if the error clears.

If it does, your previous theme was the problem. Check with the theme developer for an update or contact their support team.

Change Theme via phpMyAdmin

If you cannot access the dashboard, you can change the active theme using phpMyAdmin. Log in to cPanel and open phpMyAdmin. Select your WordPress database from the left side panel. Open the table named wp_options.

Use the search function to find the row with the option_name value of template. Edit the option_value field and replace whatever theme slug is there with twentytwentythree. Then find the row with option_name set to stylesheet and change its value to twentytwentythree as well. Save both changes and reload your site.

Fix 5 — Change Your PHP Version

If your site started showing a 500 error after your hosting provider updated the server PHP version, this fix is likely what you need.

How to Check Your PHP Version in cPanel

Log in to cPanel and look for a section called Software. Inside that section you will find an option called Select PHP Version or MultiPHP Manager depending on your hosting provider. Open it and you will see the current PHP version your site is running on.

Which PHP Version Works Best With WordPress?

As of recent WordPress releases, PHP 8.1 and PHP 8.2 are both stable and recommended. However, older plugins and themes may not be compatible with PHP 8.0 and above. If your site broke after a PHP upgrade, the safest option is to switch back to PHP 7.4 temporarily while you update your plugins and theme.

How Lowering PHP Version Can Fix the 500 Error

In your PHP version manager in cPanel, simply select PHP 7.4 from the dropdown and save the change. Reload your site. If the error disappears, at least one of your plugins or your theme is not compatible with the newer PHP version you were running. Update your plugins and theme, and then gradually move back up to a newer PHP version.

Fix 6 — Re-upload Fresh WordPress Core Files

If none of the above fixes worked, corrupted core files might be the issue. Re-uploading fresh WordPress files replaces only the core system files and does not touch your content, uploads, plugins, or theme.

Which Files to Replace

Download a fresh copy of WordPress from wordpress.org and unzip the file on your computer. Inside the WordPress folder you downloaded, you will see two folders named wp-admin and wp-includes along with several individual PHP files in the root.

You only need to replace the wp-admin and wp-includes folders. Do not touch wp-content because that folder contains all your themes, plugins, and uploaded media.

Step-by-Step: Re-upload Without Losing Data

Connect to your server via FTP or use cPanel File Manager. Navigate to your root WordPress directory. Delete the existing wp-admin and wp-includes folders. Upload the fresh wp-admin and wp-includes folders from the WordPress package you downloaded. The process overwrites any corrupted files with clean working versions.

Reload your site after the upload completes. Your content, settings, and customizations will remain exactly as they were.

Fix 7 — Check and Fix File and Folder Permissions

Incorrect file permissions are a less common but very real cause of the 500 error. If your server cannot read or execute WordPress files because the permissions are wrong, it will refuse to process the request.

Correct WordPress Permission Settings

The standard permission settings for a WordPress site are 755 for all folders and 644 for all files. The wp-config.php file should be set to 640 or 644 for added security. These numbers represent who can read, write, and execute each file or folder on your server.

How to Fix Permissions in cPanel

Open cPanel and go to File Manager. Navigate to your root WordPress directory. Right-click on the public_html folder and choose Change Permissions. Set it to 755. You can also select all files inside and set them to 644 in one step using the recursive permission change option.

For a faster approach, you can use the Terminal in cPanel and run these two commands:

Replace yourusername with your actual cPanel username. This sets correct permissions for every file and folder in one go.

How to Find the Exact Cause Using WordPress Error Logs

If you have tried all seven fixes and still cannot identify the problem, error logs are your best friend. They show you exactly which file failed and why, down to the specific line of code that caused the crash.

How to Enable WP_DEBUG in wp-config.php

Open your wp-config.php file in File Manager or via FTP. Find this line:

Change it to:

Save the file and reload your site. WordPress will now log all PHP errors to a file named debug.log inside your wp-content folder. Open that file to see exactly what went wrong.

Remember to turn WP_DEBUG back to false after you fix the issue. Running debug mode on a live site is not recommended long term.

How to Read the error_log File in cPanel

Your hosting server also keeps its own error log. In cPanel, open File Manager and navigate to your root directory. Look for a file named error_log. Open it and scroll to the bottom to see the most recent errors.

The log entries will look something like this: a timestamp, the type of error, the file path, and the line number where the error occurred. Even if the PHP code looks unfamiliar, the file path tells you which plugin, theme, or WordPress file is the source of the problem.

What Common Error Log Messages Mean

Here are a few error messages you might see and what they mean in plain language.

“Call to undefined function” means a plugin or theme is trying to use a PHP function that does not exist in your current PHP version. This usually points to a compatibility issue.

“Allowed memory size exhausted” confirms that the PHP memory limit is too low and needs to be increased as covered in Fix 3.

“No input file specified” or “Unable to open primary script” suggests a file is missing or the path to index.php is incorrect, which can happen after a migration.

“syntax error, unexpected token” means there is a typo or formatting error in a PHP file, often in wp-config.php or functions.php after a manual edit.

HTTP Error 500 in WordPress: Specific Situations Explained

Sometimes the 500 error appears in a very specific situation. Understanding the context helps you go straight to the right fix instead of working through every option.

HTTP Error 500 After WordPress Update

When the 500 error appears right after updating WordPress to a new version, the most likely cause is a plugin or theme that is not compatible with the new version. Start by deactivating all plugins as described in Fix 2. If the error clears, reactivate plugins one by one to find the incompatible one.

Also check that your PHP version meets the minimum requirement for the new WordPress release. WordPress publishes these requirements on their official website, and some major updates do require a newer PHP version.

HTTP Error 500 After Installing or Updating a Plugin

This is one of the clearest scenarios because the timing makes the cause obvious. If your site broke the moment you activated or updated a specific plugin, that plugin is almost certainly the culprit.

If you can still access the dashboard, deactivate that plugin immediately. If you are locked out, use the File Manager method from Fix 2 to rename the plugins folder. Once the site is back, contact the plugin developer, check their support forum, and wait for a compatibility update before using that plugin again.

HTTP Error 500 Only on wp-admin (Dashboard)

When only the WordPress admin area shows a 500 error but the frontend of your site loads fine, the issue is usually a plugin that runs exclusively in the admin panel. Dashboard widgets, admin-only plugins, and certain security plugins fall into this category.

Use File Manager to rename the plugins folder and access your dashboard. Once you are in, rename the folder back to plugins and deactivate them one by one until you find the one causing the admin crash.

HTTP Error 500 After Migrating WordPress to New Host

Site migrations are one of the trickiest scenarios because multiple things can go wrong at once. After moving WordPress to a new server, a 500 error often comes from incorrect file permissions, a .htaccess file that does not match the new server configuration, or a PHP version mismatch.

Start by resetting the .htaccess file as shown in Fix 1. Then check file permissions using Fix 7. Finally, compare the PHP version on your new host with what the old host was running and adjust accordingly.

Also make sure that the wp-config.php file has the correct database name, database username, database password, and database host for the new server. An incorrect database connection will also produce a 500 error.

HTTP Error 500 When Uploading Images or Media

This specific situation almost always points to one of two causes. Either the PHP memory limit is too low for processing image files, or the upload folder permissions are incorrect.

First, try increasing the PHP memory limit using Fix 3. If that does not help, check the permissions on your wp-content/uploads folder. It should be set to 755. If it is set to something more restrictive like 644, your server cannot write new files to that folder and will throw an error when you try to upload anything.

How to Prevent HTTP Error 500 in WordPress

I follow a specific update order that minimizes risk: WordPress core first, then plugins one at a time (checking the site after each), then the theme last. Never update everything at once — if something breaks, you won’t know what caused it.

Always Test Plugins on a Staging Site First

A staging site is an identical copy of your live website running in a private environment where changes have no impact on your real visitors. Most quality hosting providers offer a one-click staging feature.

Before you install a new plugin or run a major update on your live site, do it on the staging site first. Let it run for a day or two and check for any errors. If everything looks fine, then apply the same change to your live site. This single habit prevents the majority of plugin-related 500 errors.

Keep WordPress, Themes, and Plugins Updated

Outdated software is behind most WordPress errors I troubleshoot. I follow a specific update routine: WordPress core first, then plugins one at a time (checking the site after each), and finally the theme. Never bulk-update everything at once — if something breaks, you need to know exactly which update caused it. I check for updates every Monday morning; making it a habit removes the temptation to postpone it.

Check for updates at least once a week. Go to Dashboard and then Updates in your WordPress admin. Update WordPress core first, then your plugins, then your theme. Keeping everything current means you are always running software that is designed to work together.

Use a Reliable Managed WordPress Hosting Provider

Your hosting environment directly affects how often you’ll see errors like this. Budget shared hosting typically caps PHP memory at 32–64MB, runs older PHP versions, and offers generic support that doesn’t understand WordPress internals. Managed WordPress hosts like Cloudways, Kinsta, or SiteGround’s GoGeek plan provide higher memory limits, automatic PHP updates, and WordPress-specific support — which makes a measurable difference when something goes wrong.

Managed WordPress hosting providers optimize their servers specifically for WordPress. They handle server-level updates, maintain compatible PHP versions, and often have expert support that understands WordPress specifically. If you are serious about your website, investing in quality hosting is one of the best decisions you can make.

Set Up Automatic WordPress Backups

Even with every precaution in place, things can still go wrong. A reliable backup is your safety net. If a 500 error ever becomes so severe that you cannot fix it, a backup lets you restore your entire site to the last working version in minutes.

Use a trusted backup plugin like UpdraftPlus or BlogVault and configure it to run automatic backups daily. Store backups in a remote location like Google Drive or Dropbox, not just on your hosting server. That way, even if your server itself has a problem, your backup is safe and accessible from anywhere.

Frequently Asked Questions

What causes HTTP error 500 in WordPress?

The HTTP error 500 in WordPress is most commonly caused by a corrupted .htaccess file, a faulty or conflicting plugin, a PHP memory limit that is too low, an incompatible theme, PHP version mismatch, corrupted WordPress core files, or incorrect file permissions. In my experience, a broken .htaccess file or a bad plugin accounts for the majority of cases.

How do I fix HTTP error 500 without FTP?

You can fix most 500 errors without FTP by using the File Manager in your cPanel hosting account. It gives you full access to your server files directly from your browser. You can rename the .htaccess file, rename the plugins folder, edit wp-config.php, and check file permissions all without installing any FTP software.

Why is my WordPress admin showing HTTP error 500?

When the 500 error appears only in wp-admin and not on the frontend, the cause is almost always a plugin that runs specifically in the admin area. Dashboard widgets, admin-only tools, and certain security or performance plugins can trigger this. Renaming the plugins folder using File Manager and then reactivating plugins one by one will identify the problem plugin quickly.

Can a plugin cause HTTP error 500?

Yes, absolutely. Plugins are the most common cause of the 500 internal server error in WordPress. A plugin that has a PHP error, conflicts with another plugin, or is incompatible with your current WordPress or PHP version can crash the entire site. This is exactly why deactivating all plugins is one of the first troubleshooting steps.

Does HTTP error 500 mean my site is hacked?

Not usually. The 500 error is most often caused by configuration issues, plugin problems, or file corruption rather than a security breach. However, in rare cases, malicious code injected into your WordPress files can cause server errors. If you have ruled out all the common causes and the error persists, it is worth scanning your site with a security plugin like Wordfence and checking your files for any unfamiliar code.

How long does it take to fix the WordPress 500 error?

In most cases, you can fix the 500 error within 15 to 30 minutes by following the steps in this guide. Resetting the .htaccess file or deactivating plugins usually resolves the issue in under five minutes once you know what to do. More complex cases involving file corruption or database issues might take an hour or two, but a complete fix is almost always possible without professional help.

What is the difference between HTTP error 500 and 503?

These two errors both indicate server problems but have different meanings. A 500 error means the server encountered an unexpected condition and could not complete the request. It is usually caused by something in your website configuration. A 503 error means the server is temporarily unable to handle the request, typically because it is overloaded or undergoing maintenance. A 503 error is usually temporary and resolves on its own, while a 500 error requires active troubleshooting on your part.

Final Thoughts on Fixing HTTP Error 500 in WordPress

Seeing the HTTP Error 500 on your WordPress site is genuinely stressful, especially if it happens to a site that people depend on. But as I have shown throughout this guide, the error is almost always fixable, and the causes are well understood.

Start simple. Reset your .htaccess file first. If that does not work, deactivate your plugins. Work through each fix in order and you will almost certainly find the problem before reaching the end of the list. In years of working with WordPress, I have rarely encountered a 500 error that could not be resolved using one of the seven methods covered here.

The key is to stay calm and be methodical. Test one fix at a time, reload your site after each change, and take note of what you tried. That process will get you to the answer far faster than trying multiple things at once.

Once your site is back online, take the prevention steps seriously. Set up a staging environment, keep everything updated, and make sure you have reliable automatic backups running. These habits will not guarantee that you never see a 500 error again, but they will make it far less likely and far easier to recover from if it does happen.

I’ve used these exact steps to recover hundreds of WordPress sites from 500 errors, and the fix has never taken more than an hour. Bookmark this guide the next time your site goes down, you’ll know exactly where to start.

Disclaimer: This article mentions specific plugins, tools, and hosting providers for educational purposes only. I do not have any sponsored or affiliate relationship with any of the products mentioned. All recommendations are based on my personal experience working with WordPress sites

Previous Article

How to Fix "Error Establishing a Database Connection" in WordPress

Next Article

How to Migrate WordPress Site to New Host (3 Safe Methods)

Write a Comment

Leave a Comment

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