Troubleshooting · Troubleshooting
How to Fix the 500 Internal Server Error in WordPress
Short answer
To fix the 500 Internal Server Error in WordPress, turn on the debug log to find the real error, then rename the .htaccess file, raise the PHP memory limit, and deactivate plugins one by one. Check file permissions and replace damaged core files if the error stays. Contact your host when the log points to a server limit or when no fix above works.
Key takeaways
- A 500 error means the server failed but does not say why, so the error log holds the real cause.
- Renaming .htaccess to .htaccess_old and saving permalinks creates a fresh .htaccess file.
- WordPress asks for 40M of PHP memory on a single site and 64M on multisite by default.
- Renaming the plugins folder deactivates every plugin without deleting any of them.
- Folders should use 755 and files should use 644, with wp-config.php set tighter at 440 or 400.
- Turn WP_DEBUG off again after you fix the error so visitors never see debug messages.
What does the 500 Internal Server Error mean in WordPress?
A 500 Internal Server Error means the server hit an unexpected problem and could not finish loading your page.
The error page gives no detail about the cause. MDN Web Docs calls the 500 status a generic catch-all response, used when no more exact 5xx status fits the failure.
MDN lists improper server configuration, out-of-memory issues, unhandled exceptions, and improper file permissions among the possible causes. In WordPress, those causes map to a broken .htaccess file, a plugin or theme fatal error, an exhausted PHP memory limit, or wrong file permissions.
The error can appear on every page, including wp-admin. That pattern points to a site-wide cause, such as .htaccess or memory, rather than one broken post.
What causes a 500 error in WordPress?
Four causes explain most WordPress 500 errors: a corrupted .htaccess file, a plugin or theme conflict, an exhausted PHP memory limit, and wrong file permissions.
WordPress support docs list the same set of causes for this error. The order below starts with the fastest cause to rule out, not the most likely one on every site.
| Cause | Usual trigger | First check |
|---|---|---|
| Corrupted .htaccess | Plugin install, security plugin, or manual edit | Rename the file and reload the site |
| Plugin or theme conflict | Recent update or new install | Rename the plugins folder |
| PHP memory limit reached | Heavy plugin, page builder, or import | Read the debug log for a memory message |
| Wrong file permissions | Server move, restore, or manual change | Check folders at 755 and files at 644 |
| Damaged core files | Failed or partial update | Re-upload wp-admin and wp-includes |
A fifth cause is an old or mismatched PHP version. WordPress recommends PHP 8.3 or greater, MariaDB 10.11 or greater, or MySQL 8.0 or greater, with HTTPS support, as of November 2026, on the WordPress requirements page.
What should you do before you change anything?
Back up your files and database first, and write down the last change you made before the error appeared.
A backup lets you undo a fix that makes things worse. If you can still reach wp-admin, use your backup plugin or host backup tool first. Our guide to how to back up WordPress covers the files and database you need.
Note the time of the last plugin update, theme change, or file edit. That change is the first suspect, and the debug log often names the same file.
Work through one fix at a time and reload the site after each step. Changing three things at once hides which one fixed the error.
How do you find the real error behind a 500 page?
Turn on the WordPress debug log, reload the site, then read wp-content/debug.log for the fatal error message.
Open wp-config.php in the site root with SFTP or your host file manager. Find the line define( 'WP_DEBUG', false ); and change it to the three lines below, above the line that says stop editing.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
WordPress debugging docs state that WP_DEBUG_LOG writes errors to a debug.log file in the wp-content folder. WP_DEBUG_DISPLAY set to false keeps those messages off the public page.
The log line usually names a file path and a message such as “Allowed memory size exhausted” or a fatal error in a plugin file. That file name tells you which fix to try next.
Your host error log is the second place to look. It catches failures that happen before WordPress loads, which the debug log cannot see.
Turn WP_DEBUG back to false after the fix. Leaving it on can fill the log file and expose paths if display is ever turned on by mistake.
How do you fix a corrupted .htaccess file?
Rename .htaccess to .htaccess_old, reload the site, and if it loads, go to “Settings” then “Permalinks” and click “Save Changes” to build a fresh file.
The .htaccess file sits in the site root, next to wp-config.php and wp-content. Apache reads it on every request, so one bad line can break the whole site. The Apache .htaccess tutorial explains that .htaccess files change configuration per directory, and the rules apply to that directory and all folders below it.
Use SFTP or your host file manager for these steps:
- Download a copy of .htaccess to your computer first.
- Rename the file on the server to .htaccess_old.
- Reload the home page and wp-admin.
- If the site loads, open “Settings” then “Permalinks” in wp-admin and click “Save Changes”.
- If the site still shows 500, rename the file back and move to the memory fix below.
Sites on Nginx do not use .htaccess, so skip this step on Nginx hosting. Ask your host which web server your plan uses if you are not sure.
How do you raise the PHP memory limit?
Add define( 'WP_MEMORY_LIMIT', '256M' ); to wp-config.php above the stop editing line, then reload the site.
WordPress asks PHP for 40M of memory on a single site and 64M on a multisite install by default. The admin area asks for up to 256M through WP_MAX_MEMORY_LIMIT. Those figures come from the wp-config.php handbook.
PHP itself caps each script with the memory_limit directive. The PHP manual defines memory_limit as the maximum amount of memory a script may allocate, and lists its default as 128M.
Raising the WordPress value cannot pass the server PHP ceiling. If your host caps PHP at 128M, a 256M WordPress value has no effect, and only the host can raise the server limit.
Check the result in wp-admin under “Tools” then “Site Health” then “Info” then “Server”. The PHP memory limit shown there should match the value you set.
If the debug log still shows a memory message after the raise, a plugin is using too much memory. Deactivate plugins as shown in the next section instead of raising the limit again.
How do you find a plugin or theme that causes a 500 error?
Rename the wp-content/plugins folder to plugins_old, reload the site, and if it loads, rename it back and reactivate plugins one at a time.
A fatal error in one plugin can stop every page from loading. Renaming the folder deactivates all plugins at once without deleting settings, and it works even when wp-admin is down.
Follow these steps:
- Connect by SFTP or your host file manager and open wp-content.
- Rename plugins to plugins_old and reload the site.
- If the site loads, rename the folder back to plugins.
- Open “Plugins” then “Installed Plugins” and activate one plugin.
- Reload the site after each activation until the 500 error returns.
The last plugin you activated is the cause. Keep it off, check for an update from its author, and look for a replacement if no update fixes it.
If plugins are not the cause, switch the theme. Rename the active theme folder inside wp-content/themes, and WordPress falls back to a default theme such as Twenty Twenty-Five. If the site loads, the theme is the cause.
WordPress 5.2 added a fatal error handler that emails the site admin and offers a recovery mode link when a plugin or theme causes a fatal error. Check that email before you start renaming folders, because it may already name the faulty plugin.
How do you check file permissions and WordPress core files?
Set folders to 755, files to 644, and wp-config.php to 440 or 400, then re-upload wp-admin and wp-includes from a fresh WordPress download if the error stays.
Wrong permissions can stop the server from reading files it needs. The WordPress file permissions guide notes that wp-config.php starts at 644 and calls leaving it that way a hazard, and it gives tighter values for that file.
Use your host file manager or SFTP to check the values. Never set any file or folder to 777, because that lets every user on a shared server read, write, and run it.
| Item | Value | Note |
|---|---|---|
| Folders | 755 | Owner can write, others can read and run |
| Files | 644 | Owner can write, others can read only |
| wp-config.php | 440 or 400 | Read-only for most users; use the value your host supports |
| .htaccess | 644 | WordPress needs to write it when you save permalinks |
Permissions differ by host, so ask your host for the values that fit your server setup. A site can show 755 and 644 and still fail if the wrong server user owns the files.
For damaged core files, download a fresh copy of WordPress, delete the wp-content folder from the download, and upload wp-admin and wp-includes over your site. Do not upload the downloaded wp-content folder, or you will overwrite your themes, plugins, and uploads.
How do you know the 500 error is fixed?
The 500 error is fixed when the home page, wp-admin, and a post page all load with a 200 response and no new fatal error appears in the debug log.
Reload the home page first, then open wp-admin, then open one post and one page. A fix that restores the home page but leaves wp-admin broken has not finished the job.
Check the debug log once more after a few page loads. A clean log with no new fatal error lines means the cause is gone, not just hidden.
Check the PHP version and memory limit on the Site Health screen at the same time. WordPress lists the PHP version under “Tools” then “Site Health” then “Info”.
If you run an old PHP version, our guide on how to update the PHP version in WordPress shows the host panel steps.
The guide on which PHP version to use lists the current recommendation.
If the error returns only on one page or one action, such as saving a post or uploading an image, the cause is narrower. Read the newest log line for that action and repeat the plugin test for the plugin tied to it.
When should you contact your host?
Contact your host when the debug log is empty, the server log names a server limit, or every fix above leaves the 500 error in place.
Send the host the exact log lines, the time the error started, and the list of fixes you already tried. That list stops support from repeating the same steps.
Ask the host to check the server error log, the PHP version, the PHP memory ceiling, and any server rule that blocks your site. A host can also confirm whether the server runs Apache or Nginx, which decides whether .htaccess matters at all.
Ask about plan limits too. Our guide on how much RAM WordPress needs explains the memory figures.
The WordPress hosting requirements guide lists the server versions a host should meet. If the host confirms your plan cannot meet them, a plan change is the fix, not another plugin change.
What mistakes should you avoid?
Avoid editing files without a backup, raising the memory limit again and again, and leaving debug mode on after the fix.
Do not edit wp-config.php or .htaccess in a word processor, because it can add hidden characters. Use a plain text editor or the host file manager.
Do not set permissions to 777 to make an error go away. It may restore access for a day and open the site to other accounts on the same server.
Do not delete the plugins folder or the theme folder. Rename them instead, so you can restore them and keep their settings.
Do not ignore the log. Guessing through fixes without reading the log wastes time, and the log often names the exact file in one line.
Frequently asked questions
Does a 500 error mean my WordPress content is lost?
No, a 500 error usually means the server cannot load your pages, not that your posts are gone. Your content lives in the database and the uploads folder, and both stay in place while the error shows. Back up the files and database before you fix anything, then work through the .htaccess, memory, and plugin steps.
How long does it take to fix a 500 error in WordPress?
Most 500 errors take 15 to 60 minutes to fix once you know the cause, because renaming .htaccess or a plugins folder takes only a few minutes. The slow part is reading the debug log and testing plugins one at a time. If the log points to a server limit, the fix depends on how fast your host replies.
Can a 500 error hurt my search rankings?
A short 500 error rarely causes lasting harm, because search engines retry pages that fail once. A 500 error that lasts for days can lead search engines to drop pages from results until the site loads again. Fix the error, then check that the home page and key pages return a 200 response.
Should I raise the PHP memory limit above 256M?
Only raise it above 256M if your host allows it and the debug log still shows a memory message after the 256M raise. A normal page should not need more than 256M, so a higher limit often hides a faulty plugin. Find the plugin that uses the memory first, and ask your host about the server ceiling before you raise the limit again.
Why does the 500 error appear only in wp-admin?
A 500 error only in wp-admin often comes from a plugin that runs only in the admin area, or from the higher memory use of admin screens. WordPress asks for up to 256M in the admin area through WP_MAX_MEMORY_LIMIT. Turn on the debug log, open wp-admin again, and read the newest log line to see which plugin or file failed.
What should I send my host when I ask for help with a 500 error?
Send the exact lines from wp-content/debug.log and the server error log, the time the error started, your PHP version, and the fixes you already tried. Include the last change before the error, such as a plugin update or a file edit. That detail lets support check server limits and rules instead of repeating your steps.
Sources
- 500 Internal Server Error MDN Web Docs
- Debugging in WordPress WordPress.org
- Editing wp-config.php WordPress Developer Resources
- Changing File Permissions WordPress.org
- Description of core php.ini directives PHP.net
- Apache HTTP Server Tutorial: .htaccess files Apache HTTP Server
- Requirements WordPress.org
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
