What's Actually Happening
WordPress displays a blank white screen instead of the website. No error messages are shown, the page is completely blank, and the site is inaccessible.
The Error You'll See
White screen:
Browser shows completely blank white page
No error messages visible
Page source is empty or incompleteWhy This Happens
- 1.PHP fatal error - Code causing PHP crash
- 2.Memory limit - WordPress exceeded PHP memory
- 3.Plugin conflict - Plugin causing error
- 4.Theme issue - Theme has error
- 5.Corrupted files - WordPress core files corrupted
- 6.Database error - Database connection issue
- 7.PHP version mismatch - Incompatible PHP version
Step 1: Enable Debug Mode
```bash # Edit wp-config.php: vim /var/www/html/wp-config.php
# Add or change: define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
# Check debug log: tail -f /var/www/html/wp-content/debug.log
# Location may vary: tail -f /var/www/wp-content/debug.log ```
Step 2: Check PHP Error Logs
```bash # Common log locations: tail -f /var/log/php/error.log tail -f /var/log/php-fpm/error.log tail -f /var/log/apache2/error.log tail -f /var/log/nginx/error.log
# Look for: # - Fatal error # - Allowed memory size exhausted # - Call to undefined function # - Cannot redeclare class
# Check PHP-FPM logs: journalctl -u php-fpm -f ```
Step 3: Increase PHP Memory
```bash # Edit wp-config.php: define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '512M' );
# Or in php.ini: memory_limit = 256M
# Check current limit: php -i | grep memory_limit
# Restart PHP-FPM: systemctl restart php-fpm
# Or Apache: systemctl restart apache2 ```
Step 4: Disable Plugins
```bash # Via FTP/File Manager: # Rename plugins folder: cd /var/www/html/wp-content/ mv plugins plugins-disabled
# Or disable specific plugin: mv plugins/plugin-name plugins/plugin-name-disabled
# Via database: mysql -u user -p wordpress
UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';
# Via WP-CLI: wp plugin deactivate --all ```
Step 5: Switch to Default Theme
```bash # Via FTP/File Manager: # Rename theme folder: cd /var/www/html/wp-content/themes/ mv mytheme mytheme-disabled
# WordPress will use default theme
# Via database: UPDATE wp_options SET option_value = 'twentytwentyone' WHERE option_name = 'template'; UPDATE wp_options SET option_value = 'twentytwentyone' WHERE option_name = 'stylesheet';
# Via WP-CLI: wp theme activate twentytwentyone ```
Step 6: Check PHP Version
```bash php -v
# Check WordPress PHP requirements: # WordPress 6.0+ requires PHP 7.4+ # Some plugins/themes need specific PHP version
# Switch PHP version: update-alternatives --config php
# Or in Apache: a2dismod php7.4 a2enmod php8.1 systemctl restart apache2 ```
Step 7: Check File Permissions
```bash # Correct WordPress permissions: chown -R www-data:www-data /var/www/html/ find /var/www/html/ -type d -exec chmod 755 {} \; find /var/www/html/ -type f -exec chmod 644 {} \;
# wp-content should be writable: chmod -R 775 /var/www/html/wp-content/
# Check ownership: ls -la /var/www/html/ ```
Step 8: Check Database Connection
```bash # Test database connection: mysql -u wpuser -p -h localhost wordpress
# Check wp-config.php database settings: cat /var/www/html/wp-config.php | grep DB
define( 'DB_NAME', 'wordpress' ); define( 'DB_USER', 'wpuser' ); define( 'DB_PASSWORD', 'password' ); define( 'DB_HOST', 'localhost' );
# Repair database: mysqlcheck -u root -p --auto-repair wordpress
# Or add to wp-config.php: define( 'WP_ALLOW_REPAIR', true ); # Then visit: /wp-admin/maint/repair.php ```
Step 9: Reinstall WordPress Core
```bash # Via WP-CLI: wp core download --force
# Or manual: cd /var/www/html/ rm -rf wp-admin wp-includes # Download fresh WordPress # Copy wp-admin and wp-includes from download
# Verify checksums: wp core verify-checksums ```
Step 10: Check .htaccess
```bash cat /var/www/html/.htaccess
# Reset to default: # Backup first: cp .htaccess .htaccess.backup
# Default WordPress .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
# Disable plugins in .htaccess temporarily: mv .htaccess .htaccess.disabled ```
WordPress White Screen Checklist
| Check | Command | Expected |
|---|---|---|
| Debug enabled | wp-config.php | WP_DEBUG true |
| Error logs | tail error.log | Identify error |
| Memory limit | wp-config.php | Sufficient |
| Plugins | disable all | Site loads |
| Theme | switch default | Site loads |
| Permissions | ls -la | Correct owner |
Verify the Fix
```bash curl -I http://your-site.com/
tail -f /var/www/html/wp-content/debug.log
wp plugin list
wp theme list
php -v
mysql -u wpuser -p -e "SELECT 1" ```
Related Issues
- [Fix WordPress Database Connection Error](/articles/fix-wordpress-database-connection-error)
- [Fix WordPress Plugin Conflict](/articles/fix-wordpress-plugin-conflict)
- [Fix PHP Memory Exhausted](/articles/fix-php-memory-exhausted)