How to make Magento site display an error message instead of a blank page?

If you happen to experience seeing a blank page when you access your Magento site, you may add a code that will show a PHP error instead. In this way you can trace what is causing the issue and troubleshoot it further. This can be done through SSH, File Manager or FTP. Please be guided by the instructions below on how to make Magento site display an error message instead of a blank page.

Make Magento site display an error message through SSH (only applicable for VPS hosting and above)

Step 1. Access SSH (Windows PC) (MAC OSx).

Step 2. Locate your Magento directory.

magento-directory-ssh

Step 3. In the Magento folder, edit the index.php file using the following command:

vi index.php

vi-index-magento-ssh

View the content of the index file and check if it has the following comment:

#ini_set(‘display_errors’, 1);

You need to edit the file and remove the hashtag  (#). Proceed to step 5.

display-error-ssh

In case it does not have the comment, proceed to Step 4.

Step 4. Insert the following code on the first line:

@ini_set(‘display_errors’, 1);

index-ssh-magento

Step 5. Save the changes.

(press esc) :x!

Through File Manager in the cPanel

Step 1. Log in to your cPanel.

cPanel-Login-SS

Step 2. Click File Manager under Files panel.

file1

Step 3.  Locate your Magento directory.

magento-folder-cpanel

Step 4. Select index.php and edit the file.index-file-manager-magent

Step 5. Click Edit.

code-editor-cpanel

Step 6. You will be prompted with a pop up window. Click Edit.

edit-code-index-file-magento

Step 7. View the content of the index file and check if it has the following comment:

#ini_set(‘display_errors’, 1);

You need to edit the file and remove the hashtag (#). In case it does not have the comment, insert the following code on the first line:

@ini_set(‘display_errors’, 1);

 

insert-code-magento

Step 8. Click Save Changes button.

save-wp-config

For FTP, this is the same as the steps from the File Manager except that you need to access the file from the FTP Client and not the cPanel.

 

Do not hesitate to contact our support team if you have further questions.

make Magento site display an error message

(Visited 8 times, 1 visits today)