This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Fix WordPress HTTP 500 Internal Server Error in Simple Steps

June 16, 2021

7 Min Read
http error 500 wordpress

WordPress is not an exception when it comes to errors. It can range from your WordPress web hosting to bugs in your theme or plugins. Some errors can be fixed by tweaking a thing or two while others can take days of troubleshooting to get fixed. All of this can lead to a loss in traffic and possibly affect the user experience of a site.

Let’s assume that your website is working fine until a few days back, a minor glitch takes place, and it escapes your mind. Suddenly, you start observing a 500 internal error on every page of your website. Don’t worry! I know that you are now panicking out that you have just located a 500 internal server error on your WordPress website but there is a solution for almost everything on WordPress. It’s due to the nature and diversity of the CMS itself that you can find a solution for everything.

Today, I’ll tell you how to resolve WordPress 500 internal server error so, in the future, you don’t have to face this issue and even if you do, you have a ready solution at hand.

1. What Is a 500 Internal Server Error?

As the name suggests, this is an error occurs on the server level when the server is unable to show the requested page. An internal server error is an application-side issue that can occur on your web server. When you write a specific URL into the address bar or if you click a link on a website, you are requesting the server to show you a page. Presently, for some reason, the server can’t show you that specific page you are seeking which signifies that you are facing an internal server error.

Internal Server Error on Your WordPress Website

Note: Just to be on the safe side, always remember that it is necessary that your hosting provider offers you automated backup.

Are you tired of fixing WordPress errors?

Try Cloudways managed hosting for a hassle-free experience.

2. Create a WordPress Backup

Most of the time, you are not responsible for the errors that occur on your hosted server. Since humans can make mistakes so can servers do since they are managed by people only. Some of these errors are severe and may end up compromising your whole website, therefore backing up website data on your server should be a mandatory practice.

However, if your hosting provider fails to provide you with the right options to backup WordPress website data, you can try the following WordPress Backup Plugins.

3. How to Resolve 500 Internal Server Error on Your WordPress Website

Troubleshooting any error can save a lot of time and effort. Initial analysis of the problem can help you identify the root cause; hence pave a way towards resolving the problem at hand. Many reasons can cause the server to raise a 500 internal server error on the WordPress website.

To fix this persistent issue, it is necessary that one should identify the cause of the occurrence. The two common causes of this error are corrupt .htaccess file and PHP memory limit. So without further ado, let’s discuss how we can fix them.

3.1 The .htaccess File Error Fix

One of the key files in any PHP based application is .htaccess file. This file contains server related configuration rules. If your .htaccess file is corrupted, this can cause a 500 internal server error. The .htaccess file is usually affected by a module or a broken installation of a theme. In this case, you should first access your .htaccess file.  To determine this issue, log in to your FTP account. Once logged in to your FTP account, you will see a .htaccess file available in the root directory along with other folders such as wp-content, wp-include and wp-admin.

FTP Access

Now that you have located your .htaccess file, you can download it from the live server to a local location on your PC. Next, open this file in your text editor (Notepad++, Dreamweaver, etc).

Navigate to this link: and copy-paste the version of the code that fits best for your website. Then, save the .htaccess file and upload it to the live server.

The code differs for different WordPress configurations and installations. Suppose you have used WordPress Multisite in WordPress 3.5 or later, then you need to use the following code:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Now, reload your website to see if the 500 internal server error is fixed. If it is fixed then that would be great, but if not then navigate to the next step.

Why Speed is Crucial for SEO & UX?

These expert tips will show you how to improve the speed of your WordPress Websites.

Thank You

Your Ebook is on its Way to Your Inbox.

3.2 Increasing PHP Memory Limit in WordPress

When a user makes a request it is handled by PHP and triggers a process that ultimately renders the HTML at the client’s end. PHP memory is allocated to run this process. Another way of fixing the 500 internal server error is by increasing the PHP Memory Limit. Your host and WordPress set the PHP memory limits by default. As soon as you observe a memory drop, the server automatically displays a 500 internal server error. To avoid such discrepancy, simply increase the PHP memory limit in WordPress and check whether your website works fine or not. This way you can seemingly result in avoiding the 500 internal server error occur on your website often.

Some of the most common ways of increasing a WordPress website’s PHP memory limits is by altering the code in one of these files:

Here is how you can tweak with these files and

