Skip to content

Instantly share code, notes, and snippets.

@riipandi
Last active September 13, 2020 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riipandi/f5a8424fec1c620fc17e73acc6c459ed to your computer and use it in GitHub Desktop.
Save riipandi/f5a8424fec1c620fc17e73acc6c459ed to your computer and use it in GitHub Desktop.
Example configuration
about access account accounts add address adm admin administrator administration adult advertising affiliate affiliates ajax analytics android anon anonymous api app apps archive atom auth authentication avatar backup banner banners bin billing blog blogs board bot bots business chat cache cadastro calendar campaign careers cgi cp client cliente code comercial compare config connect contact contest create code compras cpanel css dashboard data db design delete demo design designer dev devel dir directory dns dnsadmin doc docs domain download downloads edit editor email ecommerce forum forums faq favorite feed feedback flog follow file files free ftp gadget gadgets games guest group groups help home homepage host hosting hostname html http httpd https hpg info information image img images imap index inside insight invite intranet indice ipad iphone irc java javascript job jobs js knowledgebase log login logs logout list lists mail mail1 mail2 mail3 mail4 mail5 mailer mailing main mx manager marketing master me media message microblog microblogs mine mp3 msg msn mysql messenger m1m1n mob mobile movie movies music musicas my name named net network new news newsletter next nick nickname notes noticias ns ns1 ns2 ns3 ns4 old online operator order orders page pager pages panel password perl pic pics photo photos photoalbum php plugin plugins pop pop3 portal post postmaster postfix posts profile project projects promo pub public python random register registration root ruby rss sale sales sample samples script scripts secure send service shop sql signup signin search security settings setting setup site sites sitemap smtp soporte ssh stage staging start subscribe subdomain suporte support stat static stats status store stores sysadmin system tablet tablets tech telnet test test1 test2 test3 teste tests theme themes tmp todo task tasks tools tv talk update upload url user username usuario usage vendas video videos visitor win ww www www1 www2 www3 www4 www5 www6 www7 wwww wws wwws web webmail website websites webmaster workshop wp xxx xpg you yourname yourusername yoursite yourdomain
<?php
/**
* The base configuration for WordPress
*/
define( 'DB_NAME', 'database_name_here' );
define( 'DB_USER', 'username_here' );
define( 'DB_PASSWORD', 'password_here' );
define( 'DB_HOST', '127.0.0.1' );
define( 'DB_CHARSET', 'utf8mb4' );
define( 'DB_COLLATE', '' );
/**
* Database table prefix.
*/
$table_prefix = 'web_';
/**
* WordPress language.
*/
define( 'WPLANG', 'id_ID' );
/**
* Authentication Unique Keys and Salts.
*/
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' );
define('WP_CACHE_KEY_SALT', NONCE_SALT);
/**
* For developers: WordPress debugging mode and Multiuser.
*/
define('WP_CACHE', true);
define('WP_DEBUG', false);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_AUTO_UPDATE_CORE', true);
define('WP_POST_REVISIONS', false);
define('WP_ALLOW_REPAIR', true);
define('MEDIA_TRASH', false);
define('IMAGE_EDIT_OVERWRITE', true);
define('DISABLE_NAG_NOTICES', true);
define('DISABLE_WP_CRON', false);
define('DISALLOW_FILE_EDIT', true);
define('FORCE_SSL_ADMIN', false);
define('FORCE_SSL_LOGIN', false);
define('AUTOSAVE_INTERVAL', 300);
define('EMPTY_TRASH_DAYS', 0);
define('WP_MAX_MEMORY_LIMIT', '256M');
define('WP_MEMORY_LIMIT', '128M');
define('FS_METHOD', 'direct');
// define('WPCOM_API_KEY', 'put-your-key-here');
/**
* SMTP configuration.
* SES-SMTPUser-Somebody
*/
// define( 'SMTP_HOST', 'smtp.gmail.com' );
// define( 'SMTP_USER', 'your_email_username' );
// define( 'SMTP_PASS', 'your_email_password' );
// define( 'SMTP_FROM', 'noreply@example.com' );
// define( 'SMTP_NAME', 'e.g Website Name' );
// define( 'SMTP_PORT', '587' );
// define( 'SMTP_SECURE', 'tls' );
// define( 'SMTP_AUTH', true );
// define( 'SMTP_DEBUG', 0 );
/**
* Enable WP Multisite.
*/
// define('WP_DEFAULT_THEME', 'twentytwenty');
// define('WP_ALLOW_MULTISITE', true);
// define('MULTISITE', true);
// define('SUBDOMAIN_INSTALL', true);
// define('DOMAIN_CURRENT_SITE', 'example.com');
// define('NOBLOGREDIRECT', 'example.com');
// define('PATH_CURRENT_SITE', '/');
// define('SITE_ID_CURRENT_SITE', 1);
// define('BLOG_ID_CURRENT_SITE', 1);
// define('SUNRISE', 'on');
/**
* WP Disable Comments Plugin
* https://id.wordpress.org/plugins/disable-comments/
*/
define('DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE', false);
define('DISABLE_COMMENTS_ALLOW_DISCUSSION_SETTINGS', true);
/* That's all, stop editing! Happy publishing. */
/** 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' );
/**
* SMTP Mailer
*/
add_action('phpmailer_init', 'send_smtp_email');
function send_smtp_email($phpmailer)
{
$phpmailer->isSMTP();
$phpmailer->Host = SMTP_HOST;
$phpmailer->SMTPAuth = SMTP_AUTH;
$phpmailer->Port = SMTP_PORT;
$phpmailer->Username = SMTP_USER;
$phpmailer->Password = SMTP_PASS;
$phpmailer->SMTPSecure = SMTP_SECURE;
$phpmailer->From = SMTP_FROM;
$phpmailer->FromName = SMTP_NAME;
}
/**
* Global favicon
*/
function site_favicon_hook() {
echo '<link rel="shortcut icon" href="'.site_url('/favicon.ico').'" />';
echo '<link rel="icon" type="image/png" href="'.site_url('/favicon.png').'" />';
echo '<link rel="icon" type="image/x-icon" href="'.site_url('/favicon.ico').'" />';
echo '<link rel="icon" type="image/x-icon" sizes="16x16 32x32" href="'.site_url('/favicon.ico').'" />';
}
add_action('admin_head', 'site_favicon_hook');
add_action('wp_head', 'site_favicon_hook');
/**
* Force using Jetpack SSO and then disable
* login by using username and password.
*/
// add_filter( 'jetpack_sso_bypass_login_forward_wpcom', '__return_true' );
// remove_filter( 'authenticate', 'wp_authenticate_email_password', 20 );
// remove_filter( 'authenticate', 'wp_authenticate_username_password', 20);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment