Which Text Editor is Right for Your WordPress Code? - dummies

Which Text Editor is Right for Your WordPress Code?

By Lisa Sabin-Wilson

Next to reliable ol’ pen and paper, nothing beats a good, solid text editor when you’re using WordPress. Unfortunately, writing code is difficult with a pen and paper, and it doesn’t translate well to the internet. That’s when a basic text-editor program comes in handy. It’s a good idea to have one handy for writing Cascading Style Sheets (CSS) and HTML as well as coding WordPress templates and themes.

Make sure that you use a text editor and not a word processor, such as Microsoft Word, to write any code because a word processing program automatically inserts formatting, characters, and hidden spaces. When you’re writing code, the last thing you want is anything but your own code inserted into the document — so stick with a basic text editor.

Notepad (Windows)

Notepad is a basic text editor that you can use to write code without the fuss and worry of text formatting. Notepad doesn’t support any special document formatting or characters, which makes it great for writing code and web documents.

Notepad is the go-to text editor for most Windows users because it’s a Microsoft product that’s packaged in every Windows operating system. Often, people use Notepad to view and edit text files with the .txt extension, but many people, including myself, use it to create basic CSS and HTML files, as well.

Notepad, by default, saves files with a .txt extension. With WordPress templates and theme files, you typically save files with a .php or .css extension, so make sure you save them correctly. To save a file with a .php or .css extension with Notepad, follow these quick steps in Windows 7:

  1. Choose Start→All Programs→Accessories→Notepad.

    Notepad opens, and you can start typing your code.

  2. Create your CSS or PHP document.

  3. Choose File→Save As, and then choose the location on your computer where you want to save the file.

  4. Type the filename, including the extension, in the File Name field.

    The name of this PHP file is header.php. However, if you’re saving a CSS document, the extension is .css, such as style.css.


  5. Choose All Files in the Save as Type drop-down list.

    By default, Notepad wants to save the file with the file type Text Documents (*.txt).

  6. Leave ANSI chosen in the Encoding field.

    This is default character encoding and is okay to leave as is.

  7. Click Save.

Notepad++ (Windows)

Notepad++ is a text editor for Windows and is often referred to as “Notepad on steroids” because the interface looks a lot like regular Notepad — but that’s where the similarities end. Notepad++ has advanced features such as color-coded syntax, code indentation, and line numbering, which make it an extremely useful and helpful application for writing and editing code.


Notepad++ supports many programming languages: CSS, HTML, and PHP. Notepad++ is free open-source software!

TextMate (Mac)

TextMate is an Apple product and, as such, can be used only on a Mac. TextMate is the most popular text editor for Mac and is referred to as “the missing editor.” Like Notepad++, TextMate is a syntax editor — it color-codes the markup and code that you write and has several features expected of most syntax editors, including

  • Easy searching and replacing

  • Auto-indenting and color-coding markup and code

  • Opening several documents, each in their own tab, when applicable

  • Working as an external editor for FTP programs

TextMate isn’t free, however. You can download a free 30-day trial. After the free trial ends, you can buy a single-user license for $56.