Do you get WordPress 500 internal server errors?

The internal server error is one of the most common errors in WordPress. Many novices find the mistake highly annoying since it provides no more information.

This article will show how to quickly fix the WordPress 500 internal server error.

What is the 500 Internal Server Error?

A common web server issue is the 500 internal server error. Any website may experience it; WordPress websites are not exempt from it.

Technically, the error code 500 in the message is an HTTP error code. This code's standard explanation will only be shown when looking it up.

The server could not perform the request because of an unexpected event, as indicated by a response code of 500 Internal Server Error.

This is a general catch-all error message, which signifies that when the problem occurred, the server could not assign a better, more useful error message.

The error page may seem different depending on whatever web browser you are using and which web server software (Apache or Nginx) your website uses.

This is an example of an Apache error page.

Internal Server Error

If you're using Nginx and Google Chrome, it can seem different.

It will also seem differently if Google Chrome cannot locate an error page to show:

Internal Server Error

This may be unpleasant for newcomers. They cannot immediately solve it since no hint or message properly points to them.

It's similar to asking how to solve an internal server error, not identifying the location of your discomfort when you ask your doctor how to address it.

However, if we know the typical reasons for this mistake, we may address each separately to rectify the problem without causing more damage.

What Causes the Internal Server Error in WordPress?

WordPress internal server errors are frequently brought on by a damaged .htaccess file, poorly written plugins, or your active WordPress theme.

We know two more potential reasons for the internal server error in WordPress: a PHP memory limit or damaged core WordPress files.

The internal server error may occasionally only appear when you attempt to enter the WordPress admin section, with the rest of the website functioning as intended. Now that that has been said let's look at WordPress's internal server error fix.

Fixing The 500 Internal Server Error in WordPress

Ensure you have a complete WordPress backup of your website before you start debugging.

A WordPress backup plugin can generate an exact website backup if you can access the WordPress admin area. To tackle this, a Duplicator is advised.

On the other hand, you may manually build a WordPress backup using phpMyAdmin and an FTP client if you don't have access to the WordPress admin area.

Following that, you may take the next few actions to investigate and fix the internal server error on your website.

Clear WordPress and Browser Cache

It's possible for browsers and your WordPress caching plugins to keep a cached version of an error page inadvertently.

The simplest solution is first to erase the cache on your browser.

clear cache of chrome

After that, by visiting the settings page for your caching plugin, you may erase the WordPress cache, provided you have access to the WordPress admin section of your website.

Checking for Corrupt .htaccess File

WordPress also sets up Redirects using the .htaccess file, which is a server configuration file.

One of the most common .htaccess files to be corrupt is a common reason for the internal server error.

The simplest solution is to Click the "Save Changes" button on the Settings » Permalinks page in the WordPress admin area, then leave things as they are.

update permalinks of WordPress

If your .htaccess file needs updating or creating, WordPress will attempt to do it for you. You can verify whether the internal server error has been fixed by checking your website.

However, if WordPress cannot create or write to your .htaccess file due to file and directory permissions, you may need to manually replace it.

To do this, access your website through FTP or the File Manager program in your hosting account's control panel.

Once you're connected, rename your main .htaccess file to something else, like .htaccess_old, to preserve it as a backup.

Next, navigate to the same directory as the wp-content, wp-admin, and wp-includes directories to change the .htaccess file.

To change the .htaccess file to .htaccess_old, right-click on it.

rename htacces of WordPress File

Create New File

The next step is to create a new .htaccess file.

On your FTP client or File Manager tool, right-click on the root folder of your website and then choose the 'Create new file' option.

newhtaccessfile of WordPress

Click OK to save this new file .htaccess.

This .htaccess file is currently empty; you must add the standard WordPress rewrite rules.

Right-click on the file in your FTP client or File Manager app and choose View/Edit.

edit htaccess file

TextEdit or Notepad, a simple text editor, will open the empty file. The following code must now be copied and pasted within it.

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

This code is the default rule set used by WordPress. Remember to upload the file back to the server after saving your modifications.

You may now check your website to verify whether the internal server error has been fixed.

If it did, then congratulate yourself on resolving the internal server error.

Before continuing with further tasks, go to the Settings » Permalinks page in the WordPress admin area and click the save button without making any changes. This will update your .htaccess file and ensure that your post pages do not return a 404 error by putting the proper rewrite rules in place.

You must read the rest of this post if the method of checking for a corrupt .htaccess file did not work for you.

Increasing the PHP Memory Limit

Sometimes, an internal server error may occur if a script uses the entire PHP memory allotment. To address this issue, you can modify the wp-config.php file to increase the PHP memory limit.

However, if you're new to WordPress, it's important to proceed with caution. Even minor errors with the WordPress core files can cause your site to malfunction.

To get started, connect to your WordPress website using an FTP application or the File Manager feature in your hosting account's control panel.

The wp-config.php file is located in the main folder of your website. Right-click the file and select "Download" to create a backup copy in case anything goes wrong.

Once saved, you may right-click on it and choose "View/Edit."

edit wp config file

Inside the wp-config.php file, you need to add the following code.

define( 'WP_MEMORY_LIMIT', '256M' );

