Choose a plan

Error 500 Internal Server Error and the blank page

Error 500, “There has been a critical error” or a blank page? Find the cause in php-error.log in Enhance and fix .htaccess, PHP or the plugin.

  • Updated
guide · common errors
Steps
10
Reading time
4min
Sections
4
Start the guide

Error 500 means the server tried to build the page and stopped halfway. In WordPress, the same problem shows up as a blank page or as the message “There has been a critical error on this website”. Almost always, the cause is written in the PHP error log, which you can read from Enhance.

What you'll achieve

  • find the line in the log that says what broke;
  • fix the most common causes: .htaccess, the PHP version, memory, a plugin;
  • know how to quickly go back to a working version from a backup.

Before you start

  • Log in to Enhance at https://server.nbt-host.com, then “Websites” » your website.
  • Think about what changed just before: an update, a new plugin, an uploaded file, a different PHP version. Most of the time, that's where the cause is.

The steps

1. Read the PHP error log

  1. On the website page, open the “Developer tools” tab (on a narrow screen, it's in the “Advanced” menu).
  2. On the “PHP” card, open php-error.log.
  3. Look at the last lines, the ones with the time you saw the error. The important ones start with “PHP Fatal error” or “PHP Parse error” and name the file and line, for example /wp-content/plugins/nume-plugin/…. The folder name tells you the culprit.

2. A plugin or a theme (WordPress)

If the log points to a folder in wp-content/plugins/ or wp-content/themes/:

  1. In the “Apps” tab, open the website's WordPress page.
  2. Under “Plugins”, click “Deactivate” next to the plugin from the log. You don't need to log in to WordPress.
  3. Reload the website. If it works, look for a new version of the plugin or replace it.

If you don't know which one it is, deactivate the most recently updated or installed ones, one at a time. To follow the error directly in WordPress, you can temporarily turn on WP_DEBUG and WP_DEBUG_LOG under “Debug” (see WordPress updates and security in Enhance); turn them off afterwards.

3. An .htaccess with rules from another server

After a move, the old .htaccess may contain “cPanel-generated” blocks or an AddHandler / SetHandler for the old host's PHP version. They don't work here and cause a 500 error on the whole website.

  1. The “Files” tab » public_html, right-click .htaccess » “Rename” » .htaccess-vechi.
  2. Reload the website. If it works, remove the blocks with AddHandler, SetHandler or php_value from the old file and put it back. In WordPress, you can recreate a clean .htaccess from Settings » Permalinks » Save Changes.

php_value and php_flag in .htaccess are not used here: you set PHP settings in the “php.ini editor” (see The PHP version and PHP settings).

4. The PHP version

An old website may not run on PHP 8.2, 8.3 or 8.4; a new website may require a newer version than the one selected. In the log you usually see “Call to undefined function” or “syntax error”.

  1. “Developer tools” » “PHP”: try another version from the list and confirm with “Update”.
  2. If you changed the version just before the error, switch back to the old one.

5. Memory or execution time

The message “Allowed memory size of … bytes exhausted” or “Maximum execution time … exceeded” means the script needed more than the setting allows. In the “php.ini editor”, raise memory_limit (for example to 512M) or max_execution_time, then click “Restart” next to the “PHP” heading (see The PHP version and PHP settings).

6. Go back to a working version

If you can't find the cause and the website has to work now, restore it from a backup taken before the problem: the “Backups” tab » “Restore” » “Full website” (see Backup and restore from Enhance). Anything you changed after the backup's time is lost. We can also do the restore for you, free of charge, from a backup from the last 7 days.

If something doesn't work

  • The log is empty. The error doesn't come from PHP: it's usually the .htaccess (step 3) or a folder's permissions. Also check that you're looking at the right website.
  • The error only appears sometimes, at peak times. The website may be hitting the plan's limit of simultaneous PHP processes. Write to us: we'll look at the load and tell you whether a cache or a bigger plan would help.
  • The error comes back after restoring. Something is re-enabling itself, for example a plugin's automatic update. Turn off its automatic updates until you find a good version.
  • You can't make sense of the log. Send us the last lines of php-error.log (without passwords) and the page address.
Support

Stuck? We'll do it together.

Tell us which step isn't working and, if you can, send a screenshot. We reply during business hours.

Phone and WhatsApp+40 775 396 021
HoursMonday–Friday, 9:00–18:00 Romanian time (EET/EEST)

Never send us your password on WhatsApp or by email. What information helps us solve it on the first try: how to ask for help.