Error 500 WordPress: How To Fix the Internal Server Error (13 Methods)

The dreaded 500 error is a common frustration WordPress users experience.

Whether you’re trying to access your website or WordPress.org itself, it’s hard not to roll your eyes at a “500 internal server error.”


GIPHY

If you’re annoyed, think of how your customers must feel. An error 500 in WordPress blocks people from accessing your site, meaning they can’t patronize your business, and you’re losing sales. 💸

But help is at hand, and you can often fix it on your own in a matter of minutes! If not, you can always call an expert to help get your site back online.

In the tutorial below, we explain common causes of the WordPress 500 error and how to fix it (if you’re in a rush, click here to jump straight to our top tips for troubleshooting).

What Is the WordPress 500 Internal Server Error?

The WordPress 500 Internal Server Error happens when your web server is confused.

When this happens, the server is experiencing an unexpected condition that prevents it from carrying out your request, such as accessing your website. Your server wants to give you access, but for some reason, it can’t.


GIPHY

We’re with you! It’s probably the vaguest error message you’ve ever seen. Thankfully, it’s not usually tough to fix.

Variations of the 500 error WordPress might display

Here are some variations:

  • HTTP Error 500
  • 500 Internal Server Error
  • The website cannot display the page
  • Sorry, something went wrong
  • There was an error, please try again later
  • Internal Server Error
  • 500 Server Error
  • Temporary Error (500)
  • Error 500 WordPress
  • Error 500

What Causes the WordPress HTTP Error 500 Code?

The cause of the error can be from all sorts of triggers.

You might simply need to refresh your browser or delete its cookies and empty the cache. Error 500 can arise if your browser uses a faulty, cached page version.

It’s not common for browser caches and cookies to cause error 500 outright, but as we explore further down, the error can disappear after you erase these files.

It’s also possible there are server issues you need to check with your web hosting provider.

Beyond this, some of the most common triggers for this error 500 WordPress include faulty or misconfigured themes and plugins.

WordPress error 500 also triggers when your WordPress website’s database isn’t communicating or when configuration files are corrupted.

Alternatively, your website’s PHP scripting language might be outdated or need more memory.

Finally, always ensure you have the correct file and folder permissions, and look for any underlying errors that your host or developers can help with.

Don’t worry if any of this sounds confusing – our step-by-step guide clears it up.

13 Ways To Fix the WordPress 500 Error

Before we begin, create a WordPress backup of your website with your host’s user dashboard so you can reload if problems worsen. Once you regain access to WordPress, switch on automated backups.

From here, download an FTP client (file transfer protocol), such as FileZilla. This program lets you log into WordPress and make admin changes (and your host provides the login details).

Remember, if you don’t feel confident handling the fixes below on your own or prefer a support team to help, skip to step 13 and call an expert!

WordPress internal server error 500 fix list

Common fixes 
Wait and refresh your siteTry your browser again in a few minutes in case of server overload
Clear your browser cacheTry accessing the site in private mode, if it works, erase temporary internet files
Check your web host’s server statusLog into your host dashboard and check for downtime reports
Deactivate and reactivate your pluginsRename plugins one by one through FTP, and if the error disappears, remove the rogue plugin via WordPress
Deactivate and change your themeRename your themes folder in FTP and try to log into WordPress, if you can, then change your theme
Fixes to try next 
Check for a database connection errorCheck your database details match in the wp-config.php file and your web host’s dashboard
Check and regenerate your .htaccess fileMake a copy of .htaccess in FTP, overwrite the original file, and log into WordPress to save settings in the “Permalinks” section
Update your PHPLog into your web host dashboard and ensure you’re using the latest PHP version
More technical fixes (that benefit from professional support) 
Increase your PHP memoryUse code in our guide to edit .htaccess to boost the memory your PHP is allowed to use
Check and reset file permissionsEdit file attributes in your public_html folder via FTP to allow visitors access to your site
Check for CGI and Perl errorsCheck for complex errors if you run a server, or ask your host or a developer for help
Enable WP_DEBUG and check your error logUse code in our guide to edit wp-config.php and bring up the debug error log
Contact an expert 
Reach out to your web host or a WordPress developerContact your host if you come unstuck or call or email a StateWP expert for help within 24 hours

Common fixes

The following tips frequently remove error 500 WordPress restrictions – feel free to try these first.

1. Wait and refresh your site

It’s worth stepping away for a few minutes just in case the problem is due to server overload.

If, after refreshing, your site returns with no issues, the server is likely over-exerted.

2. Clear your browser cache

It’s also possible for cached files in your browser to become corrupted. Clearing your cache can often resolve common issues such as 404 errors and faulty permalinks too.

