How to Fix Error 500 on WordPress: Step-by-Step Tutorial

Written by

in

TL;DR: To fix Error 500 on WordPress, you should first increase your PHP memory limit and then rename your .htaccess file to force a regeneration. If the issue persists, deactivate all plugins by renaming their folder via FTP to identify any conflicting code.

Understanding the White Screen of Death

Error 500, often referred to as the “Internal Server Error,” is one of the most frustrating issues for WordPress administrators. It manifests as a blank white page or a generic error message, indicating that the server encountered an unexpected condition that prevented it from fulfilling the request. This error is not specific to WordPress itself but rather stems from the server environment, such as Apache or Nginx. Because the error is generic, pinpointing the exact cause requires a systematic troubleshooting approach. The good news is that most instances of Error 500 are caused by simple configuration issues, exhausted memory limits, or corrupted files, all of which can be resolved with patience and the right steps.

If you want to dig deeper, check out our guide on Jobs in the UK After Graduation: Top Tips & Opportunities.

Step 1: Increase PHP Memory Limit

The most common cause of Error 500 is a depleted PHP memory limit. Your WordPress site may be running out of the allocated memory required to execute scripts. To fix this, you need to access your site’s root directory using an FTP client or your hosting provider’s file manager. Locate the wp-config.php file and download a backup copy before making any changes. Open the file in a text editor and look for the line that defines WP_MEMORY_LIMIT. If it does not exist, add the following line just above the line that says “That’s all, stop editing!”: define('WP_MEMORY_LIMIT', '256M');. Save the file and upload it back to your server, replacing the existing file. Refresh your website to see if the error has disappeared.

Step 2: Rename the .htaccess File

If increasing memory does not work, the next step is to check your .htaccess file. This file controls URL redirection and other server directives. A corrupted or incorrectly formatted .htaccess file can trigger a 500 error. Using your FTP client or file manager, locate the .htaccess file in the root directory. Rename it to something like .htaccess_old. This effectively disables the file. Now, log in to your WordPress admin dashboard and navigate to Settings > Permalinks. Simply click the “Save Changes” button without making any modifications. This action forces WordPress to generate a fresh, clean .htaccess file. If your site loads correctly, the issue was indeed with the old configuration.

Screenshot of WordPress debug settings

Step 3: Disable Plugins via FTP

When the above steps fail, a plugin conflict is the likely culprit. Since you cannot access the dashboard to deactivate plugins, you must do so manually. Using your FTP client, navigate to the wp-content directory and find the plugins folder. Rename the entire plugins folder to plugins_old. This disables all plugins instantly. Refresh your site. If it works, one of the plugins is causing the crash. Rename the folder back to plugins, then rename individual plugin folders one by one, testing your site after each change, until you find the problematic plugin.

FAQ

Q: Why did I get a 500 error after updating a plugin?
A: This usually happens because the updated plugin contains a syntax error or conflicts with your current PHP version. Renaming the plugin folder via FTP will restore your site access.

Q: Can I fix Error 500 without FTP access?
A: If your hosting provider offers a File Manager in cPanel, you can use that instead of FTP. Alternatively, some hosts allow you to reset PHP versions or memory limits directly from their control panel.

Q: How do I enable debugging to find the exact error?
A

Related Articles

Comments

Leave a Reply

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