I cannot view my website - white page!
Website is displaying a white screen | site is not working | how to fix
Enabling PHP display_errors.
Firstly, you should make sure that you can connect to your site's server. It is possible that you cannot connect due to your IP being blocked by the server. To find out if your IP is blocked or not follow the instructions on this page.
If your IP isn't blocked then it's possible that there is a technical problem with your site.
In order to check if your app has a problem you can enable PHP display _errors by following these steps:
- Connect to your hosting package's cPanel by typing in your site's address (URL) followed by the word /cpanel (e.g https://www.example.com/cpanel). On the newly opened page you will be prompted to fill in your Username and Password. You can find this information on your login email for IP.GR.
If you cannot find your login credentials, follow the password recovery procedure.
- After you've successfully logged into your cPanel, look for the SOFTWARE tab and click on Select PHP Version.
- On the new page shown, click on Switch to PHP Options.
Locate the display_errors option in the parameters list and change the value from Off to On and click on the Apply button. Lastly, click on the Save button located at the end of the list.
After you've enabled display_errors by following the above procedure, you can now open your site using a browser of your choice (chrome, firefox etc.). There should be an error message detailing the nature of your problem.
If there is such a message, read it carefully and try to solve the error by making the necessary changes to your application. If you do not know how to solve the displayed problem it might be a good idea to seek the help of a professional web developer / programmer.
I still can't view my website - what is wrong;
If you have enabled the display_errors option inside of cPanel but your application is still not showing / displaying a white screen, then it is possible that your website's code is changing the display_errors value back to OFF thus covering up the cPanel configuration.
To overcome this issue you need to locate your application's configuration file and look for an option that disables PHP errors.
Most web applications have a file named config.php, configuration.php or some other file with a name similar to the ones above. Locate said file and check for the value of the display_errors option.
You can also define the display_errors value manually on runtime (runtime scope) by pasting the following code on your application's configuration file:
Enabling PHP log_errors.
If you are still getting a white page even after following the steps above without any changes, there is another solution that might show you the type of error you are facing.
Enable the log_errors option which you can find in the PHP parameter list (Image #3). This will create an error_log file which will record all of your site's errors every time it loads. After you've enabled the log_errors option, refresh your site and look for the error_log file inside your cPanel's File Manager.
You can find the error_log file inside your public_html folder or, inside the folder that you refreshed your page on.
e.g If you refreshed the following page http://www.example.com/administrator then the error_log file should be inside the public_html/administrator directory.
In the following section you will find some common PHP errors:
- Parse Error (Syntax Error): Syntax error in your page's code.
Solution: Locate the line that the error indicates and check the syntax.
- Fatal Error: Error during the code's execution.
Solution: Fatal errors are the most common php errors. Usually they appear when we are trying to do something that isn't allowed by the php programming language (e.g trying to call a function that doesn't exist). We find the file indicated by the error message and try to find what is wrong. It is possible that your application has encountered a fatal error due to a recent upgrade to own of its components / plugins or due to a new component being added. Therefore, if you app has recently stopped working, it is advisable that you check whether or not an update has occurred recently. We also would recommend that you backup your site's files before attempting to correct / change any of them.
- Warning Error: PHP warning error.
Solution: We usually see warning errors when php is trying to include a file that doesn't exist. We recommend that you check the file in question and see that it functions properly.
- Notice Errors: PHP notices.
Solution: Usually seen when we are trying to call a variable that has not been previously set. Depending on the site, this can mean that a file is missing or has been modified recently.