define( 'WP_CACHE', true ); /** * The base configurations of the WordPress. * * This file has the following configurations: MySQL settings, Table Prefix, * Secret Keys, WordPress Language, and ABSPATH. You can find more information * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing * wp-config.php} Codex page. You can get the MySQL settings from your web host. * * This file is used by the wp-config.php creation script during the * installation. You don't have to use the web site, you can just copy this file * to "wp-config.php" and fill in the values. * * @package WordPress */ // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'kitc_cuisine'); /** MySQL database username */ define('DB_USER', 'kitc_cuisine'); /** MySQL database password */ define('DB_PASSWORD', 'Najib@1982'); /** MySQL hostname */ define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); /**#@+ * Authentication Unique Keys and Salts. * Change these to different unique phrases! * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} */ require('wp-salt.php'); /** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores please! */ /** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores please! */ $table_prefix = 'wp_'; /** * WordPress Localized Language, defaults to English. * * Change this to localize WordPress. A corresponding MO file for the chosen * language must be installed to wp-content/languages. For example, install * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German * language support. */ define('FS_METHOD','direct'); define('WPLANG', ''); define('FS_CHMOD_DIR', (0775 & ~ umask())); define('FS_CHMOD_FILE', (0664 & ~ umask())); /** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. */ define('WP_DEBUG', false); define( 'WP_REDIS_CONFIG', [ 'token' => "e279430effe043b8c17d3f3c751c4c0846bc70c97f0eaaea766b4079001c", 'host' => '127.0.0.1', 'port' => 6379, 'database' => "5793", 'timeout' => 2.5, 'read_timeout' => 2.5, 'split_alloptions' => true, 'async_flush' => true, 'client' => 'phpredis', 'compression' => 'zstd', 'serializer' => 'igbinary', 'prefetch' => true, 'debug' => false, 'save_commands' => false, 'prefix' => DB_NAME, ] ); define( 'WP_REDIS_DISABLED', true ); define('DISABLE_WP_CRON', true); /* That's all, stop editing! Happy blogging. */ /** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php'); define('DOMAIN_CURRENT_SITE', 'www.kitchenart.ma'); // Block wp-login brute force - allow Morocco only if (strpos($_SERVER['REQUEST_URI'], 'wp-login.php') !== false) { $client_ip = $_SERVER['HTTP_CF_CONNECTING_IP'] ?? $_SERVER['REMOTE_ADDR']; $morocco_prefixes = ['105.', '196.', '41.', '197.', '102.', '41.92.', '41.140.', '41.248.', '41.249.', '41.250.', '41.251.']; $allowed = false; foreach ($morocco_prefixes as $prefix) { if (strpos($client_ip, $prefix) === 0) { $allowed = true; break; } } if (!$allowed) { http_response_code(403); die('Forbidden - Moroccan IPs only'); } } // Block wp-admin & wp-login - Morocco only + server IPv6 $restricted = strpos($_SERVER['REQUEST_URI'], 'wp-admin') !== false || strpos($_SERVER['REQUEST_URI'], 'wp-login') !== false; if ($restricted) { $ip = $_SERVER['HTTP_CF_CONNECTING_IP'] ?? $_SERVER['REMOTE_ADDR']; // IPv4 marocaines $ma = ['105.','196.','41.','197.','102.']; // IPv6 marocaines + IP serveur $ma6 = ['2a05:f480:2800:1b36','2a02:','::1','127.']; $ok = false; foreach ($ma as $p) { if (strpos($ip, $p) === 0) { $ok = true; break; } } foreach ($ma6 as $p) { if (strpos($ip, $p) === 0) { $ok = true; break; } } if (!$ok) { http_response_code(403); die('Forbidden'); } }