Fixing the “500 Internal Server Error” error

This translation was automatically created by our partner SYSTRAN. In some cases, imprecise wording may have been used, for example when labeling buttons or technical details. If you have the slightest doubt, please consult the English or French version of the instructions. Would you like to help improve this translation? Then please use the «Participate» button on this page.

Last updated on 05/05/2021

aim

The 500 Internal Server Error type of error can affect your entire website or just parts of it. It can be persistent, intermittent, or result in a blank page.

These errors can also be caused by updates that automatically are performed by components of your website and therefore occur without any modification on your part.

This guide explains how to diagnose the most common “Error 500”.

OVHcloud provides you with services that you are solely responsible for configuring and managing. It is therefore up to you to ensure that these work properly.

In case of difficulties, please contact a specialized service provider and/or post your questions on the OVHcloud Community at https://community.ovh.com/en/ (English). Unfortunately, we cannot offer you any further technical support for administrative tasks.

requirements

In practical application

Before proceeding, check your site on different devices and browsers. If in some cases the error does not appear (e.g. in another browser), it is not related to your OVHcloud services. Restart your local devices and contact an IT professional if necessary.

Put simply, a website consists of Source code (e.g. .php files connected to a database) and additional data. We strongly advise you to back up your data before taking any further action:

  • Follow this guide to get a copy of all files on your website.
  • Additionally, if your website uses a database, you can consult this guide to getting a copy.

To fix an “Error 500” you can restore your website from a backup. However, it is preferable to conduct an in-depth diagnosis to determine the exact origin of the error.

Check your hosting logs

First, read this guide to identify the cause of the 500 error in your hosting’s logs.

Put your site in developer mode

Then, to view possible PHP errors, set your hosting to developer mode using these instructions (development).

Test the .htaccess file

An “Error 500” may indicate an anomaly in a .htaccess file. This file is usually located at the first level of the root directory in the FTP space of your hosting.

To check this, connect to your hosting via FTP.

Then rename this file to .htaccess.old to and refresh your website in the browser.

If you need help in performing the necessary operations, you can contact one of our partners.

Check folder and file permissions

Each file and folder of your source code has a specific level of read, write and execute permissions within your web hosting’s file system. This is to protect them from malicious or improper manipulation.

An “Error 500” may be related to an incorrect level of access rights to folders or files on your site.

To access these files, connect to your hosting via FTP.

The “Using FileZilla” guide will then help you to check the following items:

  • The rootdirectory of your hosting (this is the as / or . displayed directory in your FTP program) must have the permissions 705 be set (default permissions). We recommend that you do not change these permissions.
  • directories must 705 to have.
  • The files must 604 to have.

Access error details in your scripts

For security reasons, your website obscures all technical details about an error 500.

If you or your developer would like to have access to this information, you can connect to your website via SSH (only available with a Business or Developer plan).

Revert your site to a previous state

If the “Error 500” occurred after changing the PHP configuration of your web hosting, return to the previous setting by following our guide.

Performing database or FTP restore operations replaces all data contained in your FTP storage space or database with a backup version. As a result, you cannot recover changes or files that after saved to the timestamp of the backup used.

Restoring the source code of your website affects all websites on your OVHcloud web hosting.

To restore your website’s source code, see our guide “Restoring Your Web Hosting Disk Space”. Note that this surgery alone is not a permanent solution.

If your website uses a database, see our “Importing a backup to a web hosting database” guide to restore it to a previous state.

Additional information

Contact OVHcloud partners

To exchange with our user community go to https://community.ovh.com/en/

Did the instructions help you?

Yes No

Before you give your opinion, we welcome your suggestions on how we can improve these documents.

Why is it? The pictures, the content or the structure of the instructions? Write to us and we will make it better together.

Your support requests will not be accepted in this form. Please use the “Create a ticket” form for this.

Submit

Many Thanks. Your feedback has been sent.

You might also be interested in these instructions…

Error 500 Website-Zustand Previous post Error 500 on WordPress dashboard – WordPress websites
Next post 500 Internal Server Error – HTTP