Support / Royal Security / White Screen / Fatal Error

White Screen or Fatal Error

If your site shows a white screen (WSOD) or fatal error after enabling a Royal Security feature, follow these steps to recover and fix the issue.

Can't Access Your Site?

If you're completely locked out, skip to Step 1: Disable via FTP below to regain access first.

Common Causes

PHP Version Incompatibility

Some hardening features require PHP 7.4+. Older PHP versions may crash.

Fix: Upgrade to PHP 7.4 or higher in your hosting panel.

Memory Limit Too Low

Security scans and firewall rules need adequate memory. Default 64MB may not be enough.

Fix: Increase WordPress memory limit to 256MB.

Plugin Conflict

Another security plugin or caching plugin may conflict with the same hooks.

Fix: Disable other security plugins. Use only one.

.htaccess Corruption

Hardening rules written to .htaccess may conflict with existing rules.

Fix: Restore .htaccess from backup or regenerate via Permalinks.

File Permission Issues

The plugin can't write to required files (wp-config.php, .htaccess).

Fix: Ensure proper file permissions (644 for files, 755 for directories).

Step 1: Disable the Plugin via FTP

First, regain access to your site by temporarily disabling Royal Security.

Connect via FTP/SFTP

Use FileZilla, Cyberduck, or your hosting's file manager to connect to your server.

Navigate to the plugins folder

Go to /wp-content/plugins/

Rename the Royal Security folder

Rename royal-security (or royal-security-lite) to royal-security-disabled

Access your site

Your site should now load. Log into WordPress admin.

Step 2: Check the Error Log

Before re-enabling the plugin, find out what caused the crash.

Enable WordPress Debug Mode

Add these lines to your wp-config.php file (before "That's all, stop editing!"):

define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );

View the Debug Log

Check /wp-content/debug.log for error messages. Look for lines mentioning "royal-security" or "fatal error".

Check Server Error Logs

Your hosting control panel usually has an "Error Logs" section. Check there for PHP fatal errors.

Step 3: Fix the Issue

Based on the error message, apply the appropriate fix:

PHP Version Error

If you see errors about unsupported syntax or missing functions:

  1. Log into your hosting control panel
  2. Find PHP version settings (often under "Software" or "PHP Selector")
  3. Switch to PHP 7.4 or higher (8.0+ recommended)
  4. Clear any caching and test your site

Memory Limit Error

If you see "Allowed memory size exhausted":

// Add to wp-config.php define( 'WP_MEMORY_LIMIT', '256M' );

Or add to .htaccess:

php_value memory_limit 256M

.htaccess Corruption

If the error mentions .htaccess or mod_rewrite:

Backup current .htaccess

Rename .htaccess to .htaccess.backup

Create fresh .htaccess

Go to WordPress → Settings → Permalinks and click "Save Changes" to regenerate.

Test your site

If it works, the old .htaccess had conflicting rules.

Plugin Conflict

If the error mentions another plugin:

  1. Disable all other security plugins (Wordfence, Sucuri, iThemes, etc.)
  2. Disable caching plugins temporarily
  3. Re-enable Royal Security
  4. Test - if it works, the conflict was with the other plugin

Step 4: Re-enable Royal Security

Once you've fixed the underlying issue:

Rename the plugin folder back

Via FTP, rename royal-security-disabled back to royal-security

Activate the plugin

Go to Plugins in WordPress admin and activate Royal Security.

Enable features one at a time

Don't enable all features at once. Turn on one feature, test, then add the next.

Disable debug mode

Set WP_DEBUG back to false in wp-config.php.

Enable Features Gradually

If you're not sure which feature caused the crash, enable them one at a time. This helps identify problematic configurations on your specific server setup.

Still Having Issues?