WordPress Coding Standards for Uniform and Beautiful development

WordPress itself has a good guide but I have summarized it for my own use. Here is a list of *half finished* blog post about WordPress coding standards.

WordPress PHP Coding Standards


  • use real tabs equivalent to 4 spaces.
  • Do not use closing PHP tags.
  • Starting braces should be at the end of the line whereas ending braces should be at new line with previous intent.
  • never use shorthand php tags.
  • use spaces appropriately.


  • Variable names should be all lowercase, words separated with underscores


  • Class names should use capitalized words separated by underscores.
  • Any acronyms should be all uppercase.

class Local_File_Operations {}
class HTTP_Request {}


Constants should be all uppercase, separated by underscores

define( 'DOING_AJAX', true );

File Names:

File names should be all lower case, separated with dashes


NOTE: I wrote this post for my own uses but it might be useful for you also. If you have any suggestion please leave a comment be below.

Leave a Reply

Your email address will not be published. Required fields are marked *