Functions File

Navigate to your root directory and find function.php file. Right-click on this file, and select Download. It will download the file to your PC. Open the file in your text editor and include this bit of code below the opening PHP tag:

@ini_set(‘upload_max_size’ , ’64M’);
@ini_set(‘post_max_size’, ’64M’);
@ini_set(‘max_execution_time’, ‘300’);

.htaccess File

You can also use a .htaccess file for increasing PHP memory limit. Just go to your root directory, and find .htaccess file. Right-click on the file, and select Download to download it on your PC. Now, open the file in your text editor and include this bit of code below the opening PHP tag:

php_value upload_max_filesize 64M
php_value post_max_size 64M

WP-Config File

You can also use a wp-config.php file for increasing the PHP memory limit. Just go to your root directory, and find wp-config.php file. Right-click on the file and select Download to download it to your PC. Open the file in your text editor and include this bit of code below the opening PHP tag:

define(‘WP_MEMORY_LIMIT’, ’64M’);
ini_set(‘post_max_size’, ’64M’);
ini_set(‘upload_max_filesize’, ’64M’);

PHP.ini File

You need to create a php.ini file and paste the below code in it. Upload the following code in the wp-admin/ directory.

memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
file_uploads = On

If these two possible ways aren’t enough to resolve the 500 Internal Server Error, here are a few more ways through which you can avoid this Server Error to occur in your WordPress website.

3.3 Plugins Audit

Faulty or outdated plugins can cause compatibility issues which leads to errors in the WordPress website. They are considered as a security risk as if not updated with the latest WordPress security patches.

If you have access to the admin dashboard of your WordPress website, deactivate each plugin one by one. Refresh your website after each deactivation.

Then check your website again. If the site starts functioning properly, then the internal server error must be due to the plugin installed on your WordPress. Now, you need to activate each plugin one by one and refresh your website after each plugin activation. The problematic plugin will soon be identified as it will result in a 500 Internal Server error for your website.

You may either remove this plugin and replace it with an updated plugin or contact their support team to release its patch so it can be used.

Ideally, at this point, the issue has been settled. If not, move to the following step.

Fresh wp-admin & wp-includes

Sometimes it is difficult than one expected to resolve an error. Typical WordPress site is consists of third party themes and plugins and auditing their source code is no walk in the park. In this section, you need to download new wp-admin & wp-content folders and upload to live host via FTP.  Make sure that you have backed up the website before this step.

Contact Your Hosting Provider

If the problem persists even after the investigation of these common causes, then it is advised that you should contact your hosting provider. You can place a request to the technical experts can resolve your issue by going over your server settings.

One can find multiple error messages related to the 500 Internal Server Error message as they are all server side errors. Such an example of a 500 error is the 502 Bad Gateway Error. If you are a Cloudways user and you have to face these above errors, then you need to contact over to our WordPress cloud hosting support team. They will guide how you can resolve these issues. If you wish to learn more about fixing the 502 Bad Gateway Error in detail, Click Here.

Concluding Thoughts

We hope you found this guide helpful and that you were able to solve your “WordPress 500 internal server error” problem. Have you figured out any other way to get rid of this problem? Please share your solutions with us in the provided comment section below. I am sure, it will be beneficial for others who are facing similar issues.

In the meantime, you can also learn about how to resolve the 403 Forbidden error and 404 page not found error for your WordPress websites.

Q1. What causes a 500 error?

The 500 (Internal Server Error 500) error code message is commonly associated with a Web server crash problem. This error message does not necessarily mean that the web host is responsible. The causes of one such failure are multiple.

The HTTP header information returned by the webserver indicates to the client that something is not working normally without detailing the exact cause of the failure.

Q2. What is a 500 error?

A 500 error is an internal server error. This error may be due to a script error or misconfiguration of your web hosting. It is not necessarily the hosting is responsible but surely, in any case, this error can be resolved by you.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Customer Review at

“Beautifully optimized hosting for WordPress and Magento”

Arda Burak [Agency Owner]

Saud Razzak

Saud is the WordPress Community Manager at Cloudways - A Managed WooCommerce Hosting Platform. Saud is responsible for creating buzz, spread knowledge, and educate the people about WordPress in the Community around the globe. In his free time, he likes to play cricket and learn new things on the Internet. You can email him at [email protected]


Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!


Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!