Skip to content

08Website know-how & errors

Fix error 500 and the white screen of death

Internal Server Error or a blank white page on your Nexthosting website? Find the cause with the error log, .htaccess test, plugins and the PHP version.

In short

A 500 error (“Internal Server Error”) or a blank white page means: your script crashed. The cause is in the error log. Most often it is a faulty plugin or theme, a broken .htaccess, a memory limit that is too small or an unsuitable PHP version. Work through the steps below in order; that is faster than guessing.

When the web server (Apache) calls a PHP page and PHP crashes along the way, the visitor gets either the message “500 Internal Server Error” or a blank white page. The latter happens when PHP is not allowed to display errors (for security reasons) and the script aborts before producing output. In WordPress you may also see “critical error” or “There has been a critical error on this website”.

Where things can blow up
  1. Request reaches ApacheRules from .htaccess are read
  2. .htaccess faulty?Yes: immediate 500
  3. PHP runsPlugin, theme, code
  4. Error, memory full or time ran out?Script aborts
  5. 500 or white page
What do you see?
Message "500 Internal Server Error" on all pagesUsually .htaccess or the PHP version
White page without textRead the PHP error in the log
Only the admin menu is brokenPlugin or memory limit
The error appeared after an updateRoll back the update or restore a backup

The error log is the most important clue. It names the file and line where things blew up.

  • In the web panel you will find the website’s logs (Web panel access). The exact location can vary by version; look for “Logs” or “Error log” for the website.
  • Via SFTP, logs are often in a logs folder next to the web directory (Upload files via SFTP).
  • With WordPress you can have errors written to a file. In wp-config.php, add the following before the line “That’s all, stop editing!”:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

The messages then end up in wp-content/debug.log. Remove the lines again after testing and delete the file, because it can contain paths and data.

Typical lines and what they mean:

Entry in the log Meaning Solution
Allowed memory size of … exhausted Memory limit reached Raise the limit, check plugins (step 5)
Maximum execution time of … exceeded Script ran too long Raise the time limit, split the task into parts
Uncaught Error: Call to undefined function Missing extension or wrong PHP version Adjust the PHP version, update the plugin
Parse error: syntax error Typo in the code Undo the last change
Class not found File missing or plugin uploaded incompletely Upload the plugin again
.htaccess: Invalid command Unknown directive in .htaccess Remove the directive (step 3)
Premature end of script headers PHP terminated Check the plugin/script
Permission denied File permissions wrong File permissions
Can't connect to MySQL or Error establishing a database connection Is the database reachable? Credentials wrong? Check wp-config.php (database host at Nexthosting usually localhost) and look at the database in phpMyAdmin

Ask yourself: what did I change last? An update, a new plugin, a PHP switch, a file in the editor? In nine out of ten cases that is the cause. Undo the last change. If you have a backup, that is often the fastest way: Backups and restoring.

A faulty .htaccess leads to a 500 on the whole site.

  1. Connect via SFTP or open the file manager in the web panel.
  2. Rename .htaccess in the website’s main directory to .htaccess-old. The file is hidden; switch on the display of hidden files.
  3. Open the website. If it works now, the .htaccess was the problem.
  4. With WordPress, you generate a new default file under Einstellungen (Settings), Permalinks, Änderungen speichern (Save Changes). After that, add your own rules back one at a time and test after each.

More about permitted directives in .htaccess basics.

With WordPress, plugins cause most errors.

  1. Via SFTP, rename the folder wp-content/plugins to plugins-off. All plugins are now deactivated.
  2. Open the website. If it works, it was a plugin.
  3. Rename the folder back, then rename individual plugin folders one after another until you have found the culprit.
  4. If the error remains, rename the folder of your active theme under wp-content/themes. WordPress then falls back to a default theme.

Help specifically for WordPress: Solving WordPress problems.

If the log mentions “memory exhausted” or “execution time”, an adjustment in the web panel helps. At Nexthosting you can change PHP settings directly in the control panel without editing files (PHP settings).

Setting Purpose Usual value
memory_limit Memory per script 256M (more for large shops)
max_execution_time Runtime of a script 60 to 300 seconds
upload_max_filesize Size of an upload 64M
post_max_size Size of a request larger than upload_max_filesize

The limits of your plan still apply: you cannot set more than the plan allows. If you permanently need more, look at a larger plan.

Old plugins sometimes do not tolerate new PHP versions, and new ones need a recent one. Web hosting at Nexthosting supports PHP 8.2 to 8.5, with 8.4 as the default. Switch to the previous version as a test and reload the page. If that helps, update the plugin or have it replaced.

  • Files should usually have 644, folders 755 (File permissions). Permissions such as 777 are wrong and on some servers can themselves cause a 500.
  • Is the database reachable? Wrong credentials in wp-config.php lead to “Error establishing a database connection”.

If you find nothing in the log or the error remains after all steps, open a ticket. Send:

  • the address of the page,
  • the exact time of the error,
  • the lines from the error log,
  • what you changed last,
  • what you have already tried.

More under Describing errors well and Support.

Why do I see no error message, just a white page?

Section titled “Why do I see no error message, just a white page?”

For security reasons, PHP is not allowed to show errors in the browser. The messages are in the error log.

A 500 is almost always caused by the website itself. If there is a server problem, you will see it on the status page.

Can I fix the error myself if I do not code?

Section titled “Can I fix the error myself if I do not code?”

Usually yes: undo the last change, switch off plugins one by one, restore a backup.