File size: 2,713 Bytes
bf47729
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
efc9636
bf47729
efc9636
 
 
 
 
 
bf47729
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/**
 * WordPress configuration for Hugging Face Spaces deployment
 * Uses SQLite database instead of MySQL
 */

// ** SQLite Database settings ** //
define('DB_NAME', 'wordpress');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

// Force SQLite usage
define('DB_FILE', 'wp-content/database/wordpress.db');
define('USE_MYSQL', false);

/**#@+
 * Authentication unique keys and salts for security
 */
define('AUTH_KEY',         'hf-spaces-auth-key-' . md5(__FILE__));
define('SECURE_AUTH_KEY',  'hf-spaces-secure-auth-key-' . md5(__FILE__));
define('LOGGED_IN_KEY',    'hf-spaces-logged-in-key-' . md5(__FILE__));
define('NONCE_KEY',        'hf-spaces-nonce-key-' . md5(__FILE__));
define('AUTH_SALT',        'hf-spaces-auth-salt-' . md5(__FILE__));
define('SECURE_AUTH_SALT', 'hf-spaces-secure-auth-salt-' . md5(__FILE__));
define('LOGGED_IN_SALT',   'hf-spaces-logged-in-salt-' . md5(__FILE__));
define('NONCE_SALT',       'hf-spaces-nonce-salt-' . md5(__FILE__));
/**#@-*/

/**
 * WordPress database table prefix
 */
$table_prefix = 'wp_';

/**
 * WordPress debugging mode - enabled for troubleshooting
 */
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
define('SCRIPT_DEBUG', true);
ini_set('display_errors', 1);
ini_set('log_errors', 1);

/**
 * WordPress URLs and paths for HF Spaces
 */
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);

// Handle HTTPS detection behind proxy
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
    $_SERVER['HTTPS'] = 'on';
}

// Force HTTPS for admin and login
define('FORCE_SSL_ADMIN', true);

/**
 * Increase memory limit for better performance
 */
define('WP_MEMORY_LIMIT', '256M');

/**
 * Disable file editing from admin panel for security
 */
define('DISALLOW_FILE_EDIT', true);

/**
 * Auto-update settings
 */
define('WP_AUTO_UPDATE_CORE', true);
define('AUTOMATIC_UPDATER_DISABLED', false);

/**
 * Multisite settings (disabled for simplicity)
 */
define('WP_ALLOW_MULTISITE', false);

/**
 * Custom settings for demo environment
 */
define('WP_POST_REVISIONS', 3);
define('AUTOSAVE_INTERVAL', 300);
define('EMPTY_TRASH_DAYS', 7);

/**
 * File permissions
 */
define('FS_CHMOD_DIR', (0755 & ~ umask()));
define('FS_CHMOD_FILE', (0644 & ~ umask()));

/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if (!defined('ABSPATH')) {
    define('ABSPATH', __DIR__ . '/');
}

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';