Limites de memória PHP para o site‎

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.

‎Base de dados‎

define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)

‎Configuração explícita de URL

define( 'WP_HOME', 'http://domain.com' );
define( 'WP_SITEURL', 'http://domain.com' );

URL para o frontend e backend

define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );

‎Definir o tema padrão‎

define( 'WP_DEFAULT_THEME', 'twentytwentyone' );

‎Temporário por fazer com que um local se mude. Remover após o login‎

define( 'RELOCATE', true );

‎Permitir que o WordPress atualize arquivos‎

define( 'FS_METHOD', 'direct' );
define( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) ); // change permissions of directories
define( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) ); // change permissions of files

‎Definir os arquivos de diretório deve ser baixado antes de serem movidos‎

‎Isso geralmente é definido no php conf‎
define( 'WP_TEMP_DIR', '/Applications/MAMP/tmp/php/' ); // this one is for default MAMP setup

‎Caminhos de conteúdo, plugin e modelo‎

define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); // Full URL to wp-content
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // No trailing slash, full paths only to wp-content
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // Full path, no trailing slash.
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // Full URL, no trailing slash.
define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compatibility.
define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); // Full path, no trailing slash.
define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // Full URL, no trailing slash.
define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); // Relative to ABSPATH. For back compatibility.
define( 'TEMPLATEPATH', get_template_directory() );
define( 'STYLESHEETPATH', get_stylesheet_directory() );

‎Definir revisões de post para algo viável‎

define( 'WP_POST_REVISIONS', 15 );

‎Intervalo automático de revisões pós-revisão em segundos‎

define( 'AUTOSAVE_INTERVAL', 160 ); // Seconds

‎Defina domínio de cookies para cookies de login‎

‎Muito útil se você estiver recebendo erros de cookie durante o login‎
define( 'COOKIE_DOMAIN', '.domain.com' ); // Domain and all subdomains
define( 'COOKIE_DOMAIN', 'domain.com' ); // only root domain
define( 'COOKIE_DOMAIN', 'www.domain.com' ); // only subdomain

‎Mais constantes de cookies‎

define( 'COOKIEPATH', $_SERVER['HTTP_HOST'] . '/' ); // You should set this explicitly.
define( 'SITECOOKIEPATH', $_SERVER['HTTP_HOST'] . '/' ); // You should set this explicitly.
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
define( 'PLUGINS_COOKIE_PATH', preg_replace( '|https?://[^/]+|i', '', WP_PLUGIN_URL ) );

Variável de cookies

define( 'USER_COOKIE', 'wordpressuser_' . COOKIEHASH );
define( 'PASS_COOKIE', 'wordpresspass_' . COOKIEHASH );
define( 'AUTH_COOKIE', 'wordpress_' . COOKIEHASH );
define( 'SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH );
define( 'LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH );
define( 'RECOVERY_MODE_COOKIE', 'wordpress_rec_' . COOKIEHASH );

‎Depurar WordPress ativado ou desativado

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_LOCAL_DEV', true ); // Magic switch for local dev

‎Depuração de script e estilo‎

define( 'CONCATENATE_SCRIPTS', false ); // Causes WordPress scripts to be included separately
define( 'SCRIPT_DEBUG', true ); // Uses unminified scripts
define( 'SAVEQUERIES', true ); // Requires analyzing the global $wpdb object.
define( 'COMPRESS_SCRIPTS', true );
define( 'COMPRESS_CSS', true );
define( 'ENFORCE_GZIP', true );

‎Desativar cron WP em favor do servidor cron‎

define( 'DISABLE_WP_CRON', true );
define( 'ALTERNATE_WP_CRON', true ); // alternate method of firing cron in the background when initiated by end users.
define( 'WP_CRON_LOCK_TIMEOUT', MINUTE_IN_SECONDS ); // limit cron runs to a certain interval.

SSL

define( 'FORCE_SSL_LOGIN', true ); // Only secrue the registration/login process
define( 'FORCE_SSL_ADMIN', true ); // Force SSL for the whole WordPress admin

‎A correção "timthumb"‎

define( 'WP_HTTP_BLOCK_EXTERNAL', true );
define( 'WP_ACCESSIBLE_HOSTS', 'api.wordpress.org,*.github.com' ); // Only allow particular hosts in

‎Modificando arquivos‎

define( 'DISALLOW_FILE_EDIT', true ); // Kill the WordPress file editor
define( 'DISALLOW_FILE_MODS', true ); // Don't allow users to update core, plugins, or themes
define( 'IMAGE_EDIT_OVERWRITE', true ); // Allow editing images to replace the originals

‎Alterando as atualizações do WordPress‎

define( 'AUTOMATIC_UPDATER_DISABLED', true ); // Disable all WordPress auto-updates
define( 'WP_AUTO_UPDATE_CORE', false ); // Only disable core updates
define( 'WP_AUTO_UPDATE_CORE', 'minor' ); // Only enable minor core updates

‎Mudar idiomas‎

define( 'WPLANG', 'de_DE' );
define( 'WP_LANG_DIR', dirname(__FILE__) . 'wordpress/languages' );

‎Lixo‎

define( 'EMPTY_TRASH_DAYS', 30 ); // Number of days to wait before emptying the trash
define( 'MEDIA_TRASH', false ); // Whether to allow media items to use the trash functionality.

‎Ferramentas de desenvolvimento‎

define( 'SHORTINIT', false ); // Disable most of WordPress. Useful for fast responses for custom integrations.
define( 'WP_USE_THEMES', true ); // Override if you love WordPress, but hate themes. @credit: https://wordpress.stackexchange.com/questions/12919/what-is-the-constant-wp-use-themes-for

‎Modo de recuperação e tratamento de erros fatais‎

define( 'WP_SANDBOX_SCRAPING', true ); // Turn off WSOD Protection (and don't send email notification)
define( 'WP_START_TIMESTAMP', microtime( true ) ); // Modify the WordPress start time.
define( 'RECOVERY_MODE_EMAIL', 'mike@example.com' ); // Set a recovery mode email.

Esta resposta lhe foi útil? 0 Usuários acharam útil (0 Votos)