Try accessing your site via your browser’s private mode, such as “Incognito” via Chrome. Private mode lets you browse websites without saving cache files or cookies. If your site loads, you need to clear these stored files.

So, sticking with Chrome, click the “three dots” at the top-right of your browser’s screen and hover over “More Tools.”

Google Chrome window options

Then, select “Clear Browsing Data…”

Example of setting changes

The next page lets you clear as much of your browsing history and cache as you wish. We recommend selecting “All Time” from the “Time range.”

Then, select “Cookies and other site data” at least – but to make extra certain your cache is empty, check “Browsing history” and “Cached images and files.”

A word of warning – erasing browser histories, cached files, and cookies can slow your browsing and log you out of websites you previously visited and saved to Chrome.

Google Chrome clear browsing data screen

Finally, click “Clear data.” Check your website in another tab.

3. Check your web host’s server status

WordPress-hosting servers frequently need downtime scheduled so they can have updates patched in and bugs fixed. On other occasions, there might be emergency downtime that causes users to experience WordPress server error 500 and other issues.

So, log into your host’s user dashboard or check its social media accounts for its status code and updates.

4. Deactivate and reactivate your plugins

Faulty or misconfigured plugins account for various WordPress problems, such as the annoying 503 Error.

Since WordPress error 500 has locked you out of WordPress, you must manually switch your plugins on and off to check if any are causing the problem.

Log into FTP, head to the wp-content folder, and find “plugins.”

Right-click and rename the “plugins” folder to something memorable. This switches your plugins off.

Open up your site in two different browsers. If it’s live again, you know there’s a faulty plugin to blame.

Head back to FTP and rename the plugins folder to “plugins” again. You must now rename each plugin within that folder to find which one triggers the fault.

Start by renaming the first plugin and refresh your website. If Error 500 appears, name it back to its default and work your way down.

Once your site loads properly, leave the rogue plugin deactivated and look for an alternative via the WordPress search engine.

5. Deactivate and change your theme

Like plugins, a faulty, custom-coded, or misconfigured theme can trigger internal errors and 500 messages.

So, head back to FTP and “wp-content.” Open it, and find the subfolder “themes.”

Rename the “themes” folder and check if you can log into WordPress. This will set you to the default WordPress theme.

If you can log in now, that means your old theme was at fault. Head to “Appearance” and “Themes” and select a new theme from the library option.

Go back to FTP and rename your themes file back to “themes” to ensure everything works again as expected.

Fixes to try next

The next steps are a little trickier and might need more time and attention.

6. Check for a database connection error

If your website and your WordPress database can’t communicate with each other, you’re at risk of developing errors.

WordPress should warn you that there’s a database connection error:

However, you might occasionally see Error 500 appear when the exact cause is unclear.

One of the most common ways to fix a database connection error is to check if your details are correct. These details can get confused if you move web hosts, for example.

Log into FTP and look for “public_html,” your root directory. Then, look for “wp-config.php,” right-click it, and save a copy.

Right-click the FTP version of the file and click “edit,” before looking for these lines:

​​// ** MySQL settings – You can get this info from your web host ** // /** The name of the database for WordPress */define( ‘DB_NAME’, ‘database_name_here’ ); /** MySQL database username */define( ‘DB_USER’, ‘username_here’ ); /** MySQL database password */define( ‘DB_PASSWORD’, ‘password_here’ ); /** MySQL hostname */define( ‘DB_HOST’, ‘localhost’ );

 

Now, head to your web host’s dashboard or access your WordPress database using a program called cPanel. Let’s use Bluehost for this example.

Log into your host dashboard, open cPanel, and scroll to “Databases” and “MySQL Databases.”

Scroll down to find a list of databases and, further down, a users list.

Ensure your database name in cPanel matches the “DB_NAME” in wp_config.

Then, follow the instructions in cPanel to change the password for your website’s default user in the list. Then, add the new details into wp_config. Save the file, and try your site again.

If Error 500 remains, keep reading, but then check out our advanced guide to database connection errors if you’re out of options.

7. Check and regenerate your .htaccess file

The file labeled “.htaccess” is an instructions file that WordPress sites use to help guide permissions.

When corrupted, servers get confused by the file and develop problems such as the 403 Error and the 500.So, let’s restore .htaccess from scratch.

Return to FTP and your root folder, and look for .htaccess.

Right-click it and download it to back up. Back in FTP, right-click the file again and delete it.

Head to your WordPress dashboard (also known as WordPress admin or wp-admin). Log in and look for “Settings” and “Permalinks” in the sidebar.

Scroll to the bottom of the Permalinks page and click “Save Changes.” This reinstalls .htaccess as a new file.

8. Update your PHP

Your PHP is the language used to run scripts on your WordPress website, and you need to update it for optimal performance.

