HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/cdn.wb-webdesign.com/public_html/wp-content/db.php
<?php
/**
 * Plugin Name: SQLite integration (Drop-in)
 * Version: 1.0.0
 * Author: WordPress Performance Team
 * Author URI: https://make.wordpress.org/performance/
 *
 * @package wp-sqlite-integration
 */

define( 'SQLITE_DB_DROPIN_VERSION', '1.8.0' );

// Dapatkan path absolut ke folder plugin berdasarkan lokasi file ini
$sqlite_plugin_implementation_folder_path = realpath( dirname( __FILE__ ) . '/plugins/sqlite-database-integration' );

// Jika tidak ditemukan, coba fallback ke wp-content/plugins
if ( ! $sqlite_plugin_implementation_folder_path || ! file_exists( $sqlite_plugin_implementation_folder_path . '/wp-includes/sqlite/db.php' ) ) {
	$sqlite_plugin_implementation_folder_path = realpath( dirname( __FILE__ ) . '/../plugins/sqlite-database-integration' );
}

// Jika tetap gagal, hentikan eksekusi
if ( ! $sqlite_plugin_implementation_folder_path || ! file_exists( $sqlite_plugin_implementation_folder_path . '/wp-includes/sqlite/db.php' ) ) {
	error_log( '[SQLite] Plugin implementation not found.' );
	return;
}

// Define constants
if ( ! defined( 'DATABASE_TYPE' ) ) {
	define( 'DATABASE_TYPE', 'sqlite' );
}
if ( ! defined( 'DB_ENGINE' ) ) {
	define( 'DB_ENGINE', 'sqlite' );
}

// Load SQLite DB handler
require_once $sqlite_plugin_implementation_folder_path . '/wp-includes/sqlite/db.php';

// Optional: Auto-activate plugin jika belum aktif
add_action( 'admin_footer', function () use ( $sqlite_plugin_implementation_folder_path ) {
	if ( defined( 'SQLITE_MAIN_FILE' ) ) {
		return;
	}
	if ( ! function_exists( 'activate_plugin' ) ) {
		require_once ABSPATH . 'wp-admin/includes/plugin.php';
	}

	$plugin_loader_path = $sqlite_plugin_implementation_folder_path . '/load.php';
	$plugin_relative_path = str_replace( realpath( WP_CONTENT_DIR . '/plugins' ) . DIRECTORY_SEPARATOR, '', $plugin_loader_path );

	if ( is_plugin_inactive( $plugin_relative_path ) ) {
		activate_plugin( $plugin_relative_path, '', false, true );
	}
} );