WordPress Debug Information"; // Check PHP version echo "

PHP Version

"; echo "

" . phpversion() . "

"; // Check SQLite extension echo "

SQLite Support

"; if (extension_loaded('pdo_sqlite')) { echo "

✓ PDO SQLite extension is loaded

"; } else { echo "

✗ PDO SQLite extension is NOT loaded

"; } // Check file permissions echo "

File Permissions

"; $paths = [ '/var/www/html', '/var/www/html/wp-content', '/var/www/html/wp-content/database', '/var/www/html/wp-content/db.php' ]; foreach ($paths as $path) { if (file_exists($path)) { $perms = substr(sprintf('%o', fileperms($path)), -4); echo "

$path: $perms

"; } else { echo "

$path: NOT FOUND

"; } } // Check database file echo "

Database Status

"; $db_file = '/var/www/html/wp-content/database/wordpress.db'; if (file_exists($db_file)) { echo "

✓ Database file exists

"; echo "

Size: " . filesize($db_file) . " bytes

"; } else { echo "

✗ Database file does not exist

"; } // Test SQLite connection echo "

SQLite Connection Test

"; try { $pdo = new PDO('sqlite:' . $db_file); echo "

✓ SQLite connection successful

"; } catch (Exception $e) { echo "

✗ SQLite connection failed: " . $e->getMessage() . "

"; } // Check WordPress files echo "

WordPress Files

"; $wp_files = [ '/var/www/html/wp-config.php', '/var/www/html/wp-settings.php', '/var/www/html/wp-load.php' ]; foreach ($wp_files as $file) { if (file_exists($file)) { echo "

✓ $file exists

"; } else { echo "

✗ $file NOT FOUND

"; } } echo "

Environment Variables

"; echo "

HTTP_HOST: " . ($_SERVER['HTTP_HOST'] ?? 'not set') . "

"; echo "

SERVER_NAME: " . ($_SERVER['SERVER_NAME'] ?? 'not set') . "

"; echo "

REQUEST_URI: " . ($_SERVER['REQUEST_URI'] ?? 'not set') . "

"; echo "

Try WordPress again

"; ?>