You usually check your PHP version via WordPress, but as you’re locked out, log into your host’s dashboard.

Let’s say you’re using WPEngine. Log into your user portal, open “sites,” and then “environment name” (i.e., your website).

Find “Updates,” then “PHP,” and “PHP version number.” Select a new version and then “Confirm.”

We recommend you check with your host directly if you can update your PHP without affecting your website.

If you use a different host and want to run through more PHP settings, read our guide to updating your PHP after you’ve finished this article.

More technical fixes (that benefit from professional support)

Our tips are increasingly in-depth at this stage – don’t be afraid to ask for professional guidance.

9. Increase your PHP memory

WordPress’s base PHP memory limit is 32MB. If you have large or memory-hungry files on your website, they could trigger the 500 error.

Before editing .htaccess, make sure your web host permits you to increase your memory.

Then, in FTP or in the File Manager app in cPanel, find .htaccess. Right-click it and save a copy.

Then, open the file, scroll down, and look for the following line:

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

 

Let’s change “32M” to “256M,” a larger memory ceiling of 256MB. Save changes and check your site.

10. Check and reset file permissions

File and folder permission errors account for other common problems, such as WordPress logins not working properly.

In FTP, look for your root folder – it’s usually “public.html.” Right-click it and select “File Attributes.”

In the new window, you need to enter a specific numeric value to ensure permissions are correct.

Enter either “750” or “755” in the numeric values box, and check any boxes marked “Recurse into subdirectories” and “Apply to directories only.”

Click “OK.”

Now, open “File Attributes” back up, enter either “640” or “644” into the values box, and check “Recurse into subdirectories.” Mark any bullets or boxes for “Apply to files only” before clicking “OK.”

In the root folder, look for wp-config.php, right-click, and select “File permissions.”

Enter “440” as the numeric value in the box, and then click “OK.” Reload your website.

11. Check for CGI and Perl errors

CGI and Perl errors refer to when scripts that originated from older versions of WordPress develop faults deep in the code. CGI, in particular, is often only used for very specific coding needs.

Checking and fixing CGI and Perl errors is highly complex and only recommended if you have experience managing your own servers.

Therefore, we recommend contacting your web host or developer for advice.

12. Enable WP_DEBUG and check your error log

Before you contact an expert, we recommend activating WP_DEBUG, WordPress’s debugging mode, and taking note of the errors recorded.

In FTP, look for wp-config.php. If you already have a file backup, open it to edit.

In the code text editor, look for the following:

define( ‘WP_DEBUG’, false ); define( ‘WP_DEBUG_DISPLAY’, false ); define( ‘WP_DEBUG_LOG’, false ); define( ‘SCRIPTP_DEBUG’, false );

 

Change every “false” to “true.” If you can’t see this code, look for the line:

/* Add any custom values between this line and the “stop editing” line. */

 

Then, paste in:

define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_DISPLAY’, true ); define( ‘WP_DEBUG_LOG’, true ); define( ‘SCRIPTP_DEBUG’, true );

 

Save the file. You should now find “debug.log” in your root folder.

Open it to check for errors listed and make a note for any developers you contact.

Contact an expert

Whether you’d prefer to ask for help with error codes or have exhausted all the options above, here’s what to do.

13. Reach out to your web host or a WordPress developer

In many cases, web hosts can resolve WordPress issues or give you insight into what might be causing Error 500.

For issues regarding your PHP version and MySQL database, try logging into your host user panel and contacting your provider directly.

Some hosts, such as Siteground, allow you to raise tickets or chat with experts directly:

That said, unless you can chat live with a host advisor, resolving a 500 error might take some time, and a lasting issue could affect your SEO rankings as well as cost you sales. That’s why many WordPress users reach out to developers for speedy support, such as through StateWP.

We aim to address and resolve most WordPress issues within a day. That’s saving you considerable time and money left hanging around for a web host.

As Error 500 blocks your access to WordPress, you can’t raise service requests through our site management dashboard, Proto. So, call or email us for speedy support instead.

Give Error 500 in WordPress the shove

If you ever spot Error 500 in WordPress, try not to panic.

It’s your web server’s awkward way of telling you there’s a problem… but it’s not sure what that problem actually is.

Thankfully, 500 error codes are mysteries that are easily solved.


GIPHY

From faulty plugins and themes and outdated PHP versions to incorrect permissions, server downtime, and memory limits, you can check and fix plenty of triggers. And it’s worth using staging sites through your web host to try fixes before they go live.

But, if you’d prefer help from a seasoned WordPress developer, it’s often easier to just call or email the team at StateWP to get back online as soon as possible.

As you’ve seen by now, plenty of WordPress issues are triggered by common faults. We recommend you read our guide to the most common WordPress errors to clue yourself in.

x