Download wp-config-hf.php from CatPtain/wordpress: direct link, hf CLI and curl.
- Browser
- Download file 2.71 kB
-
https://huggingface.co/spaces/CatPtain/wordpress/resolve/main/wp-config-hf.php
- Command line
-
hf download hf://spaces/CatPtain/wordpress/wp-config-hf.php
-
curl -L -o wp-config-hf.php https://huggingface.co/spaces/CatPtain/wordpress/resolve/main/wp-config-hf.php
2.71 kB
| /** | |
| * 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'; |