Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/king-infet/code-workbench/archive/refs/heads/master.zipA WordPress plugin that replaces the Theme File Editor (theme-editor.php) and the Plugin File Editor (plugin-editor.php) with VS Code for the Web, running inside the WordPress admin. VS Code is built from its MIT licensed source (Code - OSS) and ships inside the plugin: nothing is downloaded and the editor needs no external service.
readme.txt is the public description for wordpress.org; this file documents how the plugin works. Source: https://github.com/KinG-InFeT/code-workbench
The screens keep their URLs, menu entries and select menu ("Select theme to edit" / "Select plugin to edit"). VS Code opens on the selected theme or plugin folder only: the Explorer, Quick Open and search see that folder and nothing else, and the server refuses any path outside it.
Requirements
- WordPress 6.4+, PHP 7.4+.
- Users need
edit_themes/edit_plugins, like the core editors. WhenDISALLOW_FILE_EDITorDISALLOW_FILE_MODSis set, or on multisite for non super admins, core removes those capabilities and the editors stay disabled.
Installation
Install the release zip built by bin/package.sh (see Development), or copy its dist/code-workbench folder into wp-content/plugins/, and activate it. A git checkout needs bin/build-vscode.sh first, because vscode/ is not versioned. Appearance → Theme File Editor and Plugins → Plugin File Editor open VS Code. The plugin stores nothing in the database; VS Code keeps its state (open tabs, layout) in the browser.
Bundled VS Code
vscode/<version>/ holds a VS Code for the Web build made by bin/build-vscode.sh from the Code - OSS source at the tag named by CODE_WORKBENCH_VSCODE (code-workbench.php). The Microsoft download (web-standalone) cannot be used: its license forbids hosting or redistributing it.
The script trims the build to what editing a theme or a plugin needs:
- Built-in extensions: grammars for PHP, HTML, CSS, SCSS, Less, JavaScript, TypeScript, JSON, Markdown, XML, YAML, SQL and shell scripts; completions and validation for CSS and JSON (language servers running in web workers); Emmet; the default color themes and the Seti file icons. The workbench lists every extension it was built with as built in, so the others are deleted from the source before the build, not after.
- Left out, by size:
- the JS/TS language service (about 5 MB once zipped);
- the HTML language server (1.8 MB, mostly the TypeScript compiler it embeds for `