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.

📣 Join our live AMA on the Future of Page Builders with Brizy's CEO! Register Now →

How to Fix the 500 Internal Server Error in WordPress

Updated on March 5, 2024

12 Min Read
WordPress 500 Internal Server Error

The WordPress 500 internal server error is among the most common WordPress errors. It appears unexpectedly and makes your website inaccessible.

But don’t worry!

This guide provides easy fixes that will help you get rid of the error in a matter of minutes (totally beginner-friendly).

Let’s get started…

What Is the WordPress 500 Internal Server Error?

The WordPress 500 internal error is an application-side issue and mostly occurs on the server level. Typically, it is caused due to plugin/theme issues, corrupted .htaccess files, database, caching issues, hosting issues, or due to a PHP memory limit.

When you visit any URL, the web server takes your request to show you your desired page. But when an internal server error occurs, the server fails to show you the page resulting in an error message.

Here’s how the error page can look like:

example of 500 internal server error

– Example of Internal Server Error

On Chrome, it may look like this:

500 internal server error on chrome browser

– Example of 500 Internal Server Error on Chrome browser

What Causes the 500 Internal Server Error in WordPress?

The 500 internal server error can affect any website. Common causes include plugin or theme issues, exhausted PHP memory limit, corrupted files, or coding problems. One specific concern might be a corrupt .htaccess file, especially if the error appears only in the WordPress admin area.

To troubleshoot this error, we recommend a systematic approach. Start by checking plugins and themes, move on to examining the PHP memory limit, and inspect for any corrupted files. Additionally, ensure your .htaccess file is intact, especially if the error is localized to the WordPress admin area.

To sum up, the main cause of this error lies on the server side, so the solutions involve making server-side adjustments.

Fixing Errors is Easier With Cloudways

Get rid of WordPress errors with a cloud host built to deliver a hassle-free experience with incredible speeds.

How to Fix the 500 Internal Server Error on Your WordPress Site?

Since the 500 internal server error on WordPress occurs for various reasons, it has multiple fixes. I recommended following the fixes listed below chronologically to fix the error quickly.

1. Backup Your WordPress Site

Backing up your WordPress site is super important. Even if you have implemented extensive security precautions, like using a secure WordPress hosting service or regularly updating WordPress core and plugins, your website data could still be compromised.

Even an innocent coding error can bring down your site. That’s why backing up your WordPress site is critical. You can do it manually or by using the trusted WordPress backup plugins.

2. Refresh Your Page

Sometimes, even reloading the page can knock the internal server error away, so why not try the simplest solution first?

A server can get overloaded and go down for some time, and the issue is often fixed with a mere refresh. So, start with a page refresh in your quest to fix the 500 error.

If this doesn’t resolve the problem, move on to the other solutions.

3. Clear the Browser Cache

When your website starts acting up with that 500 internal server error, a quick fix you can try is clearing out the cookies and cache. This step can also help you bypass the 404 error and the White Screen of Death.

Cache files can get corrupted from time to time, restricting your access to your desired website.

Before clearing your browser cache, check if your website is down for everyone. You can use a site called “Is it Down Right Now” to do this. If it’s only unavailable for you, go ahead and clear your browser cache.

The method to clear cache & cookies is different for each browser. You can clear them by going to the settings.

If you’re a Chrome user, use the shortcut key combination of Ctrl+Shift+Delete, and proceed with clearing the cookies and cached images.

clear browser cache

Reload your page after clearance, and check if the problem persists. If yes, then move on to the next method.

4. Clear WordPress Cache

At times, when your WordPress site encounters a 500 internal server error, it can hinder the proper loading of the site. Interestingly, even after resolving this error, you might still face issues if your cache retains the outdated version of your site.

This persistence of the cache can hinder the display of recent changes, making it seem like the 500 error is still present. To ensure your visitors and you can access the most recent version of your site, it becomes crucial to clear your WordPress cache.

There are multiple methods for clearing your WordPress cache. However, in this guide, I’ll show you the process of clearing your WordPress caching plugin’s cache. For additional methods, please refer to our detailed guide on how to clear WordPress cache.

Clearing Your WordPress Caching Plugin’s Cache

