What Is a Text Editor in WordPress?
A text editor is a program for writing and editing plain text, including code such as HTML. Common text editors include Notepad, Notepad++, and Visual Studio Code. In WordPress, the default block editor offers a Visual editor and a Code editor; the older Classic Editor (now a plugin) has Visual and Text tabs.
More About Text Editors
Developers and advanced WordPress users often use the text editor because it gives direct access to a post’s HTML. In the Classic Editor (WordPress 4.9-era UI), the Text tab at the top of the content box offers quicktag buttons for bold, italic, and links. The block editor’s Code editor is a plain markup view of the entire post; you type the HTML yourself.
To open it in the block editor (Gutenberg), click the three dots in the upper-right corner and select Code editor, or press Ctrl+Shift+Alt+M (⇧+⌥+⌘+M on Mac). If you’re using the Classic Editor, click the Text tab at the top of the content box.
Common text editors
A text editor works on any plain text file, not just HTML: source code, configuration files, plain notes. Most of the popular ones are free.
- Notepad comes preinstalled on Windows and handles quick plain-text edits with no setup.
- TextEdit ships with every Mac, but new documents are rich text by default, which brings in the smart quotes that break code. Choose Format > Make Plain Text before editing code, or set plain text as the default in TextEdit > Settings > New Document.
- Notepad++ is a free, extensible Windows editor with syntax highlighting.
- Visual Studio Code is free on Windows, Mac, and Linux, and extensible through plugins.
- Sublime Text runs on all 3 platforms and is free to download and evaluate, but a license must be purchased for continued use.
- Vim has been free (charityware) since its 1991 release and runs inside a terminal, which makes it handy for editing files directly on your server.
For a deeper comparison, see our guide to the 13 best text editors.
Text editor vs. code editor, IDE, and word processor
A code editor is a text editor with programmer features added, an IDE bundles a code editor with debugging and build tools, and a word processor adds hidden formatting that makes it unsafe for code.


- A plain text editor (Notepad, Nano) doesn’t add hidden rich-text formatting, which is why you should use one for code and configuration files such as wp-config.php and .htaccess. To edit one on your server, download it over SFTP or your host’s file manager, make the change, and upload it back.
- A source-code editor (Notepad++, Visual Studio Code, Sublime Text) is a text editor with programmer features added: syntax highlighting, autocomplete, and extensions.
- An IDE (integrated development environment), such as PhpStorm or Visual Studio, bundles a code editor with a debugger, build tools, and test runners in one program.
- A word processor (Word, Google Docs) stores hidden formatting, and its smart quotes silently replace the straight quotes code requires.
Use a plain text editor for a quick plain-text change, a code editor for day-to-day work on code, and an IDE when you need integrated debugging, builds, or tests. Never edit a site file in a word processor. If a configuration file fails right after an edit, check the quotes first.
When to use the text editor in WordPress
Stay in the visual editor for everyday writing; it’s a WYSIWYG editor, so you see formatting as you apply it. Switch to the text or code editor when the job is the markup itself: pasting an embed code, fixing broken HTML, or adding an attribute the toolbar has no button for. If only one block needs custom code, the Custom HTML block handles it without switching the whole post to markup.
The Code editor only edits the post in front of you. For theme or plugin code, WordPress ships a separate Theme File Editor and Plugin File Editor (the Theme File Editor is under Appearance; since WordPress 5.9 it moves under Tools when a block theme is active). Both change live site files, so one bad edit can take the site down; keep a copy of anything you change.
A worked example: adding a nofollow attribute
Say you want a link marked rel="nofollow". The nofollow attribute tells search engines not to count the link as an endorsement; Google has treated it as a hint rather than a strict rule since 2019, and that term covers the dated policy details, including when rel="sponsored" is the better choice.
The visual toolbar creates the link; to add the rel attribute, open the Code editor, find the link, and change:
<a href="https://example.com/">Example</a>
to:
<a href="https://example.com/" rel="nofollow">Example</a>
Switch back to the visual editor and preview the post. The link looks exactly as it did before; the attribute now lives in the markup.
When hand-edited markup breaks
In the block editor, each block’s markup has to match what WordPress expects. When an edit breaks that match, the editor flags the block as invalid and offers to attempt recovery, which rebuilds the block from your markup; the exact wording varies by WordPress version. The warning also offers alternatives, such as converting the block to HTML.
In the Classic Editor, switching from Text back to Visual has long been known to strip or rewrite custom HTML. Add raw markup as your last step before publishing, and keep a copy of it until you’ve previewed the result.
Frequently Asked Questions
- In practice, yes. The block editor, the default since WordPress 5.0 (December 2018), calls its plain-text mode the Code editor and shows your HTML plus the wp: comments that mark each block. Text tab is the Classic Editor’s name for it, and that editor now requires a plugin.
- Yes. Select the block, click the three dots in its toolbar, and choose Edit as HTML. Only that block turns to markup; the rest stays visual. Click Edit visually to switch back. If you change the markup heavily, the editor may no longer recognize the block.
- Scope. The Code editor exposes the whole post as markup; the Custom HTML block holds raw code inside one block. Since WordPress 7.0 (May 20, 2026), the block offers HTML, CSS, and JavaScript panels with a preview; the CSS and JavaScript panels need the unfiltered_html permission.
- Not really. Adobe Dreamweaver pairs a code view with a WYSIWYG design view, making it a web development suite, not a plain text editor. It’s received only maintenance updates since late 2021. If you only need to edit code, a free editor like VS Code is usually the better choice.
Powerful WordPress Hosting
Reliable, lightning-fast hosting solutions specifically optimized for WordPress. Find the perfect plan for you by clicking below.
WordPress Hosting Plans