If the internal server error only appears when you attempt to log into WordPress admin or upload an image there, you should raise the RAM limit by doing the following actions:

  1. Please create a new text document on your computer and name it php.ini.
  2. Add the following code there: memory=256MB
  3. save the document
  4. Upload it into your /wp-admin/ folder using FTP

If increasing the RAM limit fixed the problem for you, it was simply a temporary fix. It would be helpful if you could figure out what is eating up your RAM.

This can be a plugin with poor code or a theme feature. You should approach your WordPress site hosting provider to determine the precise diagnoses to examine the server logs.

If raising the PHP memory limit does not resolve your problem, more investigation is required.

Deactivate All WordPress Plugins

If none of the above solutions worked for you, the problem is probably brought on by a particular plugin you installed on your website.

Additionally, several plugins are likely interfering with one another.

You can browse if you have access to the WordPress admin area of your website, go to the plugins page, and turn off each WordPress plugin.

deactivate all WordPress plugins

However, you may use FTP to deactivate all WordPress plugins if you cannot enter the WordPress admin area.

Connect to your WordPress website with a file management program in your hosting account control panel or an FTP client.

Go to the /wp-content/ folder after connecting, then rename the plugins folder to plugins.deactivated.

plugins deactivate ftp

Firstly, WordPress looks for plugins in the plugins subdirectory. However, if the plugins folder cannot be found, all plugins will be immediately disabled.

Once you have changed the plugins.deactivated folder back to plugins to activate all of your plugins, you may now attempt to access your website to determine whether the internal server problem has been fixed.

Now that each plugin has been enabled, you may visit your website to see which is responsible for the internal server issue. However, if turning off all plugins didn't resolve the internal server problem on your website, you can continue reading.

Switch to a Default WordPress Theme

Some code in your WordPress theme may be the internal server error root cause.

You must change to the standard WordPress theme to determine whether this is true.

Go to the Appearance » Themes tab if you have access to the WordPress admin area. Clicking the Activate button will change the theme if you already have a default theme loaded.

activate WordPress theme

If you don't already have one, you may install a default theme (such as Twenty Twenty-Three, Twenty Twenty-Two, etc.) by clicking the Add New button at the top.

Even if you can't access the WordPress admin panel, you may now choose a default theme.

Using an FTP application, go to the /wp-content/ folder on your WordPress website.

Right-click on the themes folder and choose Save to save it to your computer as a backup.

download WordPress theme folder

The themes folder must then be removed from your website. Create a new themes folder after deleting the old one.

Since there will be nothing in your new themes folder, you don't currently have any WordPress themes installed.

A default WordPress theme must then be downloaded from the WordPress themes directory to your computer.

download WordPress theme file

Afterward, your browser will download the theme as a zip file to your computer.

Find the file on your computer and then unzip it. Windows users may unzip files by choosing Extract All from the context menu when they right-click on the file. The zip file may be extracted by double-clicking it for Mac users.

extract WordPress theme files

Your WordPress theme will now be available to you in a folder.

Using File Manager or FTP program, upload this folder to the empty themes folder.

upload WordPress theme folder

WordPress will immediately begin utilizing the default theme after an upload.

You may now check your website to verify whether the server's internal error has been fixed.

If this doesn't work, you could switch to the theme you were using or re-upload your WordPress themes from the backup. You can still do a few things to correct the problem, so don't panic.

Re-uploading Core Files

Re-uploading the /wp-admin/ and /wp-includes/ directories from a brand-new WordPress installation may be worthwhile if the plugin and theme settings failed to resolve the internal server error.

This won't delete your data but could fix the issue if a file is damaged.

You must first go to the website and select the Download option.

download WordPress

The WordPress zip file will be downloaded to your PC.

Extract the zip archive now. You'll discover a WordPress folder within.

WordPress folder extracted

The next step is to connect to your WordPress website using an FTP client.

Once connected, navigate to the website's root directory. The folder contains the folders wp-admin, wp-includes, and wp-content.

On your computer, click the WordPress folder in the left column.

The next step is to choose every file in the WordPress folder and upload it to your website.

upload core files

These directories will now be uploaded to your server by your FTP client.

If you want to replace the files, you will be prompted. Then click "Always use this action" after selecting "Overwrite."

overwrite files

Your previous WordPress files will now be replaced with brand-new, fresh copies via your FTP client.

If your WordPress files are corrupt, the internal server error will be fixed after this action.

Enable Debug Logs in WordPress

A debugging log-keeping system is already incorporated into WordPress.

You can activate it by using the WP Debugging plugin.

Once active, the plugin will enable debugging logs on your WordPress website.

You can enable debugging if you can't access the WordPress website's admin area by adding the following code to your wp-config.php file.

define( 'WP_DEBUG', true);

define( 'WP_DEBUG_LOG', true);

When debug logs are enabled, you can view them by opening an FTP client and going to the /wp-content/ folder to examine the logs.


You can view a list of errors and warnings on your website by opening the debug log file in a text editor.

Some of these mistakes and alerts can be minor mishaps that don't require correcting. However, these may put you on the right path if you get an internal server error on your website.

Ask your Hosting Provider

When all other attempts to resolve the internal server error on your website fail, it's time to seek further assistance. Contact your web hosting support staff they can review the server logs and identify the error's primary source.

× How can we help you?