Breeze is a highly popular WordPress caching plugin. Here’s a step-by-step guide using the Breeze plugin:

  • Log in to your WordPress Dashboard.
  • Install and activate the Breeze plugin.

Activate the Breeze plugin

  • Navigate to the Breeze plugin’s Settings section.

Breeze plugin's Settings section.

  • In the Settings section, select the desired options by marking them.

Clear Cache

  • The cache will be cleared, ensuring a refreshed website.

5. Check Your .htaccess File

A .htaccess file is a key file in all PHP-based applications that controls your website’s configuration. If your .htaccess file is corrupted, it can lead to a 500 internal server error. This file is usually affected by a module or a broken theme installation.

You can fix the error in these cases by accessing the .htaccess file. Follow the steps below to access and fix the .htaccess file.

  • If you are a Cloudways user, log in to the Cloudways platform.
  • Click servers and select your server.
  • Copy your Master Credentials from Server Management, and paste them into the FTP client.

master credentials

  • Click Quickconnect.
  • Click applications > public_html
  • You’ll see a file named .htaccess in the root directory.

.htacess File in WordPress Root Directory

  • Now that you have located your .htaccess file, you can download it from the live server to a local location on your PC.
  • Open this file in any text editor like Sublime Text 3, Notepad++, Dreamweaver, etc.
  • Go to .htaccess on WordPress.org
  • Copy and paste the version of the code that fits best for your website
  • Save the .htaccess file and upload it to your web server.

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

# BEGIN WordPress Multisite
# Using subfolder network type: https://wordpress.org/support/article/htaccess/#multisite
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]

# END WordPress Multisite
  • Reload your site to see if the 500 Internal Server Error is fixed or not. If not, move to the next step.

6. Plugins Audit

Conduct regular plugin audits to ensure your website uses the most recent plugins.

Faulty or outdated plugins can cause compatibility issues, leading to errors in your WordPress website. Updating each plugin can be very tiring, so at Cloudways, we offer the SafeUpdates feature to automate the regular maintenance of WordPress sites.

Nevertheless, if you wish to perform the audit manually, you may follow the steps below:

  • Go to your WordPress dashboard.
  • Mark the plugins you want to deactivate.
  • Click on the drop-down menu, and click Deactivate.
  • Refresh your website.

Deactivate WordPress Plugins

You may deactivate your plugin one after another, refresh, check if the website is working again, and then activate that plugin. This whole process will help you identify the faulty plugin.

Once you’ve found the culprit, you can either remove it or replace it with an updated plugin. If you still get the error even after checking all your plugins, move on to the next step.

7. Deactivate WordPress Plugins Using FTP

If accessing the WordPress admin area is not possible with the previous solution, an alternative is to deactivate all WordPress plugins using FTP.

Here’s how:

  • Connect to Your WordPress Website: Use an FTP client or the file manager app in your hosting account control panel.
  • Navigate to the /wp-content/ Folder: Locate and navigate to the /wp-content/ folder.
  • Rename the Plugins Folder: Find the ‘plugins’ folder and rename it to ‘plugins.deactivated.’

plugins.deactivated wordpress folder in FTP client

  • Automatic Deactivation by WordPress: WordPress automatically deactivates all plugins if the ‘plugins’ folder is not found.
  • Check Your Website: Visit your website to check if this action resolves the internal server error.
  • Restore Your Plugins: To restore, rename the ‘plugins.deactivated’ folder back to ‘plugins,’ but note that the plugins will be restored in a deactivated state.
  • Activate Plugins One by One: Identify the specific plugin causing the internal server error by activating plugins individually.

8. Theme Audit

Sometimes a WordPress theme can lead to a 500 internal server error, even if you are using the best WordPress themes. Follow the steps below to switch to the default WordPress theme:

  • Go to your WordPress dashboard.
  • Click Appearance > Themes.
  • Activate the Twenty Twenty-Two theme.
  • Your old theme will automatically be deactivated upon a new theme’s activation.

change your WordPress theme

You can change your theme via the FTP client if you can’t access your WordPress dashboard.

  • Log in to your FTP client.
  • Locate the folder named “theme.” (You may find it in wp-content).
  • Rename the “theme” folder.
  • Refresh your WordPress site to see if the error still persists.
  • If you don’t see the error, it means that your theme caused it, so opt for a new theme.

