Last active
December 26, 2018 13:35
-
-
Save marcoszf/29739f60ba665eb7733212ab4c2db5f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* Normalmente arquivos de configs são diferentes em cada ambiente. | |
| Definir qual arquivo de configuração deve ser carregado dependendo do ambiente: | |
| live-config.php -> ambiente de produção | |
| staging-config.php -> ambiente de testes | |
| local-config.php -> ambiente local(desenvolvimento) */ | |
| if ( file_exists( dirname( __FILE__ ) . '/live-config.php' ) ) { | |
| define( 'WP_LOCAL_DEV', false ); | |
| define( 'DBI_STAGING_SITE', false ); | |
| include dirname( __FILE__ ) . '/live-config.php'; | |
| } | |
| elseif ( file_exists( dirname( __FILE__ ) . '/staging-config.php' ) ) { | |
| define( 'WP_LOCAL_DEV', false ); | |
| define( 'DBI_STAGING_SITE', true ); | |
| include dirname( __FILE__ ) . '/staging-config.php'; | |
| } | |
| else { | |
| define( 'WP_LOCAL_DEV', true ); | |
| define( 'DBI_STAGING_SITE', false ); | |
| include dirname( __FILE__ ) . '/local-config.php'; | |
| } | |
| //Desabilitar Acesso FTP e edição de arquivos | |
| /*Como o seu site será 'deployed' automaticamente, uma coisa que você não poderá fazer | |
| é editar os arquivos em ambiente de produção. | |
| Qualquer alteração que você fizer em qualquer arquivo deve ser commitado para o seu repositório git e deve agir como os "Arquivos da verdade". | |
| Para desabilitar qualquer acesso FTP, insira o código abaixo em wp-config.php: */ | |
| define( 'DISALLOW_FILE_EDIT', true ); | |
| //Desabilitar Auto Updates | |
| /* Quando se utiliza Composer para gerenciar o sue site Wordpress, você deve desabilitar qualquer auto updates. | |
| Insira o código abaixo em wp-config.php:*/ | |
| define( 'AUTOMATIC_UPDATER_DISABLED', true ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment