For the last few years, Sublime Text has been one of the most popular text editors. And you can rightfully assume that many WordPress developers also use Sublime Text. Developers fell in love with this text editor because it’s fast, stable and has huge eco-system. Over the years Sublime Text editor has not only matured but its robust packages/extensions has increased significantly as well. And we are going to take a look at all the available and free Sublime Text WordPress Extensions for developers.

For the beginners/new users of Sublime Text Editor, If you haven’t used Package Control before. Don’t worry it’s pretty easy to install. Open Your Sublime Text Editor go to Preference->Package Control and from the dropdown option select Install Package. Now you can search and install additional Sublime text extensions.

Based on WordPress Textmate, WordPress Package is a collection of WordPress snippets and auto completions for Sublime Text 2/3. Often times we have to look into WordPress codex for code reference and formatting. This sublime package will save your time by auto completing standard WordPress codes. For example – if you type shortcode , the package will suggest and autocomplete will auto generate this code for you –

function func_name( $atts ) { $atts = shortcode_atts( array( 'default' => 'values' ), $atts ); // do shortcode actions here } add_shortcode( 'shortcode-id','func_name' );

It’s one of the handy sublime text wordpress extensions considering the fact every time we have copy the code format from another line or from codex. It really saves your time and improve WordPress coding experience. It reduces the amount of time spent digging around the WordPress core to look up the little things that we work with every day. The package features auto-completion of WordPress functions and snippets for common sections of codes.

Works with Sublime Text 2 and 3

If you frequently head back to developer.wordpress.org for a quick reference while coding this package can improve your workflow. A Sublime Text Plugin to search the WordPress Developer Resources (developer.wordpress.org) or WordPress Codex (legacy) directly from Sublime Text. Here’s how it works –

Right-click, Tools Menu, or Command Menu (CTRL+SHIFT+P):

Go to WP Dev Resources (right click) or WordPress Developer Resources , and select Search Selection to automatically open a browser searching WordPress for the function/term you have selected or the cursor placed on.

(right click) or , and select to automatically open a browser searching WordPress for the function/term you have selected or the cursor placed on. Select Search From Input to have a prompt ask you the search term to use.

to have a prompt ask you the search term to use. Select Function Reference to go directly to that function reference on the WordPress Page (instead of searching).

to go directly to that function reference on the WordPress Page (instead of searching). There is also a Search Selection (Codex) for legacy support, which will search the standard WordPress Site (and original Codex). If you have troubles searching with the new site, use this until the site has been completely finished.

Original Sources –

Stackoverflow Plugin script by Eric Martel.

ST2 WordPress Codex Plugin script by Matthias Krok.

ST3 WordPress Codex Plugin script by Myles McNamara.

Works with Sublime Text 2 and 3

Another excellent package to assist your WordPress development, It auto completes your WordPress function with parameter hinting, also auto completes lots of trivial WordPress stuffs that we tend to copy and paste all the time. For example if you type Widget hit enter with the auto complete, you get fully fledged widget template on a jiffy

/** * Add PREFIX_Name_Widget widget. */ class PREFIX_Name_Widget extends WP_Widget { /** * Register widget with WordPress. * **/ function __construct() { parent::__construct( 'foo_widget', // Base ID __('Title', 'Text Domain'), // Name array( 'description' => __( 'Description', 'Text Domain' ), ) // Args ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } echo __( 'Default Content', 'Text Domain' ); echo $args['after_widget']; } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form( $instance ) { if ( isset( $instance[ 'title' ] ) ) { $title = $instance[ 'title' ]; } else { $title = __( 'Default Title', 'Text Domain'' ); } ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>"> </p> <?php } /** * Sanitize widget form values as they are saved. * * @see WP_Widget::update() * * @param array $new_instance Values just sent to be saved. * @param array $old_instance Previously saved values from database. * * @return array Updated safe values to be saved. */ public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; return $instance; } } add_action( 'widgets_init', create_function( '', "register_widget( 'PREFIX_Name_Widget' );" ) );

This is one of the super cool sublime text wordpress extensions and definitely makes life easier for WordPress developers using Sublime Text.

Works with Sublime Text 2 and 3

This package will help you to switch between database, toggle Debug and quickly access to your config file. Once installed the shortcuts can be viewed from Tools -> WordPress

Works with Sublime Text 2 and 3

Based on the phptidy script by Magnus Rosenbaum, This PhpTidy package will conform your PHP coding to WordPress Coding Standards.

Works with Sublime Text 2 only

This package’s code is based on the Stackoverflow Plugin script by Eric Martel. Search WordPress Codex package will allow you to search WordPress codex easily. All you need to do is to right click on the function and select the’WordPress Function Reference’ option of this package. Codex URL with this specific WordPress function will open on your browser.

Works with Sublime Text 2 only

This plugin will help you to search WordPress Codex, or QueryPosts for any term or a specific function in only two clicks. But the author has abandoned this project and encouraging its users to use WordPress Developer Resources. If you are happen to use this package remove it and rather install developer resources package.

Works with Sublime Text 3 only

This package will auto complete your WordPress functions and snippets. For example if you type wp-phpdoc and hit enter, you will get –

<?php /** * [Short Description] * * [Long Description.] * * @since [1.0] * * @package [package Name] * @subpackage [subpackage Name] */ ?>

or if you type wp-pluginHeader you get –

<?php /** * Plugin Name: Name * Description: Description * Plugin URI: http... * Author: Author * Author URI: http... * Version: 1.0 * License: GPL2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html * Text Domain: Text Domain * Domain Path: Domain Path * Network: false * * * Name is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * any later version. * * Name is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Name. If not, see https://www.gnu.org/licenses/gpl-2.0.html. */ defined( 'ABSPATH' ) or exit; class Plugin_Class_Name { private static $_instance = null; public static function instance() { if ( ! isset( self::$_instance ) ) { self::$_instance = new self; } return self::$_instance; } private function __construct() { } public static function do_activate( $network_wide ) { if ( ! current_user_can( 'activate_plugins' ) ) return; $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : ''; check_admin_referer( "activate-plugin_{$plugin}" ); } public static function do_deactivate( $network_wide ) { if ( ! current_user_can( 'activate_plugins' ) ) return; $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : ''; check_admin_referer( "deactivate-plugin_{$plugin}" ); } public static function do_uninstall( $network_wide ) { if ( ! current_user_can( 'activate_plugins' ) ) return; check_admin_referer( 'bulk-plugins' ); if ( __FILE__ != WP_UNINSTALL_PLUGIN ) return; } } add_action( 'plugins_loaded', 'Plugin_Class_Name::instance' ); register_activation_hook( __FILE__, 'Plugin_Class_Name::do_activate' ); register_deactivation_hook( __FILE__, 'Plugin_Class_Name::do_deactivate' ); register_uninstall_hook( __FILE__, 'Plugin_Class_Name::do_uninstall' );

Currently this package’s complete list is compiled of –

Type Completions Functions 2760 Actions 642 Filters 1384 Classes 352 Methods 3330 Constants 517 Capabilities 56

See extend completions list on wiki page.

Works with Sublime Text 2 and 3

Salt keys exist in your WordPress wp-config file. According to Codex –

In Version 2.6, three (3) security keys, AUTH_KEY, SECURE_AUTH_KEY, and LOGGED_IN_KEY, were added to ensure better encryption of information stored in the user’s cookies. These collectively replaced a single key introduced in Version 2.5. In Version 2.7 a fourth key, NONCE_KEY, was added to this group. When each key was added, corresponding salts were added: AUTH_SALT, SECURE_AUTH_SALT, LOGGED_IN_SALT, and NONCE_SALT.

These four keys are required for the enhanced security of your WordPress sites. These are recommended, but not required, because WordPress will generate salts for you if none are provided. They are included in wp-config.php by default for inclusiveness. You can use this online generator or you can use this package to do the heavy lifting for you.

Works with Sublime Text 3 Only

Inspired by WP-Readme-to-Github-Markdown, This package converts your readme.txt file to readme.md file. Feature includes –

Converts headings;

Formats contributors, donate link, etc;

Inserts screenshots.

For some reason the package did not work for me. I open a readme.txt file and press the windows shortcut alt+k but it did not do anything.

Works with Sublime Text 2 and 3

Most of us develop themes with WordPress and use copy-pasting for customizer panels, sections, settings and controls. But with this package by Ahmad Awais, you can forget about copy pasting and create these customizer options in a second.

Types of customizer options are available are –

WP Customize Add Pannel WP Customize Add Section WP Customize Add Setting WP Customize Add Control Basic WP Customize Add Control Image WP Customize Add Control Upload WP Customize Add Control Color WP Customize postMessage JS Basic WP Customize Register Function

You can find more information about this package in here or in his GitHub Page.

Works with Sublime Text 2 and 3

Custom Meta Boxes is an important part of Human Made‘s WordPress development Workflow. And they decided to release make a Sublime Text Package and release it to help the fellow WordPress Developers.

This is a must have package if you work a lot with Custom Meta Boxes, It will definitely speed up your development workflow.

Works with Sublime Text 2 and 3

A Sublime Text extension for WordPress for Genesis theme framework developers. It has lots of custom snippets to speed up your WordPress workflow. Snippets includes –

and many more. Even if the package is quite old and hasn’t been updated with times you can still tinker with it and update the snippets by your own and use it.

Works with Sublime Text 2 and 3

You can manage your WordPress sites by using this Sublime Text extension. This is a forked version of original Sublpress by Nic Dienstbier. Being on Sublime Text 3 version couldn’t test it. The issues on GitHub indicates that it won’t work properly.

Works with Sublime Text 2 Only

A Git integration for Sublime Text. If you want to know about the history of your files and their changes according to their commits in the editor, all without having to jump from window to window then use this package. Currently this package has just enough git commands to be useful and get by most of the stuff. Take a look at the screenshots and decide for yourself –

You can know more about features by visiting this wiki link. The package also contains Sublime Text git Commit Message Syntax by Adam Bullmer. It’s a syntax highlighter package for Sublime Text Editor and Text Mate.

Works with Sublime Text 2 and 3

This package will help you write documentation/comment of your code easily. At the moment it supports JavaScript (including ES6), PHP, ActionScript, Haxe, CoffeeScript, TypeScript, Java, Apex, Groovy, Objective C, C, C++ and Rust. Some of the features include –

Dockblock completion for single and multiple line Function documentation with long variables names and parameters Variable documentation Comment extension Comment decoration Reparsing a DocBlock Reformatting paragraphs Adding Extra tags

Works with Sublime Text 2 and 3

This package takes away some of the repetitive task we have to do for every new project. It –

Fetch and Install the latest WordPress build Remove readme.html and license.txt Fetch your favorite starter theme and rename it with your project name Remove twentyten, twentyeleven and twentytwelve themes Fetch a list of plugins you want on every projects Remove Hello Dolly plugin Fetch H5BP server-configs .htaccess Prompt you for a table prefix Configure wp-config.php and change update salt strings Create a wp-config-local.php file for local database parameters Exclude wp-config-local.php in .gitignore and Sublime ftp config file Create a Sublime text 2 project config file (projectName.sublime-project) Create a database with your project name Open your newly created WordPress website in your favorite browser Create a Sublime text 2 sFTP config file sftp-config.json in each folder.

Works with Sublime Text 2 Only

A project of Justin Sternberg, It’s a package focused on PHP debugging snippets with some WordPress snippets. You can some of the snippets in here.

Works with Sublime Text 2 Only

A WordPress snippet package for Sublime Text 3. It’s a small package consisted with only five snippets. They are –

wp_create_plugin wp_add_menu_page wp_add_submenu_page wp_add_menu_with_submenu wp_add_meta_box

Works with Sublime Text 3 Only

Another WordPress snippets Sublime Text package. Good is that it’s regularly updated and maintained on GitHub and has 20 snippets. Some of them are –

Works with Sublime Text 2 Only

This package is a compilation of sublime-text-2-wordpress and WordPress-Devs and including the WordPress code snippets of the package developer. You need to manually download the extension and place in on the Browse Packages folder.

Works with Sublime Text 3 Only

A package with collections of snippets from WordPress, Laravel, PHP, Sass and JS. Some of the snippets are –

WordPress snippets –

qtranslatelangs

echoContentHtml

custom-post

SASS snippets –

bootstrapgrid

mediaSlider

mediabasic

Blade snippets –

dump_die-complete

form-label+input

form-password

PHP snippets –

vue-mustaches

enqueue-swiper

wpheader

Works with Sublime Text 3 Only

An extension to generate Salts key in PHP in dotenv environment. Why dotenv ?

Basically, a .env file is an easy way to load custom configuration variables that your application needs without having to modify .htaccess files or Apache/nginx virtual hosts. This means you won’t have to edit any files outside the project, and all the environment variables are always set no matter how you run your project – Apache, Nginx, CLI, and even PHP 5.4’s built-in webserver. It’s WAY easier than all the other ways you know of to set environment variables, and you’re going to love it.

Works with Sublime Text 3 Only

A sublime Text 2 dedicated geared for speedy development. Currently it supports Sass, CMB2 and WordPress goodies. CMB2 includes AddMetabox and AddField skeleton functions, WordPress includes newPostType, newShortcode and newSidebar skeleton functions.

Works with Sublime Text 2 Only

A Sublime Text extension that localizes selected strings using the WordPress i18n translation methods. It parses a string of selected text and work out what i18n method to encase the string in. But it does not handle every i18n method, just the following most common methods –

__()

_e()

esc_html__()

esc_html_e()

esc_attr__()

esc_attr_e()

Not supported

_n() Plurals

_x() Context

What extensions you use for Sublime Text editor ? Did we miss any extensions that you like ? Let us know your extension(s) in the comment.