How to Fix 500 Internal Server Error in WordPress

Did you get the HTTP 500 internal server error on your WordPress site? Don’t panic; arm yourself with patience and follow this article. Server Error 500 is not specific to WordPress and can occur with any other website hosted on any web server.

There are several reasons why internal server error code 500 can occur. Its generic nature makes it difficult to fix because it won’t show the browser’s fundamental error.

To send the actual errors to the server browser on Windows, log into the web server and browse the WordPress site from the server itself.

To check for server errors on Linux, search the server log files for the exact cause of the WordPress HTTP 500 error code. We have analyzed all the possible causes of 500 server errors in WordPress and the possible troubleshooting steps:

HTTP 500 internal server error, cause 1: Corrupted .htaccess file

The first thing to do when you run into an internal server error 500 is to check that the .htaccess file is intact. In this case, we will first need to access the .htaccess file via FTP or via the cPanel file manager and rename it.

Here are the steps to rename the .htaccess file.

  1. After logging into cPanel, in the File section, select the File Manager icon.
  2. Check the Document Root box and select the domain name you want to access from the drop-down menu.
  3. Confirm that the Show your hidden files option is selected and click Go.
  4. File Manager will open a new tab. Place the .htaccess file in the list of all files.
  5. Right-click on the .htaccess file and rename it as .htaccess.old.

Create a new .htaccess file

  1. Log in to the WordPress dashboard.
  2. From the left navigation menu, click Settings> Permalinks.
  3. Click the Save Settings button and try reloading your website.
  4. If renaming the .htaccess file didn’t solve the problem, continue reading the post.

HTTP 500 Server Error, Cause 2: Out of memory

Server 500 internal server error can also occur if your WordPress website runs out of allocated memory.

A plugin could cause it with code errors or a theme that ran out of memory. Fix this problem means you will need to increase the memory limit used by WordPress.

To do this, open the wp-config.php file that you find in the main WordPress directory. Add the following line in wp-config.php and save the file.

define (‘WP_MEMORY_LIMIT’, ‘128M’);

If you continue to encounter error 500 even after this fix, you will need to extend the PHP memory limit in the php.ini file.

You can contact your hosting provider and ask them to increase the PHP memory limit. You can also refer to this article dedicated to this very topic.

Error 500, cause 3: corrupt WordPress plugin

PHP memory limit is increased did not solve the problem, it is likely that the 500 error is caused by one or more plugins installed on WordPress.

It is quite common for plugins to conflict for various reasons and cause server error 500 in WordPress.

In other cases, combinations of plugins and themes may not be compatible with each other and cause the 500 internal server errors.

There is no general way to detect which plugin is causing the problem, so you will need to disable them all at the same time.

If you don’t have access to the WordPress dashboard, to disable all plugins, please refer to the following steps:

Disable all plugins from cPanel

  1. Log in to cPanel, File section and go to File Manager.
  2. Select web Root (public_html / www) and click Go.
  3. Expand the public_html folder and go to the / wp-content / plugins folder.
  4. Right click on the / wp-content / plugins folder and rename it as plugins.old. This will disable all plugins at the same time.
  5. Now reactivate the plugins folder again renaming it plugins. This allows you to log in to the WordPress dashboard again.
  6. From the Dashboard, reactivate each plugin (one at a time) and refresh your site page to see if the internal server error 500 code is resolved.
  7. Deactivate all plugins via phpMyAdmin
  8. Log in to phpMyAdmin and locate the wp_options table, under the option_name column (field) find the row active_plugins
  9. Change the option_value field to a: 0: {}

This method allows you to determine which plugin is causing the problem and if it resolves server error 500 and WordPress.

Reload WordPress core files

If disabling the plugins did not resolve the internal server error 500, the only solution that remains is to reload the wp-admin and wp-includes folder from a new WordPress installation.

Go to https://wordpress.org, download the WordPress installation files and locate the wp-admin and wp-includes folders and replace them on the web server.

Don’t worry, this will not remove any of your data but will fix any problems in case of corrupt core files.

Contact the web host to check the server logs

In case no solution has solved the problem, you should contact your hosting provider. Web hosts can check the web server’s error logs and determine the exact cause of the 500 server error.

The cause of the HTTP 500 error could be a real server problem, and they could confirm it or try solutions such as changing file permissions or other.

Alternatively, you can migrate to a better host with servers optimized for running WordPress sites.

Conclusion

A 500 internal server error code in WordPress is generally not caused by actual server errors. Most of the time, it can be easily corrected using the methods described above. When in doubt, always ask your hosting provider; they have much more sophisticated tools than yours for identifying and fixing problems.

We always recommend that you enable debugging while you work and rule out problems related to plugins and themes, as this is what any service technician would ask you before doing or would do it on their own.

Have you encountered error 500 on your WordPress site and were unable to resolve it using this guide? We can do this through our WordPress site assistance, support, and maintenance service.

0 Shares:
Leave a Reply

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

You May Also Like
সিপ্যানেল থেকে ওয়ার্ডপ্রেস ইনস্টল করবেন যেভাবে
Read More

সিপ্যানেল থেকে ওয়ার্ডপ্রেস ইনস্টল করবেন যেভাবে

ওয়ার্ডপ্রেস ইনস্টল করার জন্য সবচেয়ে সহজ উপায় হচ্ছে সিপ্যানেল। সিপ্যানেলে সফটকুলাস নামে একটি এ্যপ থাকে সেখান থেকে মাত্র…
সফটকুলাস থেকে ওয়ার্ডপ্রেস আনইনস্টল বা রিমুভ
Read More

কীভাবে সফটকুলাস থেকে ওয়ার্ডপ্রেস আনইনস্টল করবেন

সফটকুলাস থেকে ওয়ার্ডপ্রেস আনইনস্টল করা খুব সহজ। কীভাবে সফটকুলাস থেকে ওয়ার্ডপ্রেস আনইনস্টল করবেন তা ধাপে ধাপে দেয়া হলো।…