diff --git a/docs/standards/index.md b/docs/standards/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..51ae616bfec40568eae1ee22e3dfaf861b9ac586
--- /dev/null
+++ b/docs/standards/index.md
@@ -0,0 +1,22 @@
+# Code standards
+
+In general, CiviCRM follow's the [Drupal Coding Standards](https://www.drupal.org/docs/develop/standards), but we have some minor modifications which are noted specifically in the other pages in this chapter.
+
+## Continuous integration
+
+Jenkins will automatically check all pull requests for code standards conformance, and code which does not meet the standards will not be merged. 
+
+
+## Tools
+
+If you have a development site with [buildkit]() you can use [Civilint](/tools/civilint.md) to check your code against CiviCRM's code standards.
+
+You can also [set up your IDE](https://wiki.civicrm.org/confluence/display/CRMDOC/IDE+Settings+to+Meet+Coding+Standards) to lint your code.
+
+
+## Improving code conformance
+
+If you find code that is not meeting the standards, we encourage you to improve it! But please follow these guidelines when doing so: 
+
+* Create a Jira issue for your code standard improvements which is separate from any other code changes you happen to be making at the time. 
+* Isolate your code standards improvements into commits which do not contain otherwise unrelated changes.
diff --git a/docs/standards/php.md b/docs/standards/php.md
new file mode 100644
index 0000000000000000000000000000000000000000..f135286a03fa6170e84c952e770a1537a501a9a4
--- /dev/null
+++ b/docs/standards/php.md
@@ -0,0 +1,62 @@
+# PHP Coding Standards
+
+CiviCRM uses the [Drupal Coding Standards](https://www.drupal.org/docs/develop/standards) as a basis for the coding standards used in civicrm-core code and in civicrm-drupal code.
+The standards are version-independent and all new code should follow the current standards regardless of version. 
+
+## Deviations from the Drupal Coding Standards {:#vs-drupal}
+
+There are two deviations from the Drupal Coding standards that apply in CiviCRM.
+
+### Functions and variable names
+
+**Drupal Standard**
+
+> Functions and variables should be named using lowercase, and words should be separated with an underscore.
+
+**CiviCRM Standard**
+
+For existing code/files/functions, err on the side of preserving compatibility.
+
+For new procedural code (eg `api/v3/*.php`), use lowercase and underscores.
+ 
+For new object-oriented code:
+
+1. For DAO properties, use underscores. (These correspond to the DB schema - which uses underscores.)
+2. For everything else, use camelCase. [See Forum Discussion](http://forum.civicrm.org/index.php/topic,35519.0.html)
+
+**Rational for Change**
+
+The codebase includes many examples of both "lowerCamelCase" and "snake_case" for function and variable names. Changing these can be quite difficult and can break interfaces consumed by downstream.
+
+
+### Classes and interfaces
+
+**Drupal Standard**
+
+> Classes and interfaces in Drupal take one of two forms:
+> 
+> * (Common in Drupal 7) Place classes in the root/global namespace and use "UpperCamel" names (e.g. `FooBarWhiz`)
+> * (Common in Drupal 8) Place classes in the "Drupal\" namespace using PHP 5.3 conventions (e.g. `Drupal\Foo\BarWhiz`)
+
+
+**CiviCRM Standard**
+
+Classes and interfaces in Civi take one of two forms:
+
+* For the `CRM_` namespace, follow the PEAR convention (using underscores for pseudo-namespaces; e.g. `CRM_Foo_BarWhiz`).
+* For the `Civi\` namespace, follow the PHP 5.3 convention (using backslashes for namespaces; e.g. `Civi\Foo\BarWhiz`).
+
+**Rational for Change**
+
+Changing these can be quite difficult and can break interfaces consumed by downstream. For more discussion of `CRM_` and `Civi\`, see [The Codebase](https://wiki.civicrm.org/confluence/display/CRMDOC/The+codebase).
+
+
+## Scope
+
+The CiviCRM Coding Standard for PHP Code and Inline Documentation applies to all PHP code in the CiviCRM code base, except files under the following directories:
+
+1. `packages/`
+1. `packages.orig/`
+1. `tools/`
+1. `joomla/`
+1. `WordPress/`
diff --git a/docs/standards/sql.md b/docs/standards/sql.md
new file mode 100644
index 0000000000000000000000000000000000000000..a320ce1208c8c8282de6359142d03e86afb5e3c2
--- /dev/null
+++ b/docs/standards/sql.md
@@ -0,0 +1,56 @@
+# SQL Coding Standards
+
+When writing SQL, it is very important that developers protect against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) by ensuring that all variables are passed into SQL safely and securely.
+
+This page describes the inbuilt parameterization tools available for safely executing SQL.
+
+## `CRM_Core_DAO::executeQuery` {:#executeQuery}
+
+```php
+$name = 'John Smith'; /* un-trusted data */
+$optedOut = 0;        /* un-trusted data */
+
+$query = "
+  SELECT id
+  FROM civicrm_contact 
+  WHERE 
+    display_name like %1 AND
+    is_opt_out = %2";
+
+$result = CRM_Core_DAO::executeQuery($query, array(
+  1 => array('%' . $name . '%', 'String'),
+  2 => array($optedOut, 'Integer'),
+));
+```
+
+This example ensures that variables are safely escaped before being inserted into the query. CiviCRM also allows developers to specify the type of variable that should be allowed. In the case of the `%2` ($optedOut) parameter, only an *Integer* input will be permitted.
+
+The variable types available for this can be found in [CRM_Utils_Type::validate](https://github.com/civicrm/civicrm-core/blob/60050425316acb3726305d1c34908074cde124c7/CRM/Utils/Type.php#L378). The query engine then applies appropriate escaping for the type.
+
+## `CRM_Utils_Type::escape` {:#escape}
+
+In some circumstances you may find that a complex query is easier to build by directly escaping values using the `CRM_Utils_Type::escape()` method. It is prefereable to use the form above or the `CRM_Utils_SQL_Select` format
+
+```php
+$name = CRM_Utils_Type::escape('John Smith', 'String');
+$column = CRM_Utils_Type::escape('civicrm_contact.display_name', 'MysqlColumnNameOrAlias');
+$result = CRM_Core_DAO::ExecuteQuery("SELECT FROM civicrm_contact WHERE $column like '%$name%'");
+```
+
+## `CRM_Utils_SQL_Select`
+
+Since CiviCRM 4.7 version there has been an alternate way of generating sql. You can use `CRM_Utils_SQL_Select` to generate your query. You can then use all the various `CRM_Core_DAO` methods to then run the query e.g. `fetch()` or `fetchAll()`.
+Further information on this method can be found in the [CRM_Utils_SQL_Select class](https://github.com/civicrm/civicrm-core/blob/6db7061/CRM/Utils/SQL/Select.php#L33)
+
+```php
+$columnName = CRM_Utils_Type::escape('cm.membership_status', 'MysqlColumnNameOrAlias');
+$sql = CRM_Utils_Sql_Select::from('civicrm_contact c')
+  ->join('cm', 'INNER JOIN civicrm_membership cm ON cm.contact_id = c.id')
+  ->where('!column = @value', array(
+    'column' => $columnName,
+    'value' => 15,
+  ))
+  ->where('membership_type_id IN (#types)', array('types', array(1,2,3,4)))
+  ->toSQL();
+$result = CRM_Core_DAO::executeQuery($sql);
+```
diff --git a/mkdocs.yml b/mkdocs.yml
index a9f58dcb5122cb266de7e91ae7e13d49cbdc13d0..904b5a9a60889958dadcc72d45b1a9ff0d813263 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -65,11 +65,6 @@ pages:
   - Schema definition: framework/schema-definition.md
   # Resources: /framework/resources.md
   # Upgrade: /framework/upgrade.md
-  #### Code Standards:
-  # PHP: /standards/php.md
-  # Javascript: /standards/js.md
-  # API: /standards/api.md
-  # Git: /standards/git.md
   # Other Reference:
   # CiviMail: /reference/civimail.md
   # CiviReport: /reference/civireport.md
@@ -207,6 +202,13 @@ pages:
     - hook_civicrm_tokens: hooks/hook_civicrm_tokens.md
     - hook_civicrm_tokenValues: hooks/hook_civicrm_tokenValues.md
     - hook_civicrm_unhandledException: hooks/hook_civicrm_unhandledException.md
+- Code Standards:
+  - Code Standards: standards/index.md
+  - PHP Standards: standards/php.md
+  - SQL Standards: standards/sql.md
+  # Javascript: standards/js.md
+  # API: standards/api.md
+  # Git: standards/git.md
 - Documentation:
   - Writing Documentation: documentation/index.md
   - Documenting Extensions: documentation/extensions.md
diff --git a/redirects/wiki-crmdoc.txt b/redirects/wiki-crmdoc.txt
index fe3199a128a7b09db5e949a65154875ceef47b46..7033af8507f9c340c6f071d6bb7c9db170e0651e 100644
--- a/redirects/wiki-crmdoc.txt
+++ b/redirects/wiki-crmdoc.txt
@@ -130,4 +130,5 @@ CiviRules+hooks hooks
 Profile+Hooks hooks
 Report+Hooks hooks
 Tests+in+phpstorm tools/phpstorm/#testing
-Testing testing/setup
\ No newline at end of file
+Testing testing/setup
+PHP+Code+and+Inline+Documentation standards/php