Home › Forums › WordPress › Config Setup › wp-config.php setup for development and production environments.
Tagged: config, development, production, setup, wp-config.php
- This topic has 0 replies, 1 voice, and was last updated 7 years, 8 months ago by Layer7web.
Viewing 0 reply threads
-
AuthorPosts
-
-
March 19, 2017 at 8:54 pm #2698
Layer7webKeymasterIf you are developing locally with the domain local.testing.dev where ‘local’ would determine the use of the local connections. You can change local to any string that exists in your development environment’s domain name that does not exist in the production environment.
PHP123456789101112131415161718192021222324if(strpos($_SERVER['HTTP_HOST'], 'local') === false){define('DB_NAME', 'database_name');define('DB_USER', 'user_name');define('DB_PASSWORD', 'password');define('WP_DEBUG', false);/** WP Memory Limit */define('WP_MEMORY_LIMIT', '1024M');/** Limit number of post revisions */define( 'WP_POST_REVISIONS', 5);/** Turn Off PHP Error Reporting */error_reporting(0);@ini_set(‘display_errors’, 0);}if(strpos($_SERVER['HTTP_HOST'], 'local') >= 0){define('DB_NAME', 'database_name');define('DB_USER', 'user_name');define('DB_PASSWORD', 'password');define('WP_DEBUG', true);}define('FS_METHOD', 'direct'); // For plugin updates etc.- This topic was modified 7 years, 7 months ago by Layer7web.
-
-
AuthorPosts
Viewing 0 reply threads
You must be logged in to reply to this topic.
Comments are closed.