How to fix a 500 internal server error on my website
Summary
This guide helps you troubleshoot and resolve: How to fix a 500 internal server error on my website. Follow the steps below to fix the issue.
Common Causes
Review your server error logs
- Log in to your hosting control panel.
- Navigate to the Metrics section and select Errors.
- Click Error Log to view the most recent server entries.
- Look for entries that match the time you encountered the 500 error. Common entries include PHP fatal errors, syntax errors, or permission denied messages.
- Note any specific file paths or error codes mentioned, as these will help identify the cause.
Check and rename your .htaccess file
A corrupted .htaccess file is one of the most common causes of a 500 Internal Server Error on Apache servers.
- In your hosting control panel, open File Manager.
- Navigate to your website's root directory (commonly
public_htmlorwww). - Locate the file named
.htaccess. If you do not see it, click Settings in the top-right corner of File Manager and enable Show Hidden Files (dotfiles), then click Save. - Right-click
.htaccessand select Rename. Change the name to.htaccess_old. - Refresh your website in a browser to see if the error is resolved.
- If the site loads correctly, the
.htaccessfile was the cause. You can regenerate it by logging into your CMS admin area and saving your permalink settings.
Do not delete your .htaccess file permanently. Always rename it first so you can restore it if needed.
Increase the PHP memory limit
If your website exceeds its allocated PHP memory, the server may return a 500 error.
php.ini or .user.ini files.- In your hosting control panel, open File Manager.
- Locate the
php.inifile in your website's root directory. If it does not exist, you may need to create one or use a.user.inifile, depending on your host's configuration. - Right-click the file and select Edit.
- Look for the
memory_limitdirective. - Change the value to a higher limit, for example
memory_limit = 256M. - Click Save Changes and refresh your website.
- If you cannot locate or edit
php.ini, check whether your control panel has a Select PHP Version or PHP Options tool where you can adjust memory limits.
Troubleshoot CMS plugins and themes
If you use a content management system such as WordPress, Joomla, or Drupal, a faulty plugin or theme can trigger a 500 error.
- Access your hosting control panel and open File Manager.
- Navigate to your CMS installation directory.
- Locate the plugins or extensions folder (for WordPress, this is
wp-content/plugins). - Rename the plugins folder to
plugins_oldto disable all plugins at once. - Refresh your website. If the error disappears, a plugin is the cause.
- Rename the folder back to
plugins, then rename individual plugin sub-folders one by one to identify the problematic plugin. - If you are using WordPress and can access the admin dashboard, go to Tools > Site Health > Info to check for critical errors, or enable debugging by editing
wp-config.php:
- Set
define( 'WP_DEBUG', true ); - Set
define( 'WP_DEBUG_LOG', true ); - Set
define( 'WP_DEBUG_DISPLAY', false );
- Check the
wp-content/debug.logfile via File Manager for specific PHP errors related to plugins or themes. - If the issue persists, repeat the folder renaming process with your themes folder (for WordPress,
wp-content/themes), keeping only a default theme active.
Verify file and folder permissions
Incorrect permissions can prevent the server from reading or executing files, resulting in a 500 error.
- In your hosting control panel, open File Manager.
- Right-click a file or folder and select Change Permissions.
- Standard recommended permissions are:
- Folders:
755 - Files:
644
- Apply the permissions and test your website.
- Avoid setting folders or files to
777, as this is a security risk and may be blocked by your server for safety reasons.
Restore from backup or escalate to your hosting provider
If the 500 Internal Server Error continues after checking logs, renaming .htaccess, adjusting PHP memory, disabling plugins, and verifying permissions, the issue may be related to server configuration, a corrupted database, or a problem with your hosting account itself. These issues are beyond the scope of customer-level troubleshooting.
If the error started immediately after a CMS, plugin, or theme update, the update may have failed or introduced a compatibility issue. Restore your site from a recent backup via your hosting control panel's Backup or Restore tool if available.
Open a ticket with your hosting provider if:
- You cannot log in to your hosting control panel.
- Your control panel also displays a 500 error.
- The error affects all sites on your hosting account.
- None of the troubleshooting steps in this guide resolve the issue.
If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.
Still Having Issues?
💻 Open a Ticket