How to Troubleshoot a 500 Internal Server Error

How to Troubleshoot a 500 Internal Server Error

Overview

A 500 Internal Server Error means that something went wrong while the server was trying to process your website request.

Unlike a 404 error, which generally means something could not be found, a 500 error usually indicates a problem with the website's configuration, code, application, or server environment.

A 500 error can affect:

  • An entire website

  • A single page

  • WordPress

  • A specific application

  • A PHP script

  • A recently changed configuration

The good news is that a 500 error usually provides a useful starting point for troubleshooting.


What Does a 500 Error Mean?

When you visit a website, the server has to process the request before returning the page.

A simplified example looks like this:

Visitor requests a page
        ↓
Server processes the request
        ↓
Website/application encounters a problem
        ↓
Server cannot complete the request
        ↓
500 Internal Server Error

The error does not necessarily mean that Have Freedom Hosting's servers are down.

In many cases, the problem is specific to the website or account.


1. Refresh the Page

Start with the simplest step.

Refresh the page and try again.

If the error was temporary, the page may load normally.

Also try opening the page in a private/incognito browser window.

If the problem continues, move on to the next steps.


2. Determine What Is Affected

Find out whether the problem affects:

  • One page

  • Several pages

  • The homepage

  • The entire website

  • WordPress

  • A specific application

  • A subdomain

  • An additional domain

For example, if:

https://example.com/

works but:

https://example.com/some-page

returns a 500 error, the problem may be specific to that page or its underlying application.

If everything returns a 500 error, investigate the website configuration and server environment more broadly.


3. Think About What Changed

A 500 error frequently appears immediately after a change.

Consider whether you recently:

  • Installed a plugin

  • Updated WordPress

  • Updated a theme

  • Changed PHP versions

  • Modified .htaccess

  • Edited PHP code

  • Changed permissions

  • Installed an application

  • Imported or migrated a website

  • Changed DNS or domain configuration

  • Modified a website configuration file

If the error appeared immediately after a change, that change is an important clue.


4. Check WordPress

If the affected website uses WordPress, start by determining whether WordPress itself is responsible.

Common causes include:

  • Plugin conflicts

  • Theme problems

  • PHP compatibility issues

  • Corrupted WordPress files

  • Incorrect .htaccess rules

  • Incorrect file permissions

  • Memory limitations

  • Database problems

  • Failed updates

If you can still access the WordPress Dashboard, check whether the problem affects only the public website or the Dashboard as well.


5. Temporarily Check Plugins

A faulty or incompatible WordPress plugin can cause a 500 error.

If you can access WordPress normally, review recently installed or updated plugins.

If you cannot access the Dashboard, plugins can sometimes be disabled through:

cPanel → Files → File Manager

Navigate to the WordPress installation and locate:

wp-content/plugins/

A plugin can be temporarily disabled by renaming its directory.

For example:

example-plugin

could temporarily become:

example-plugin.disabled

Then test the website again.

If the website begins working, the plugin is likely involved.

Restore the original directory name once you've identified what needs to be addressed.


6. Check Your WordPress Theme

A theme can also cause server-side errors, particularly after an update or customization.

If the problem began immediately after changing or updating a theme, consider switching to a known-compatible WordPress theme.

If you cannot access WordPress, theme files can be reviewed through:

cPanel → Files → File Manager

The active theme is generally located under:

wp-content/themes/

Do not delete your theme simply because it is suspected of causing the problem.


7. Check Your PHP Version

Your website's PHP version needs to be compatible with your website and its applications.

You can review PHP versions through:

cPanel → Software → MultiPHP Manager

If the problem appeared after changing PHP versions, consider whether the website or one of its applications is compatible with the new version.

You can also review PHP-related configuration through the available PHP management tools in cPanel.

Do not continually change PHP versions at random.

Instead, identify what changed and test one configuration at a time.


8. Check PHP Extensions and Settings

Some applications require specific PHP extensions or settings.

If a website was recently moved, upgraded, or reconfigured, a required PHP extension may be missing or a setting may no longer be compatible.

Depending on your hosting configuration, PHP settings can be managed through cPanel's PHP configuration tools.

If you're unsure which settings your application requires, check the application's documentation or contact Have Freedom Hosting Support.


9. Check .htaccess

A damaged or incorrectly configured .htaccess file is a common cause of 500 errors on Apache-based websites.

You can access it through:

cPanel → Files → File Manager

For a typical primary website, it may be located at:

public_html/.htaccess

An .htaccess file can contain:

  • Redirect rules

  • Rewrite rules

  • Access restrictions

  • PHP configuration

  • Application-specific settings

A single invalid directive can prevent the server from processing the website correctly.

If the problem started immediately after modifying .htaccess, review or temporarily revert that change.

Do not make unrelated changes while troubleshooting.


10. Check File and Folder Permissions

Incorrect permissions can prevent the web server or PHP from accessing files.

You can review permissions through:

cPanel → Files → File Manager

Do not blindly change permissions on every file and folder.

Incorrect permissions can create additional security problems or break other parts of the website.

If you are unsure what permissions your application requires, contact Have Freedom Hosting Support.


11. Check Website Logs

Logs can provide considerably more information than the generic 500 error page.

Depending on your hosting configuration, relevant information may be available through cPanel's logging tools or your application's own logs.

Look for errors that occurred around the same time the 500 error appeared.

Useful information may include:

  • PHP errors

  • Fatal errors

  • Memory errors

  • Permission errors

  • Rewrite errors

  • Application exceptions

  • Missing files

  • Configuration errors

If you're contacting support, providing the exact error from a log can significantly speed up troubleshooting.


12. Check Disk Usage

A hosting account that has reached its available storage limits can experience unexpected problems.

Check your available storage through the tools provided in cPanel.

Look for unusually large:

  • Backup files

  • Log files

  • Email mailboxes

  • Temporary files

  • Website files

  • Database-related files

Do not delete files simply because they are large.

Identify what is consuming the space first.


13. Check Database Problems

Some websites rely heavily on a database.

If the website can no longer communicate with its database correctly, it may produce a server error.

For WordPress and similar applications, check:

  • Database configuration

  • Database credentials

  • Database availability

  • Recent database changes

  • Application configuration files

For WordPress, the database connection information is commonly stored in:

wp-config.php

Do not change database credentials unless you know the correct values.


14. Check for Failed Updates

A partially completed update can leave an application in an inconsistent state.

This can happen with:

  • WordPress

  • Plugins

  • Themes

  • PHP applications

  • Frameworks

  • Custom software

If the problem began immediately after an update, determine whether the update completed successfully.

A backup made before the update may provide a recovery option.


15. Check Recently Uploaded or Modified Code

If you maintain custom PHP code, review anything that was recently changed.

Common causes include:

  • Syntax errors

  • Missing files

  • Incorrect function calls

  • Incompatible PHP code

  • Missing dependencies

  • Incorrect configuration

If the website worked before a specific code change, temporarily reverting that change can help determine whether it caused the problem.


16. Check After a Website Migration

If the 500 error appeared after moving a website, verify:

  • Website files were transferred correctly.

  • The database was imported correctly.

  • Database credentials are correct.

  • PHP is compatible.

  • Required PHP extensions are available.

  • File permissions are appropriate.

  • .htaccess was transferred correctly.

  • The domain uses the correct document root.

  • Application configuration was updated for the new environment.

Migration-related 500 errors are often caused by differences between the old and new environments.


17. Check SSL and Redirect Configuration

SSL problems normally produce different errors, but incorrect redirect rules can sometimes contribute to server errors.

Check:

cPanel → Domains

and, where applicable:

cPanel → Domains → Redirects

Also review .htaccess if your website uses custom HTTP-to-HTTPS rules.

Avoid creating multiple competing redirect rules.


Common WordPress Situations

"My Website Broke After a Plugin Update"

A plugin may no longer be compatible with your WordPress installation, theme, or PHP version.

Try disabling the recently updated plugin and test again.

If the website returns to normal, investigate that plugin before re-enabling it.


"My Website Broke After Changing PHP Versions"

The website or one of its components may not support the selected PHP version.

Review the application's compatibility requirements and consider returning to the previously working PHP version while you investigate.


"The Homepage Works but One Page Gives a 500 Error"

The problem may be specific to the page or the code used to generate it.

Check:

  • Page-specific plugins

  • Custom code

  • Shortcodes

  • Theme functionality

  • Embedded content

  • Database queries


"The Entire WordPress Website Gives a 500 Error"

Start with the most recent changes.

Then check:

  1. PHP version

  2. Plugins

  3. Theme

  4. .htaccess

  5. File permissions

  6. Disk usage

  7. Logs

  8. Database configuration

Avoid reinstalling WordPress immediately.


What Not to Do

When troubleshooting a 500 error, avoid making several unrelated changes at once.

Do not:

  • Delete .htaccess without a backup or understanding its purpose.

  • Randomly change PHP versions repeatedly.

  • Delete WordPress files.

  • Delete plugins or themes without keeping a copy.

  • Change database credentials without knowing the correct values.

  • Reset permissions across the entire website without a reason.

  • Restore an old backup immediately without preserving the current state.

  • Assume the hosting server is down simply because your website returns a 500 error.

Make one change at a time and test after each change.


When to Contact Have Freedom Hosting

Contact Have Freedom Hosting Support if:

  • You cannot determine what caused the error.

  • The website remains broken after reversing a recent change.

  • You suspect a server-side configuration problem.

  • Required PHP extensions or settings are unavailable.

  • You need help interpreting server logs.

  • The problem appeared after a hosting migration.

  • Your entire account appears to be affected.

  • You believe a hosting-side change caused the problem.

When opening a support ticket, provide:

  • Your domain.

  • The exact URL returning the error.

  • Whether the homepage works.

  • Whether WordPress or another application is being used.

  • When the problem started.

  • What changed immediately beforehand.

  • Any relevant error message.

  • Any relevant log entries.

  • Screenshots if helpful.

Never provide passwords, API keys, authentication codes, or other sensitive credentials in a support ticket.


Quick 500 Error Checklist

  • Refresh the page and try again.

  • Determine whether one page or the entire website is affected.

  • Identify what changed before the problem started.

  • Check WordPress plugins and themes.

  • Check the PHP version.

  • Check PHP extensions and settings.

  • Check .htaccess.

  • Check file and folder permissions.

  • Check website logs.

  • Check available disk space.

  • Check database configuration.

  • Check for failed updates.

  • Consider recent code changes.

  • Check migration-related configuration if applicable.

  • Preserve a backup before making major changes.

  • Contact Have Freedom Hosting Support if you cannot identify the cause.


Need Help?

A 500 Internal Server Error can have several possible causes, but the timing of the problem and any recent changes are often the best clues.

Work through the checklist above, make one change at a time, and preserve a backup before making significant changes.

If you still cannot identify the cause, Have Freedom Hosting Support can help you determine whether the problem is related to your website, application, or hosting environment.

 

  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

Why Is My Website Down?

Why Is My Website Down? Overview Few things are more concerning than visiting your website and...

Why Is My Website Slow?

Why Is My Website Slow? Overview A slow website can be frustrating for both you and your...

How to Troubleshoot a 4040 Not Found Error

How to Troubleshoot a 404 Not Found Error Overview A 404 Not Found error means the server could...

How to Troubleshoot SSL and HTTPS Problems

How to Troubleshoot SSL and HTTPS Problems Overview SSL allows your website to use HTTPS, which...

What to Do if Your Website Is Hacked

What to Do if Your Website Is Hacked Overview Discovering that your website may have been...

Powered by WHMCompleteSolution