From 4feb654fdec0331aed8b526504eaad2d55b9bb0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Fri, 12 Apr 2024 13:52:25 +0200 Subject: [PATCH 1/2] Docs: Update WordPress versions used in the documentation, document using older releases Ensures WordPress 5.9 and 6.0 are no longer referenced in the documentation as they are no longer supported. Provides instructions for people who still need to use them. Closes https://github.com/WordPress/wordpress-playground/issues/994 This is a quick stab at it, feel free to take over @ironnysh, I gave you write permissions so you could update this PR. cc @ironnysh --- .../docs/site/docs/02-start-using/01-index.md | 2 +- .../docs/site/docs/08-query-api/01-index.md | 2 +- .../09-blueprints-api/02-using-blueprints.md | 6 +- .../docs/09-blueprints-api/03-data-format.md | 4 +- .../docs/09-blueprints-api/08-examples.md | 40 +++++++++++++ .../playground-configuration-group/form.tsx | 60 ++++++++++++------- 6 files changed, 84 insertions(+), 30 deletions(-) diff --git a/packages/docs/site/docs/02-start-using/01-index.md b/packages/docs/site/docs/02-start-using/01-index.md index 54d0ff4d31..7310f041a5 100644 --- a/packages/docs/site/docs/02-start-using/01-index.md +++ b/packages/docs/site/docs/02-start-using/01-index.md @@ -89,7 +89,7 @@ Compatibility testing with so many WordPres and PHP versions was always a pain. You can also use the `wp` and `php` query parameters to open Playground with the right versions already loaded: -- https://playground.wordpress.net/?wp=5.9 +- https://playground.wordpress.net/?wp=6.5 - https://playground.wordpress.net/?php=7.4 - https://playground.wordpress.net/?php=8.2&wp=6.2 diff --git a/packages/docs/site/docs/08-query-api/01-index.md b/packages/docs/site/docs/08-query-api/01-index.md index 327a39d1e2..da1027db7c 100644 --- a/packages/docs/site/docs/08-query-api/01-index.md +++ b/packages/docs/site/docs/08-query-api/01-index.md @@ -24,7 +24,7 @@ You can go ahead and try it out. The Playground will automatically install the t | Option | Default Value | Description | | ---------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `php` | `8.0` | Loads the specified PHP version. Supported values: `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, `latest` | -| `wp` | `latest` | Loads the specified WordPress version. Supported values: `6.0`, `6.1`, `6.2`, `6.3`, `6.4`, `latest`, `nightly`, `beta` | +| `wp` | `latest` | Loads the specified WordPress version. Supported values: The last three major WordPress versions. As of April 4th 2024 that's `6.3`, `6.4`, `6.5`. You can also use these values: `latest`, `nightly`, `beta` | | `blueprint-url` | | The URL of the Blueprint that will be used to configure this Playground instance. | | `php-extension-bundle` | | Loads a bundle of PHP extensions. Supported bundles: `kitchen-sink` (for finfo, gd, mbstring, iconv, openssl, libxml, xml, dom, simplexml, xmlreader, xmlwriter), `light` (saves 6MB of downloads, loads none of the above extensions) | | `networking` | `yes` or `no` | Enables or disables the networking support for Playground. Defaults to `no` | diff --git a/packages/docs/site/docs/09-blueprints-api/02-using-blueprints.md b/packages/docs/site/docs/09-blueprints-api/02-using-blueprints.md index 72daadc008..c60f6b0bbc 100644 --- a/packages/docs/site/docs/09-blueprints-api/02-using-blueprints.md +++ b/packages/docs/site/docs/09-blueprints-api/02-using-blueprints.md @@ -20,20 +20,20 @@ For example, to create a Playground with specific versions of WordPress and PHP "$schema": "https://playground.wordpress.net/blueprint-schema.json", "preferredVersions": { "php": "7.4", - "wp": "5.9" + "wp": "6.5" } } ``` And then you would go to -`https://playground.wordpress.net/#{"preferredVersions": {"php":"7.4", "wp":"5.9"}}`. +`https://playground.wordpress.net/#{"preferredVersions": {"php":"7.4", "wp":"6.5"}}`. You won't have to paste links to follow along. We'll use code examples with a "Try it out" button that will automatically run the examples for you: diff --git a/packages/docs/site/docs/09-blueprints-api/03-data-format.md b/packages/docs/site/docs/09-blueprints-api/03-data-format.md index 8d577455db..bd2ab74d80 100644 --- a/packages/docs/site/docs/09-blueprints-api/03-data-format.md +++ b/packages/docs/site/docs/09-blueprints-api/03-data-format.md @@ -19,7 +19,7 @@ import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.m "landingPage": "/wp-admin/", "preferredVersions": { "php": "7.4", - "wp": "5.9" + "wp": "6.5" }, "phpExtensionBundles": ["kitchen-sink"], "features": { @@ -51,7 +51,7 @@ JSON files can be tedious to write and easy to get wrong. To help with that, Pla The `preferredVersions` property, unsurprisingly, declares the preferred of PHP and WordPress versions to use. It can contain the following properties: - `php` (string): The preferred PHP version to use. Defaults to 'latest'. Only accepts major versions like "7.4" or "8.0". Minor versions like "7.4.1" are not supported. -- `wp` (string): The preferred WordPress version to use. Defaults to 'latest'. Only accepts major versions like "5.9" or "6.0". Minor versions like "5.9.1" are not supported. +- `wp` (string): The preferred WordPress version to use. Defaults to 'latest'. Only accepts major versions like "6.5". Minor versions like "6.5.1" are not supported. Note that only the latest three major releases are supported as well as `"nightly"` and `"beta"`. ## PHP extensions diff --git a/packages/docs/site/docs/09-blueprints-api/08-examples.md b/packages/docs/site/docs/09-blueprints-api/08-examples.md index 5a1ee5ec11..3ac37fe732 100644 --- a/packages/docs/site/docs/09-blueprints-api/08-examples.md +++ b/packages/docs/site/docs/09-blueprints-api/08-examples.md @@ -181,3 +181,43 @@ Use the `writeFile` step to add code to a mu-plugin that runs on every request. }} /> You can share your own Blueprint examples in [this dedicated wiki](https://github.com/WordPress/wordpress-playground/wiki/Blueprint-examples). + +## Load an older WordPress version + +Playground only ships a few recent WordPress releases. If you need to use an older one, this Blueprint will help you. Just need to switch the version number in `"url": "https://playground.wordpress.net/plugin-proxy.php?url=https://wordpress.org/wordpress-5.9.9.zip"`. The oldest WordPress version supported this way is `5.9.9` as the SQLite integration plugin does not support older WordPress releases. + + diff --git a/packages/playground/website/src/components/playground-configuration-group/form.tsx b/packages/playground/website/src/components/playground-configuration-group/form.tsx index c45f805ba0..241e27133c 100644 --- a/packages/playground/website/src/components/playground-configuration-group/form.tsx +++ b/packages/playground/website/src/components/playground-configuration-group/form.tsx @@ -312,29 +312,43 @@ export function PlaygroundConfigurationForm({ > WordPress Version - +
+ +
+ + Need an older version? + +