Skip to content

Repository files navigation

Change WP Version — Local Add-on

Adds a "Change WP Version" tool to a site's Site Info panel in Local, letting you switch the WordPress core version — including RC/beta releases — without leaving the app.

Features

  • Lists the latest stable release of every WordPress minor branch (e.g. 6.7.7, 6.6.7, ...), pulled live from wp.org.
  • Optional toggle to also show unofficial RC/beta versions from wp.org's beta update channel.
  • Detects and displays the site's current WordPress version (the site must be running).
  • Forces the reinstall via WP-CLI (wp core update --version=<x> --force), so downgrades work too, not just upgrades.
  • Success/error modals, and other Local panels (e.g. Overview) refresh automatically after a change.

Installation

There are two ways to install the add-on: downloading a ready-to-use build (no dev tools required), or building it yourself from source.

Option A: Download a pre-built release (recommended for most users)

  1. Download change-wp-version.zip from the latest release.
  2. Unzip it — you get a change-wp-version folder, already built, with no extra steps needed.
  3. Move that folder into Local's addons directory (see step 1 below to locate it).
  4. Restart Local, then follow step 5 to enable it.

To get a newer version later, just repeat these steps with the newest release.

Option B: Build it yourself from source

Requires Node.js and Yarn installed.

Local only loads add-ons that live directly inside its addons directory, so this repo needs to be cloned somewhere else first, then linked (or copied) into that directory.

1. Locate Local's add-ons directory

  • macOS: ~/Library/Application Support/Local/addons
  • Windows: C:\Users\<username>\AppData\Roaming\Local\addons
  • Linux: ~/.config/Local/addons

Replace Local with Local Beta in the path above if you're running Local Beta.

2. Clone the repo (anywhere, e.g. your usual projects folder)

git clone https://github.com/Honemo/Local-change-wp-version.git

This creates a Local-change-wp-version folder — the repo root itself is the add-on, so that whole folder is what needs to end up (under the name change-wp-version) in Local's addons directory.

3. Link the add-on into Local's addons directory

A symlink is recommended so git pull updates are picked up without re-copying anything:

# macOS / Linux
ln -s /path/to/Local-change-wp-version "~/.config/Local/addons/change-wp-version"
# Windows (run as administrator)
New-Item -ItemType SymbolicLink -Path "$env:APPDATA\Local\addons\change-wp-version" -Target "C:\path\to\Local-change-wp-version"

(You can copy the folder instead of symlinking it, but you'll then need to re-copy it after every update.)

4. Install dependencies and build

cd /path/to/Local-change-wp-version
yarn install
yarn build

5. Enable the add-on in Local

Restart Local (or open it if it wasn't running), go to the add-ons panel, and enable Change WP Version. It then appears as a tab in each site's Site Info panel.

Updating later

cd /path/to/Local-change-wp-version
git pull
yarn install
yarn build

Then restart Local to pick up the changes.

Development

External Libraries

Folder Structure

All files in /src will be transpiled to /lib using TypeScript. Anything in /lib will be overwritten.

Development Workflow

If you are looking for help getting started, you can consult the documentation for the add-on generator.

You can consult the Local add-on API, which provides a wide range of values and functions for developing your add-on.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages