Overview
SleekByte runs code snippets you write, PHP, CSS, SCSS and JavaScript, without
a child theme and without editing plugin files. A snippet is a folder of
ordinary files with a snippet.json beside them, stored on disk rather than in
the database, so it can be copied, versioned and deployed like any other code.
Byte is part of the suite, where it opens from the workspace sidebar, and it also ships as the standalone SleekByte plugin, which adds a Byte entry to the SleekWP admin menu. Both run the same snippets from the same folders.
How it works
- Snippets are folders. Every folder that holds a
snippet.jsonis a snippet, and every PHP, CSS, SCSS and JavaScript file inside it loads automatically. Snippets live inwp-content/uploads/sleek-byte/unless you add more sources. - Loading is declared, not coded.
snippet.jsonsays where and when the files load: the contexts, the hook PHP runs on, environments, a schedule and conditions, per snippet or per file. See Configuration. - PHP is checked before it is saved. The workspace parses every changed PHP file for syntax errors and refuses to save while one is broken.
- Drafts can be previewed. The preview shows the site’s front end with the unsaved draft running in place of your saved snippets. See Preview.
- Failures are contained. Each snippet keeps a runtime error log, a snippet that hits three fatal errors in an hour stops loading, and a safe mode turns every snippet off. See Errors and safe mode.
- History is optional. With the
sleekByte/snippets/gitfilter on, every save records a Git commit per snippet. See History. - Snippets can leave Byte. Any selection of snippets exports as an installable plugin that runs without Byte. See Export to a plugin.
The workspace is where you write and manage snippets, the assistant can read and edit them for you, and everything the workspace does is also available to scripts through WP-CLI and the REST operations.
Updating from the standalone plugin
A site running a published SleekByte release updates in place to the current
one from the Plugins screen. The current release requires WordPress 6.5 and
PHP 8.2; a site below either stays on its release. The administration is
rebuilt inside the SleekWP menu and snippets stay where they always were. A
snippet whose snippet.json is not valid JSON, or holds a list rather than an
object, no longer runs with default settings: it waits until the file is
fixed. Uninstalling keeps the snippets,
which are the site’s own code. The built-in AI chat and the standalone
recovery editor are retired: the assistant replaces the
chat, and safe mode recovers a site a
snippet broke. To roll back, install the previous release’s ZIP again.