06Web hosting & WordPress
Fixing WordPress problems – white screen, 500, database error
Solve WordPress errors on Nexthosting Webspace: critical error, white screen, database connection, error 500, redirect loops and login loop.
In short
Most WordPress errors come from a plugin, a theme or a wrong setting – almost never from the server. First look at the PHP error log (web panel → website → Advanced → Developer tools), switch off all plugins if you suspect one (rename the plugins folder), and as a last resort restore yesterday’s backup. The table below leads you from symptom to solution.
Error messages and menu names in a German WordPress appear in German here, with the English meaning in parentheses.
First aid in five steps
Section titled “First aid in five steps”- What changed?Update, new plugin, PHP version, domain?
- Read the error logphp-error.log in the web panel
- Switch off pluginsRename the folder
- Error gone?
- Find the culprit or restore a backup
- What did you change last? In nine out of ten cases that is exactly it: an update, a new plugin, a different PHP version, a changed address.
- Check the status page. If everything is running there, the cause is on your site.
- Read the error log. The last line usually names the file and therefore the plugin or theme.
- Switch off plugins. See Disabling all plugins without logging in.
- Nothing helps? Restore the last working state from the backups or contact Support – with the time, address and error message (Describing errors well).
Symptom → cause → solution
Section titled “Symptom → cause → solution”| Symptom | Common cause | Solution |
|---|---|---|
| “Es gab einen kritischen Fehler auf dieser Website.” (There has been a critical error on this website.) | PHP error in a plugin or theme | Open the email from WordPress with the recovery mode link, or disable plugins |
| Completely white page | PHP error, memory exhausted | Read the error log, check the memory limit |
| “Fehler beim Aufbau einer Datenbankverbindung” (Error establishing a database connection) | wrong data in wp-config.php, database deleted or renamed |
Check the database access |
| Error 500 (Internal Server Error) | broken .htaccess, PHP error, wrong file permissions |
Error 500 |
| Error 403 (access denied) | file permissions, .htaccess block, security filter |
Error 403 |
| Home page works, subpages return 404 | .htaccess missing or permalinks not saved |
Einstellungen (Settings) → Permalinks → Änderungen speichern (Save changes) |
| “Die Seite leitet zu oft weiter” (The page redirected you too many times; ERR_TOO_MANY_REDIRECTS) | http/https or www set inconsistently |
Too many redirects |
| Login keeps reloading the login page | wrong address, cookies, cache plugin | Login loop |
| Padlock missing in the browser, “not secure” | images or scripts using http:// (mixed content) |
SSL and mixed content |
| “Die hochgeladene Datei überschreitet die upload_max_filesize-Direktive” (The uploaded file exceeds the upload_max_filesize directive) | PHP upload limit | Raise the upload limit |
| “Kurzzeitig nicht verfügbar wegen Wartungsarbeiten” (Briefly unavailable for scheduled maintenance) never goes away | interrupted update | Delete the .maintenance file in public_html |
| Site after a move shows the old domain or redirects | address in the database | Change the address |
| WordPress does not send emails | sender address does not belong to the domain | SMTP plugin with a mailbox of your domain, check the SPF record, see Email mailboxes |
| Site very slow | large images, many plugins, no cache | Cache and images |
| Foreign content, redirects to spam sites | site hacked | The site was hacked |
Making errors visible
Section titled “Making errors visible”PHP error log in the web panel
Section titled “PHP error log in the web panel”- In the web panel, open the website and choose Advanced → Developer tools.
- Scroll to the PHP card and find
php-error.log. - Read the last lines. The path reveals the culprit, for example
wp-content/plugins/some-plugin/…orwp-content/themes/my-theme/….
Turning on WP_DEBUG
Section titled “Turning on WP_DEBUG”You can activate debugging with a switch in WP Toolkit or in wp-config.php (above “That’s all, stop editing!”):
define( 'WP_DEBUG', true );define( 'WP_DEBUG_LOG', true ); // writes to wp-content/debug.logdefine( 'WP_DEBUG_DISPLAY', false ); // do not show errors to visitorsThen reload the page and open wp-content/debug.log in the file manager.
“There has been a critical error on this website”
Section titled ““There has been a critical error on this website””In this case WordPress sends an email to the admin address with the subject “Deine Website hat ein technisches Problem” (Your site is experiencing a technical issue). It names the plugin or theme causing the problem and contains a link to recovery mode. Through it you can log in even though the site is broken and deactivate the culprit.
If no email arrives, switch off the plugins from outside (next section).
Disabling all plugins without logging in
Section titled “Disabling all plugins without logging in”If you can no longer get into the admin area, you deactivate plugins by renaming their folder. WordPress then no longer finds them.
- In the web panel, open the website and then Files.
- Go to
public_html/wp-content/. - Rename the
pluginsfolder toplugins_off. - Reload the site. If it works again, a plugin was to blame.
- Rename the folder back to
plugins. The plugins are now deactivated. - Reactivate them one by one in WordPress under Plugins and reload the site after each. The plugin after which the error returns is the culprit.
If one specific plugin is suspect, rename only its folder (e.g. wp-content/plugins/some-plugin → some-plugin_off).
cd ~/public_htmlwp plugin deactivate --all --skip-plugins --skip-themeswp plugin activate some-plugin # turn back on one by onewp theme activate twentytwentyfive --skip-plugins --skip-themesWith --skip-plugins --skip-themes, WP-CLI runs even when a plugin crashes WordPress.
Theme suspect? Rename your theme’s folder under wp-content/themes/. WordPress then falls back to an installed default theme (e.g. “Twenty Twenty-Five”). That is why you should never delete all default themes.
Error establishing a database connection
Section titled “Error establishing a database connection”WordPress cannot reach its database. Check in this order:
- Open
public_html/wp-config.phpin the file manager and noteDB_NAME,DB_USER,DB_PASSWORDandDB_HOST. - In the web panel under Databases, check that the database and user exist exactly like that (upper/lower case, prefixes) and that the user has permissions on the database.
- If you are not sure of the password, set a new one for the database user in the web panel and enter it in
wp-config.php. - Check
DB_HOST: it must match the value the web panel shows for the database (usuallylocalhost). - If it then says “Eine oder mehrere Datenbanktabellen sind nicht verfügbar” (One or more database tables are unavailable), repair the tables with
wp db repair(SSH) or in phpMyAdmin.
After a move, step 2 or 3 is almost always the cause: on the new server, the database and user have different names.
Error 500
Section titled “Error 500”An error 500 means the server could not carry out the request. With WordPress, the causes are usually:
| Cause | How to check | Solution |
|---|---|---|
Faulty .htaccess |
Rename .htaccess to .htaccess_old, reload the site |
Create the file again with the default rules |
| PHP error in plugin/theme | Error log | Disable plugins |
| Plugin does not suit the PHP version | Error since a PHP change | Set the PHP version back, update the plugin (PHP settings) |
| Wrong file permissions | Folders not 755, files not 644 | File and folder permissions |
General background on white pages and 500 errors: Error 500 and white screen.
Memory limit
Section titled “Memory limit”Messages like “Allowed memory size of 134217728 bytes exhausted” mean a script wanted more memory than PHP allows.
- Raise
memory_limitin the web panel’s php.ini editor, for example to256M(PHP settings). - You can also tell WordPress how much it may use:
define( 'WP_MEMORY_LIMIT', '256M' );define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // admin area onlyThe memory of your plan is the upper limit for all processes together. If a single page permanently needs a lot, a plugin is usually inefficient – or a bigger plan makes sense.
Raising the upload limit
Section titled “Raising the upload limit”If images, videos or theme ZIPs cannot be uploaded:
- Open the website in the web panel → Advanced → Developer tools → php.ini editor.
- Set
upload_max_filesizeto the value you want, for example128M. - Set
post_max_sizeto the same or a slightly higher value. - Reload the media library. WordPress shows the new maximum size under Medien (Media) → Datei hinzufügen (Add file).
Very large files (videos, backups) are better uploaded via SFTP.
Too many redirects
Section titled “Too many redirects”The browser reports “This page isn’t working – redirected you too many times”. Two places are sending the visitor in circles.
- Check the addresses: under Einstellungen → Allgemein (General), the WordPress address and site address must be identical and start with
https://– with or withoutwww, but the same everywhere. - Double HTTPS redirect: a plugin (e.g. for SSL) and a rule in
.htaccessredirect against each other. Remove one of them. - Cloudflare or another proxy in front: if the SSL setting there is “Flexible”, a loop occurs. Set it to “Full (strict)”.
- Browser cache: redirects are stored. Test in a private window.
Login loop
Section titled “Login loop”You enter the correct details but land on the login page again.
- Delete cookies for the site or use a private window.
- Check that you are logging in at the same address that is entered in WordPress (
wwwor not,https). - Temporarily switch off the cache plugin (rename the folder).
- Switch off plugins that change the login (security, two-factor, login renaming).
Correcting the WordPress address without logging in
Section titled “Correcting the WordPress address without logging in”If you entered the address incorrectly or have the old domain in the database after a move, fix it in wp-config.php:
define( 'WP_HOME', 'https://your-domain.com' );define( 'WP_SITEURL', 'https://your-domain.com' );Afterwards you can get back into the admin area. To also replace the old address in content, use WP-CLI (back up the database first):
wp search-replace 'https://old-domain.com' 'https://your-domain.com' --all-tables --dry-runwp search-replace 'https://old-domain.com' 'https://your-domain.com' --all-tables--dry-run first shows what would be replaced. Never replace addresses with a plain find and replace in an SQL file – WordPress stores some values with a length indicator, which breaks in the process.
The site was hacked
Section titled “The site was hacked”Signs: unknown admin users, redirects to other sites, spam content, warnings from Google or the browser, files with strange names in uploads.
- Stay calm and save the state: download the current state (for later analysis).
- Change all logins: change the passwords of all WordPress admins, the web panel, the FTP/SSH logins and the database user (enter the new database password in
wp-config.php). - Restore a clean state: restore a backup from before the attack. Backups go back 30 days.
- Close the hole: install all updates immediately. Remove or replace the plugin or theme through which the attack came.
- Delete unknown users and renew the keys in
wp-config.php(new values from the key generator) – this ends all logged-in sessions. - Inform Support if the site has sent spam or you are unsure.
If no clean backup exists any more, install WordPress core, plugins and themes fresh and take over only wp-content/uploads (search it for PHP files – none belong there) and the database.
Frequently asked questions
Section titled “Frequently asked questions”Can Support repair my WordPress site?
Section titled “Can Support repair my WordPress site?”Support helps with everything that concerns the server: web panel, PHP, database server, backups, SSL. It cannot fix errors in plugins, themes or your own code. For repairs and rebuilds of your site there is the paid help of our sister brand NextWebSolution.
Nothing works since I changed the PHP version.
Section titled “Nothing works since I changed the PHP version.”Set the previous PHP version again (takes seconds), then update plugins and theme and try the switch again – ideally on the staging copy first.
Do I get an error 403 when I save something?
Section titled “Do I get an error 403 when I save something?”A security filter protects the websites from attacks. In rare cases it mistakes a harmless input for an attack. If that happens, contact Support with the time, the address and what you were just saving. Other causes are explained in Error 403.