1. Check for a Corrupted .htaccess File
This is one of the most common causes.
Fix:
- Connect to your site via FTP or use your host’s File Manager.
- Locate the
.htaccess
file in the root directory (same folder aswp-config.php
). - Download a backup of it, then delete the original from the server.
- Visit your site. If it loads, you’ve found the culprit.
- Now, go to your WordPress dashboard → Settings → Permalinks, and click Save Changes to generate a new, clean
.htaccess
file.
2. Increase the PHP Memory Limit
Low memory can cause scripts to fail, triggering a 500 error.
Fix:
- Access
wp-config.php
via FTP or File Manager. - Add the following line before the line that says
/* That's all, stop editing! */
:
phpCopyEditdefine('WP_MEMORY_LIMIT', '256M');
- Save and upload the file. Then refresh your site to see if the error is gone.
Note: If your host doesn’t allow memory increase this way, you’ll need to request it via their support.
3. Deactivate All Plugins
A misbehaving plugin can break your site completely.
Fix:
- Access your site’s files and rename the
plugins
folder inwp-content
to something likeplugins-old
. - This deactivates all plugins at once.
- Check your site—if it works, rename the folder back to
plugins
and activate each plugin one at a time from the dashboard to find the one causing issues.
4. Switch to a Default Theme
Themes can also cause 500 errors if there’s a conflict or corrupted code.
Fix:
- Access your
wp-content/themes/
folder. - Rename your active theme’s folder (e.g.,
astra
toastra-old
). WordPress will fall back to a default theme liketwentytwentyfour
. - Check if the site loads now.
If the site works with the default theme, then your theme likely has compatibility or code issues.
5. Check File Permissions
Incorrect file permissions can cause server errors.
Recommended Permissions:
- Files:
644
- Folders:
755
Use an FTP client or ask your host to help reset permissions to WordPress best practices.
6. Enable WordPress Debugging
Turn on debugging to get more specific error messages.
How to:
- Open
wp-config.php
. - Add these lines:
phpCopyEditdefine('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
- This will log errors in a
debug.log
file located inwp-content/
.
Review the file to pinpoint the exact issue.
7. Ask Your Web Host
If you’ve tried everything and still see the error, it may be a server configuration issue.
Contact your hosting provider and ask:
- Is the server running PHP correctly?
- Are there recent server updates or changes?
- Can they check the server error logs?
A good host will help you resolve the issue or offer insights from their end.