rename the themes file in FTP

If you still see the error, try out the next solution.

Error-Free Plugin/Theme Automated Updates with SafeUpdates

Cloudways SafeUpdates automatically backs up and tests all your plugins and themes for errors before any updates.

Learn More

9. Increase PHP Memory Limit

When PHP workers are already busy on a site, they start to build up a queue. Once you’ve reached your limit of PHP workers, the queue starts to push out older requests which could result in 500 errors or incomplete requests. Read our in-depth article about PHP workers.

Some of the most common ways of increasing a WordPress website’s PHP memory limit is by altering the code in any of the following files:

  1. Adjust the Functions.php File (Advanced)
  2. Edit the .htaccess File (Advanced)
  3. Tweak the WP-Config.php File (Advanced)
  4. Customize the PHP.ini File for Advanced Settings

Adjust the Functions.php File (Advanced)

  • Go to your FTP client.
  • Go to your root directory, and locate the functions.php file.
  • Right-click the file and click Download.

edit the functions.php file

  • Open the functions.php file in your text editor.
  • Add the following code at the opening PHP tag:
@ini_set(‘upload_max_size’ , ’64M’);
@ini_set(‘post_max_size’, ’64M’);
@ini_set(‘max_execution_time’, ‘300’);

Edit the .htaccess File (Advanced)

  • Go to your FTP client.
  • Find the .htaccess file in your root directory.
  • Right-click on the “.htaccess” file and select Download.

edit the .htaccess file

  • Open the .htaccess file in your text editor and add the following code at the tag below PHP:
php_value upload_max_filesize 64M
php_value post_max_size 64M

Tweak the WP-Config.php File (Advanced)

  • Log in to your FTP client.
  • Go to your root directory.
  • Find the wp-config.php file, right-click on it, and select Download.

Edit the wp-config.php file

  • Open the wp-config.php file in your text editor and add the following code at the opening PHP tag:
define(‘WP_MEMORY_LIMIT’, ’64M’);
ini_set(‘post_max_size’, ’64M’);
ini_set(‘upload_max_filesize’, ’64M’);

Customize the PHP.ini File for Advanced Settings

  • Create a php.ini file in the wp-admin/ directory.

Create a php.ini file in wp-admin

  • Paste the following code.
memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
file_uploads = On

If you still see the 500 internal server error after trying out the above solutions, head over to the next method.

10. Contact Your Hosting Provider

Contact your PHP hosting or WordPress provider if the problem persists even after trying the abovementioned solutions. You can place a request to the technical experts, who can resolve your issue by going over your server settings.

If you are a Cloudways user, then the process is quite easy. Contact our 24/7 support team, and get instant guidance on resolving any issues.

Facing persistent 500 internal server errors?

With Cloudways’ optimized configurations and proactive server management, you can get rid of it for good.

11. Fresh wp-admin and wp-includes

A typical WordPress website consists of third-party themes and plugins, and auditing its source code is not easy.

If none of the above solutions work, you can try this one as a last resort. But you must keep in mind that you’ll lose all your data. So, the best practice is to back up your website before this step.

You need to download new wp-admin and wp-content folders and upload them to the live host via FTP.

  • Head over to the WordPress.org website.
  • Click on Get WordPress.

get wordpress

  • Click “Download WordPress 6.4.3
  • This will start downloading the latest WordPress version.

download wordpress from wordpress.org

  • Extract the .zip file.
  • Connect to your WordPress website via an FTP client.
  • Go to the root folder, and look for the wp-admin and wp-includes files.

Drop wp-admin and wp-content to FTP client window

  • Select the wp-admin and wp-content files from the extracted files, and drop them into the FTP client window.
  • Select overwrite, and also mark always use this action.
  • Click OK to continue.

select overwrite

Once the process finishes, all your older WordPress files will be replaced by new ones. In case any of your WordPress files were causing the 500 internal server error, this process will fix the error.

12. Enable Debug Logs in WordPress

