75 guides published Start a blog Fix my site How we test
FIX IT

Fix a 500 Error When You Cannot Reach wp-admin

A 500 means the server tried to run your site and failed before producing any output. Unlike a white screen, the failure is often at the web server level rather than inside WordPress, which widens the list of suspects.

The short version

  • Read the server error log first. It usually names the cause outright.
  • A corrupt .htaccess is the most common single cause on Apache.
  • Everything here works over SFTP without dashboard access.
  • Clear every cache layer before deciding a fix did not work.

1. Read the server error log

Not the WordPress debug log — the web server’s. It is usually in the host panel under logs, or on the filesystem:

tail -50 /var/log/nginx/error.log
tail -50 /var/log/apache2/error.log
# or, on many shared hosts
tail -50 ~/logs/error_log

A 500 almost always writes a line here, and that line usually names the file and the problem.

2. Rename .htaccess

On Apache, a malformed .htaccess produces a 500 immediately. Rename it and reload:

mv .htaccess .htaccess-off

If the site returns, the file was the cause. Regenerate a clean one by visiting Settings → Permalinks and saving, then re-add any custom rules one at a time.

3. Disable plugins from the filesystem

mv wp-content/plugins wp-content/plugins-off

If the site returns, restore the folder and move plugins back individually until it breaks again. The last one you moved is the culprit.

4. Check PHP memory and execution limits

Some 500s are resource exhaustion rather than code. Raise both temporarily and see whether the error changes:

# wp-config.php
define( 'WP_MEMORY_LIMIT', '256M' );

# .user.ini or php.ini
memory_limit = 256M
max_execution_time = 120

5. Check file permissions and ownership

A 500 immediately after a migration is frequently permissions. Directories should be 755, files 644, and the web server user should own them.

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
ls -la   # confirm ownership looks right

6. Replace core

wp core download --force

Diagnosis table

ClueLikely cause
500 on every URL, including static filesServer config or .htaccess
500 on PHP pages, static files finePHP error or resource limit
500 only on wp-adminPlugin loading in admin, or memory
500 started after a migrationPermissions, ownership, or PHP version
500 started after an updatePlugin or theme incompatibility
Intermittent 500Resource limits under load

Watch out

If the site is behind a CDN or page cache, you may be looking at a cached error. Purge every layer before concluding anything.

Common questions

Why is there no error detail in the browser?

A 500 is deliberately generic so a server does not disclose internals to visitors. The detail is in the log.

Could it be the host?

Yes. A PHP-FPM pool exhausted by another account on shared hosting produces exactly this. If nothing above helps, ask them to check.

Is a 500 bad for SEO?

Short-term, no. Sustained, yes — crawlers reduce crawl rate and eventually drop pages. Hours are survivable; days are not.

S

Sumit

Writes everything on TechMozz.

More in Fix It