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.
What is actually happening?
Section titled “What is actually happening?”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”.
- Request reaches ApacheRules from .htaccess are read
- .htaccess faulty?Yes: immediate 500
- PHP runsPlugin, theme, code
- Error, memory full or time ran out?Script aborts
- 500 or white page
Page does not load – what now?
Section titled “Page does not load – what now?”Step 1: Read the error log
Section titled “Step 1: Read the error log”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
logsfolder 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 |
Step 2: Error after a change?
Section titled “Step 2: Error after a change?”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.
Step 3: Test .htaccess
Section titled “Step 3: Test .htaccess”A faulty .htaccess leads to a 500 on the whole site.
- Connect via SFTP or open the file manager in the web panel.
- Rename
.htaccessin the website’s main directory to.htaccess-old. The file is hidden; switch on the display of hidden files. - Open the website. If it works now, the
.htaccesswas the problem. - 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.
Step 4: Test plugins and theme
Section titled “Step 4: Test plugins and theme”With WordPress, plugins cause most errors.
- Via SFTP, rename the folder
wp-content/pluginstoplugins-off. All plugins are now deactivated. - Open the website. If it works, it was a plugin.
- Rename the folder back, then rename individual plugin folders one after another until you have found the culprit.
- 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.
Step 5: Memory and time limit
Section titled “Step 5: Memory and time limit”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.
Step 6: Check the PHP version
Section titled “Step 6: Check the PHP version”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.
Step 7: File permissions and database
Section titled “Step 7: File permissions and database”- Files should usually have
644, folders755(File permissions). Permissions such as777are wrong and on some servers can themselves cause a 500. - Is the database reachable? Wrong credentials in
wp-config.phplead to “Error establishing a database connection”.
When support should help
Section titled “When support should help”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.
Frequently asked questions
Section titled “Frequently asked questions”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.
Is this a problem with the server?
Section titled “Is this a problem with the server?”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.