By default, WordPress doesn’t log errors as debugging is turned off. To enable error logging, start by installing a WordPress debugging plugin like WP Debugging or any other trusted debugging plugin. Another option is to use the WordPress Query Monitor plugin for debugging your WP site.

Once the plugin is activated, error messages on your site will be recorded and logged automatically, making it easier for analysis and troubleshooting.

wp debugging

No More Errors With Traffic Surges.

Fuel your website’s growth with Cloudways Autonomous. Automate scaling to effortlessly traffic spikes, optimize speed, and fortify security for unmatched performance.

To access the debug logs, you can use the FTP client and go to the /wp-content/ folder. After that, you can open the debug log file in a text editor to view a list of errors and warnings occurring on your website.

debug.log file

Check out our detailed guide on WordPress logs to get a better understanding of how to analyze and debug WordPress error logs.

Variations of the 500 Internal Server Error

There are various types of 500 status error codes (500, 501, 502, 503, 504, etc.), each indicating a different issue. You may encounter these errors with different labels, such as:

  • 500 Internal Server Error
  • HTTP 500 – Internal Server Error
  • 500 Error
  • HTTP Error 500
  • 500 – Internal Server Error
  • HTTP 500
  • Internal Server Error
  • 500 Internal Server Error. Sorry, something went wrong.
  • 500. That’s an error. There was an error. Please try again later. That’s all we know.
  • The website cannot display the page – HTTP 500.
  • Is currently unable to handle this request. HTTP ERROR 500.

Revolutionize Your Website Experience. Join Cloudways today!

Step into the future of hosting with Cloudways Managed hosting. Experience seamless scalability, unmatched speed, and ironclad security for your website.

Summary

After trying the fixes mentioned in this detailed guide, I hope you have gotten rid of the WordPress 500 internal server error on your site. Which solution helped you in fixing the 500 error on your website? Let us know in the comments below.

Q.1: How do I fix a 500 Internal server error?

You can fix the 500 internal server error by trying out the following fixes:

  • Refresh your page
  • Clear the cookies & browser cache
  • Check your .htaccess File
  • Plugins and themes audit
  • Increase the PHP memory limit
  • Contact your hosting provider
  • Fresh wp-admin and wp-includes

Q.2: Can you fix an internal server error?

Yes, you can fix an internal server error by increasing your PHP memory limit, fixing a corrupted .htaccess file, deactivating faulty plugins & themes, clearing the cookies, or contacting your hosting provider.

Q.3: What is a 500 error?

A 500 error is an internal server error that typically appears when there’s a problem with the site’s server. It could arise due to scripting or configuration issues of your managed web hosting. It may also occur due to corrupted files or broken code.

Q.4: How do you fix 500 internal server errors? There is a problem with the resource you are looking for, and it cannot be displayed.

The first solution to a 500 internal server error is to refresh the page. If the error persists, you may try clearing the cookies, deactivating faulty plugins or themes, fixing the .htaccess file, or contacting your hosting provider.

Q.5: How to solve 505 internal server error in WordPress?

A 505 error typically indicates an HTTP version not supported issue. It suggests that the server doesn’t support the HTTP protocol version used in the request. To resolve:

  • Clear your browser cache.
  • Ensure you’re using the latest WordPress version.
  • Check your server’s PHP version compatibility.
  • Temporarily disable plugins and switch to a default theme.
  • Review server logs for detailed error messages.
  • If the issue persists, contact your web host for assistance.

Q.6: How do 500 error codes impact Google indexing?

A 500 error code, known as an internal server error, indicates that the visited URL cannot be loaded, preventing access to the specific page. If Google encounters this issue while crawling your website, it may lead to indexing challenges, impacting your site’s visibility on the search engine.

Q.7: How does a WordPress 500 error affect SEO?

A WordPress 500 error can harm SEO by slowing down indexing, causing more people to leave your site (higher bounce rates), and even leading to deindexing if the issue persists.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Sarim Javaid

Sarim Javaid is a Digital Content Producer at Cloudways. He has a habit of penning down his random thoughts and giving words and meaning to the clutter of ideas colliding inside his mind. His obsession with Google and his curious mind add to his research-based writing. Other than that, he's a music and art admirer and an overly-excited person.

×

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!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now