This is a default wp-config.php containing all options from https://codex.wordpress.org/Editing_wp-config.php with comments explaining each option. Simply uncomment and configure what you need, comment or remove options you don’t need or leave them, it’s up to you.
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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | <?php /** * The base configuration for WordPress * * The wp-config.php creation script uses this file during the * installation. You don't have to use the web site, you can * copy this file to "wp-config.php" and fill in the values. * * This file contains the following configurations: * * * MySQL settings * * Secret keys * * Database table prefix * * ABSPATH * * @link https://codex.wordpress.org/Editing_wp-config.php * * @package WordPress */ // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'database_name_here'); /** MySQL database username */ define('DB_USER', 'username_here'); /** MySQL database password */ define('DB_PASSWORD', 'password_here'); /** 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} * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. * * @since 2.6.0 */ define('AUTH_KEY', 'put your unique phrase here'); define('SECURE_AUTH_KEY', 'put your unique phrase here'); define('LOGGED_IN_KEY', 'put your unique phrase here'); define('NONCE_KEY', 'put your unique phrase here'); define('AUTH_SALT', 'put your unique phrase here'); define('SECURE_AUTH_SALT', 'put your unique phrase here'); define('LOGGED_IN_SALT', 'put your unique phrase here'); define('NONCE_SALT', 'put your unique phrase here'); /**#@-*/ /** * 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_'; /** * 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. * * For information on other constants that can be used for debugging, * visit the Codex. * * @link https://codex.wordpress.org/Debugging_in_WordPress */ ### WordPress Error Logging ### # @ini_set(‘log_errors’,’On’); # @ini_set(‘display_errors’,’Off’); # @ini_set(‘error_log’,’php_error.log’); # Define(‘WP_DEBUG’, true); define('WP_DEBUG', false); ### Define WP Multisite ### # define( 'WP_ALLOW_MULTISITE', true ); ### WP URLs ### define('RELOCATE', true); define('WP_SITEURL', 'http://example.com/'); define('WP_HOME', 'http://example.com/'); ### Define WP Memory Limits ### define('WP_MEMORY_LIMIT', '256M'); define('WP_MAX_MEMORY_LIMIT', '256M'); ### WP SSL/TLS Admin ### define('FORCE_SSL_LOGIN', true); define('FORCE_SSL_ADMIN', true); ### Define Cookie settings for unusual setups ### # define( 'COOKIE_DOMAIN', 'www.example.com' ); # define( 'COOKIEPATH', preg_replace( '|https?://[^/]+|i', '', get_option( 'home' ) . '/' ) ); # define( 'SITECOOKIEPATH', preg_replace( '|https?://[^/]+|i', '', get_option( 'siteurl' ) . '/' ) ); # define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); # define( 'PLUGINS_COOKIE_PATH', preg_replace( '|https?://[^/]+|i', '', WP_PLUGIN_URL ) ); ### Disable external host requests or allow only specific hosts ### # define( 'WP_HTTP_BLOCK_EXTERNAL', true ); # define( 'WP_ACCESSIBLE_HOSTS', 'api.wordpress.org,*.github.com,*.google.com' ); ### Change default paths ### # define( 'TEMPLATEPATH', get_template_directory() ); # define( 'STYLESHEETPATH', get_stylesheet_directory() ); # define( 'UPLOADS', 'wp-content/media' ); # define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/blog/wp-content' ); # define( 'WP_CONTENT_URL', 'http://example/blog/wp-content' ); # define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/blog/wp-content/plugins' ); # define( 'WP_PLUGIN_URL', 'http://example/blog/wp-content/plugins' ); # define( 'PLUGINDIR', dirname(__FILE__) . '/blog/wp-content/plugins' ); ### Disable Post Revisions completely ### # define( 'WP_POST_REVISIONS', false ); ### Disable Trash ### # define( 'EMPTY_TRASH_DAYS', 0 ); // Zero days ### Automatically delete Trash after predefined amount of days ### # define( 'EMPTY_TRASH_DAYS', 30 ); // Every 30 days ### Disable Plugin and Theme editors in /wp-admin ### # define( 'DISALLOW_FILE_EDIT', true ); ### Disable Plugin and Theme update / intallation ### # define( 'DISALLOW_FILE_MODS', true ); ### Disable all automatic updates ### # define( 'AUTOMATIC_UPDATER_DISABLED', true ); ### Disable all core updates: ### # define( 'WP_AUTO_UPDATE_CORE', false ); ### Enable all core updates, including minor and major ### # define( 'WP_AUTO_UPDATE_CORE', true ); ### Enable core updates for minor releases (default) ### # define( 'WP_AUTO_UPDATE_CORE', 'minor' ); ### Override default file and directory permissions ### # define( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) ); # define( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) ); ### Define explicit direct filesystem writes ### # define( 'FS_METHOD', 'direct' ); ### Disable WP_Cron entirely ### # define( 'DISABLE_WP_CRON', true ); ### Ensure WP_Cron will not run more than every x second(s) ### # define( 'WP_CRON_LOCK_TIMEOUT', 90 ); ### Enable database repair / optimization, enable and visit /wp-admin/maint/repair.php ### # define( 'WP_ALLOW_REPAIR', true ); ### Use advanced-cache.php script when executing wp-settings.php ### # define( 'WP_CACHE', true ); ### Define custom user and user_metadata tables ### # define( 'CUSTOM_USER_TABLE', $table_prefix.'my_users' ); # define( 'CUSTOM_USER_META_TABLE', $table_prefix.'my_usermeta' ); ### Define custom Language ### # define( 'WPLANG', 'en_EN' ); # define( 'WP_LANG_DIR', dirname(__FILE__) . '/wordpress/languages' ); /* 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'); |
Last Modified: 18 Apr, 2023 at 16:33:16