What is a 500 error?

It’s every business owner’s nightmare, and yet the 500 error is a common one on the web. It is a server error that occurs when the server cannot process a valid request. When a 500 error occurs, an error message is usually displayed on the user’s screen, indicating that there is an internal problem on the server.

astronaut 500 error stop planet

This error can be frustrating for users, because they cannot access the content they want. Fortunately, there are solutions to fix the 500 error and prevent it from happening again in the future.

In this article, we will show you how to identify and resolve the 500 error by exploring the common causes, the methods to identify the cause and the effective solutions to fix it.

We will also cover ways to avoid 500 errors in the future by keeping software up to date and using monitoring tools.

500 error: the common causes

The common causes of the 500 error can vary, but some of the most frequent include:

  • Server configuration problems: the settings of the web server, such as PHP or database settings, can cause 500 errors if they are misconfigured.
  • Script problems: syntax errors or coding problems in scripts can also cause 500 errors.
  • Database problems: database errors, such as corrupted tables or query errors, can also cause 500 errors.
  • Permission problems: the files and folders on the server may have incorrect permissions, which can prevent the server from reading or writing them, and cause 500 errors.

Robot internet server error 500 chrome google

For a WordPress site, here are a few concrete examples of common causes of the 500 error:

  • A poorly coded or outdated WordPress plugin can cause 500 errors. Temporarily deactivating the plugin and contacting the developer for an update can solve the problem. Hence the importance of being diligent about your website maintenance.
  • A A PHP memory limit problem can cause 500 errors. Increasing the memory allocated to PHP in the configuration file can solve the problem.
  • A syntax error in the .htaccess file can cause 500 errors. Check the syntax of this file and correct any errors.

How to check the error logs to identify the cause of 500 errors

Error logs are a valuable tool for identifying the causes of the 500 error. They can help you understand exactly what happened on the server when the error occurred. To check the error logs, you will need to access your server through an FTP client or your host’s control panel.

On WordPress, prefer the logs provided by your host. For a diagnosis on a staging site, back up wp-config.php, then add the following settings before the end-of-configuration comment and before wp-settings.php is loaded. Edit the constants that are already present instead of declaring them twice. Errors are written to a log, without being displayed on the pages:

define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );

View wp-content/debug.log over SFTP and have your host protect its HTTP access: this file can contain sensitive information. Once the diagnosis is finished, set WP_DEBUG and WP_DEBUG_LOG back to false, then remove the log from the server after keeping it in a private location if necessary. Do not leave this mode on permanently on a public site. WordPress documentation on debugging.

If this step makes you nervous, you can install logging plugins (e.g.: WP Debug Log) to record errors and display them in the WordPress admin interface.

For PrestaShopusers, you can enable debug mode in the configuration settings to display PHP errors on the page. You can also access the error log files via FTP to see more detailed errors. To do so, you need to edit the file defines.inc.php located in the /config/ folder. You need to set this line to “on”: “define(‘_PS_MODE_DEV_’, true);“

Warning: the error logs may contain sensitive information, so it is important to protect them using appropriate security methods, such as restricting access to the log files.

If your site displays another error message, I have also written guides to fix the 400 Bad Request error, the 403 Forbidden error and the Maximum execution time exceeded error.

And if you would rather stop dealing with these breakdowns yourself, that is exactly the role of my WordPress maintenance.

How do you fix a 500-type server error?

Concretely, how do you fix the 500 error? There are several common solutions. Some of the most common include:

  • Resetting the web server settings: If the 500 error is caused by misconfigured server settings, resetting those settings can solve the problem. This may include changing the PHP or database settings, depending on the cause of the error.
  • Checking file permissions: If the 500 error is caused by incorrect file permissions, check and correct the permissions of the files and folders on the server.
  • Updating software: If the 500 error is caused by outdated software, make sure all the software on the server is up to date to solve the problem.
  • Deactivating plugins or modules: If the 500 error is caused by a poorly coded plugin or module, temporarily deactivating that plugin or module could solve the problem.

hammer smashing computer help 500 error blue background

For WordPress and Prestashop users, here are concrete examples of common solutions to fix the 500 error:

  • Temporarily deactivate plugins or modules to identify whether one of them is the cause of the error.
  • Check the PHP settings in your CMS configuration file to make sure they are correct.
  • Check the permissions of files and folders to make sure they are correct.
  • Update all installed plugins and themes.

How to avoid 500 errors in the future?

There are several ways to avoid 500 errors in the future, here are my recommendations:

  • Regular software updates: Make sure all the software on the server, including the operating system, the web server, scripts, plugins and themes, is always up to date. Updates can fix bugs and vulnerabilities that can cause 500 errors.
  • Using monitoring tools: Use monitoring tools to detect potential problems before they cause 500 errors. These tools can monitor server performance, script errors and database errors, among other things.
  • Regular backups: Make regular backups of your website and your database. This will let you quickly restore your website in the event of a 500 error or any other problem.
  • Error tracking: Record and analyse the errors that occur on your website to identify common causes and fix them quickly.

Conclusion and additional resources for getting help with a 500 error

The 500 error is a common problem that can have many causes. It is important to understand the error in order to fix it and avoid it in the future.

There are many additional resources that can help you solve 500 errors. These include online communities, developer forums and specialist blogs, which can provide detailed information on the common causes of the 500 error and the methods to fix it.

Don’t give up on your website’s 500 error! Contact me and together we will find a quick and effective solution to get your website available again.

FAQ

If you visit your website and a blank page or an error page appears, your site may be experiencing a 500 error. As a web specialist, I can help you monitor and detect errors quickly in order to minimise downtime and guarantee a smooth user experience.

If you cannot resolve the 500 error yourself, as an experienced web developer I am at your disposal to quickly and effectively solve any technical problem related to your website. Contact me for professional assistance.

Excessive use of plugins can lead to 500 errors on your website. To avoid this, it is recommended to use only the plugins you need and to keep them up to date. Remove inactive or unused plugins from your website to reduce the risk of errors.

If your website has been hacked and you encounter a 500 error, it is important to take immediate action to secure your website and remove malware. Start by removing inactive plugins and themes, change the passwords of all accounts and update your website to the latest version.

If you encounter a 500 error after updating your website, it is likely due to an incompatibility between the new version and your website’s plugins or themes. You can solve this problem by temporarily deactivating the plugins and themes and testing your website to determine the source of the error. You can also roll back to the previous version of your website if possible.

To avoid the 500 error in the future, make sure you always use reliable plugins and themes, regularly check your error log and follow web development best practices.

Stuck on this step?

Contact me and I'll help you out. I've been supporting website owners for more than 10 years now:

About the Author: Jennifer
How to fix the 500 error?
I'm Jennifer, founder of Webooste and a freelance WordPress developer based in Marseille, France, since 2019. I hold a French state-certified diploma in web and mobile web development and have over 10 years' experience in digital. I look after the maintenance and security of WordPress websites and WooCommerce shops, 100% online, with clients worldwide. I hunt down bugs, chase away malware and take the technical worries off your mind! See my maintenance plans · Get in touch Find me on LinkedIn, Instagram, TikTok, YouTube or WhatsApp.