Skip to content

Instantly share code, notes, and snippets.

@milesleif
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save milesleif/152cdad8ba437c7b6b58 to your computer and use it in GitHub Desktop.

Select an option

Save milesleif/152cdad8ba437c7b6b58 to your computer and use it in GitHub Desktop.
wordpress config.php local, staging, live
<?php
/**
* The LOCAL configuration.
*
* This file has the following configurations: MySQL settings.
*
* @package WordPress
*/
// ** MySQL Einstellungen - diese Angaben bekommst du von deinem Webhoster. ** //
/** Ersetze database_name_here mit dem Namen der Datenbank, die du verwenden möchtest. */
define('DB_NAME', '');
/** Ersetze username_here mit deinem MySQL-Datenbank-Benutzernamen */
define('DB_USER', '');
/** Ersetze password_here mit deinem MySQL-Passwort */
define('DB_PASSWORD', '');
/** Ersetze localhost mit der MySQL-Serveradresse */
define('DB_HOST', '');
/** Der Datenbankzeichensatz der beim Erstellen der Datenbanktabellen verwendet werden soll */
define('DB_CHARSET', '');
/** Der collate type sollte nicht geändert werden */
define('DB_COLLATE', '');
/**
* 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.
*/
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
<?php
/**
* In dieser Datei werden die Grundeinstellungen für WordPress vorgenommen.
*
* Zu diesen Einstellungen gehören: MySQL-Zugangsdaten, Tabellenpräfix,
* Secret-Keys, Sprache und ABSPATH. Mehr Informationen zur wp-config.php gibt es
* auf der {@link https://codex.wordpress.org/Editing_wp-config.php wp-config.php editieren}
* Seite im Codex. Die Informationen für die MySQL-Datenbank bekommst du von deinem Webhoster.
*
* Diese Datei wird von der wp-config.php-Erzeugungsroutine verwendet. Sie wird ausgeführt,
* wenn noch keine wp-config.php (aber eine wp-config-sample.php) vorhanden ist,
* und die Installationsroutine (/wp-admin/install.php) aufgerufen wird.
* Man kann aber auch diese Datei nach "wp-config.php" kopieren, alle fehlenden Werte
* ergänzen und die Installation anschließend starten.
*
* @package WordPress
*/
// if there's a local configuration file (local files, local database)
if ( file_exists( dirname( __FILE__ ) . '/wp-config.local.php' ) ) {
include( dirname( __FILE__ ) . '/wp-config.local.php' );
define( 'WP_LOCAL_DEV', true );
// if there's a staging configuration file (staging files, staging database)
} else if ( file_exists( dirname(__FILE__) . '/wp-config.staging.php' ) ) {
include( dirname( __FILE__ ) . '/wp-config.staging.php' );
define( 'WP_LOCAL_DEV', false );
} else {
// mySQL-Connection for production
define('DB_NAME', '');
define('DB_USER', '');
define('DB_PASSWORD', '');
define('DB_HOST', 'localhost' );
define('WP_DEBUG', false);
$table_prefix = 'wp_';
define( 'DB_CHARSET', 'utf8' );
}
/**#@+
* Sicherheitsschlüssel
*
* Ändere jeden KEY in eine beliebige, möglichst einzigartige Phrase.
* Auf der Seite {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* kannst du dir alle KEYS generieren lassen.
* Bitte trage für jeden KEY eine eigene Phrase ein. Du kannst die Schlüssel jederzeit wieder ändern,
* alle angemeldeten Benutzer müssen sich danach erneut anmelden.
*
* @since 2.6.0
*/
// ...
/**#@-*/
/* 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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment