Joomla User Manual

The Joomla Playground

The Joomla Playground is an application that allows you to load a functional Joomla installation into your browser in a minute or so. This is a quick way to explore Joomla's features and capabilities. Recommended demonstrations for newcomers to Joomla:

The rest of the content here is a copy of the Joomla Playground project README file.

Joomla Playground

A complete Joomla site in your browser tab: no server, no installation, no account. Try a Joomla version, test an idea, show something to someone, and throw it away, or keep it in your browser for later.

Start here: https://joomla-projects.github.io/joomla-playground/. That address shows the overview (at /overview/): the demos, the guided tours, testing a pull request and the other possibilities. The title in the playground's toolbar links to it.

Open an empty playground: https://joomla-projects.github.io/joomla-playground/?new. Every address with parameters starts a playground.

After a few seconds you see Joomla's administrator, already logged in as a Super User. Everything runs in your browser: PHP is compiled to WebAssembly, and the site and its database live in the tab's memory. Nothing is sent to a server.

Demos

  • Patch Tester: https://joomla-projects.github.io/joomla-playground/?blueprint=patchtester. Joomla with the Patch Tester installed. Click Fetch Data to get the open pull requests of Joomla from GitHub, then Apply Patch to test one. Without a GitHub token, GitHub allows 60 requests an hour; one Fetch Data uses about four. Click GitHub token… in the toolbar and enter one: the browser remembers it and gives it to the Patch Tester of every new playground. Use a fine-grained token with access to public repositories only (read-only) and no permissions, because the pages of the playground can read it, including the pull requests you test. Never put a token in a blueprint: anyone with the link can read it.

  • Test a pull request of Joomla: https://joomla-projects.github.io/joomla-playground/?pr=48831. Joomla with the Patch Tester, and in the toolbar a link to pull request 48831 and an Apply patch button. The site opens without the patch; the button applies it and shows the same page again, now with the changes. Revert patch takes them out again, so you can switch between before and after. Add &url= with the page the pull request changes, e.g. ?pr=48831&url=/administrator/index.php?option=com_config. The playground starts the Joomla nightly build of the pull request's branch (6.3-dev, 6.2-dev or 5.4-dev): the branch as it is now, not its last release. It says when it does not have that branch. The Patch Tester does not build changes to JavaScript, CSS or Vue (in media_source), so with it only PHP, template, language and XML changes show.

  • Test a pull request that needs a build: https://joomla-projects.github.io/joomla-playground/?pr=48901. For a pull request with the label NPM Resource Changed or Composer Dependency Changed, the playground uses the build of Joomla's CI instead of the Patch Tester: the package behind the pull request's Download check. The button Apply build lays it over the site: only the files that differ from the nightly build, with the built JavaScript and CSS. Revert build puts the original files back (changes to the database stay). Joomla's CI keeps those packages for about two weeks after the pull request's last commit; without one, the playground says so and falls back to the Patch Tester, as it does for a pull request of a branch the playground has no Joomla of (7.0-dev). &method=package or &method=patchtester chooses the method yourself. The packages come from artifacts.joomla.org, which needs the playground's CORS proxy; the playground reads only the files that differ (a few MB of the 35 MB package). A pull request that is behind its branch also takes the files it replaces back to before the newer commits of the branch: the status says so.

  • Multilingual site: https://joomla-projects.github.io/joomla-playground/?blueprint=heritage-demo. A site in English, Dutch, German, French and Spanish, with content about UNESCO World Heritage sites from the demonstration data of Clifford E Ford. It starts in a few seconds, from a prebuilt copy of the site. Add &fresh=1 to watch the blueprint build it in your browser instead: that takes about 45 seconds, plus a minute for the Smart Search index while you can already look around.

  • Weblinks: https://joomla-projects.github.io/joomla-playground/?blueprint=weblinks. Joomla with Weblinks installed, the component for a directory of links that used to be part of Joomla. It opens on its list in the administrator.

  • Guided tours of the User Guide: tutorials of the Joomla User Guide as guided tours. Each link opens a playground in the language of the tour, and the tour starts by itself. The tour shows the way to each page through the menu, and waits for you to do each step. All 34 tutorials of chapters 2 to 12, in English, German, Spanish, French, Italian, Dutch, Portuguese and Brazilian Portuguese, are in the list of tours. For example:

    The blueprints are in web/public/blueprints/tours/, one folder per language. They also make three changes to the Guided Tours plugin of Joomla: the tour does not start again inside dialogs such as Menu Item Type, a tour of an earlier playground in the same tab does not continue halfway, and the editor's dialogs and Joomla's Preview come above the tour's overlay, so they can be clicked.

Logging in

The playground logs you in to the administrator by itself. If you log out, or want to log in on the front end:

  • Username: admin
  • Password: different for every playground. The toolbar shows it (top left, "Super User: admin / …"), and so does the login form. A saved site keeps its password.

A session lasts 4 hours (Joomla's default is 15 minutes); you can change that under System > Global Configuration > System > Session Lifetime.

Using the playground

The toolbar above the site:

Button What it does
Site / Administrator Show the front end or the administrator of the site.
New Start a new, empty playground.
Start over Throw this playground away and start again from the same link (and blueprint).
Save… Keep this playground in your browser under a name. From then on, changes are saved as you work.
My sites Open, rename or delete the sites you saved.
Mail The mails the site sent. They are caught here, not delivered: try a password reset or a contact form.
Export Download the whole site as a zip.
Import… Start a playground from such a zip, e.g. one someone sent you.
GitHub token… With the Patch Tester: the GitHub token the browser remembers for it (see the Patch Tester above).

On the right:

  • Joomla switches the Joomla version (6.3-dev, 6.2-dev, 6.2, 5.4-dev or 5.4): a new temporary playground starts with it. The -dev versions are nightly builds of Joomla's branches. 6.3-dev is the development branch: the next minor version, which most pull requests are for. 6.2-dev and 5.4-dev are the branches of the releases, with the fixes for their next patch release. The playground takes a new nightly build on days a branch has changed, and moves on after each release (6.4-dev after 6.3.0). A saved site keeps the version it was made with.
  • PHP switches the PHP version (8.3, 8.4 or 8.5): a saved site reopens with it, a temporary playground starts again from the same link.
  • The Super User's name and password. Hover over the database driver for timings.

Temporary or saved?

  • A new playground is temporary: reloading the page or closing the tab throws it away.
  • After Save…, the address bar shows ?site=<name>. That address reopens the site, also after a reload or a browser restart, and it is listed under My sites.
  • A saved site stays in this browser only (in its private storage for this website). Use Export to move a site to another browser or computer, or to keep a copy elsewhere.
  • A saved site can be open in one tab at a time.

Good to know

  • Use a recent Chrome, Edge or other Chromium browser; Firefox and Safari are not tested yet.
  • Languages: System > Install Languages works. The playground has the accredited language packs on board, so installing one takes a few seconds. ?language=nl-NL starts a playground in that language (see below).
  • The site reaches the internet through your browser, so only servers that allow requests from other websites (CORS) answer. Installing extensions from URLs or updating them mostly does not work: download the zip and use System > Install > Extensions > Upload Package File. A link or blueprint can install extensions from hosts that allow it (see below).
  • The Mail inbox keeps the mails until the page is reloaded.
  • Each tab is its own playground, with its own site and database.
  • Clearing your browser's site data for this address deletes the saved sites.

Setting up a playground with a link

A link can say how a new playground should look. Add these to the address:

Parameter Example What it does
joomla ?joomla=5.4 Joomla version: 6.2 (default) or 5.4; 5 also works. ?joomla=dev (or 6.3-dev) is the development branch; 6.2-dev and 5.4-dev are the nightly builds of the releases' branches
php ?php=8.3 PHP version: 8.3, 8.4 (default) or 8.5
url ?url=/index.php The page to open first; default /administrator/
login ?login=no Start logged out
extension ?extension=https://example.org/mod_hello.zip Install an extension package (repeatable)
language ?language=nl-NL Install that language and make it the default of the site and the administrator
blueprint-url ?blueprint-url=https://example.org/blueprint.json Set up the site with a blueprint
blueprint ?blueprint=heritage-demo Set up the site with one of the playground's own blueprints (from its prebuilt copy, if it has one)
fresh ?blueprint=heritage-demo&fresh=1 Run the blueprint, even if there is a prebuilt copy
pr ?pr=48831 Test a pull request of joomla-cms: the Patch Tester, and a button to apply and revert it; for a pull request that needs a build, the build of Joomla's CI instead
method ?pr=48901&method=package How pr is tested: package (the build of Joomla's CI) or patchtester

A blueprint is a small JSON file with the steps to set up a site. It can also be put in the address itself, after #. For example, this one installs Joomla's blog sample data, renames the site and opens the front end:

{
  "preferredVersions": { "joomla": "6.2", "php": "8.4" },
  "landingPage": "/index.php",
  "steps": [
    { "step": "importSampleData" },
    { "step": "setGlobalConfig", "values": { "sitename": "My demo" } }
  ]
}

The steps:

Step Properties What it does
installExtension url Install an extension package (zip)
enableExtension element, type, folder, client, params Enable an extension and set its options, e.g. {"element": "debug", "type": "plugin", "folder": "system"}
importSampleData type (default blog), group, query Install Joomla's sample data, or data of a plugin that works like it
setGlobalConfig values Set Global Configuration options (properties of configuration.php)
setSiteLanguage language, administrator Make a language the default (its pack is installed if needed)
runSql sql Run SQL statements (MySQL syntax; #__ is the table prefix)
runPHP code Run PHP code in the site's root folder
writeFile path, data Write a file into the site
unzip url, to Unpack a zip into the site
login Log in as the Super User (done by default)
installLanguage language, publish Install a language and publish its content language
addModule module, title, position, client, params, language Publish a module on all pages
addArticle title, text, category, language, featured Add a published article
addUserGroup title, parent Add a user group
disableExtension element, type, folder, client Disable an extension
indexSmartSearch Build the Smart Search index, like its Index button

Any step can have "background": true: it then runs after the playground is ready, while you use it, and the toolbar shows its progress.

Downloads (extension, installExtension, unzip) need a host that allows it (CORS headers), such as GitHub Pages or raw.githubusercontent.com; release downloads on GitHub do not. URLs in a blueprint are relative to the blueprint. If a step fails, the playground still starts and the toolbar shows the error.

Putting an exported site on a server

An export (Export in the toolbar) is a complete Joomla site that runs on SQLite, with the playground's database driver and its database in data/joomla.sqlite. It runs on an ordinary PHP web server, without MySQL. That is fine for a demo or test site. Joomla itself does not support SQLite, so for a real site, move it to MySQL.

You need PHP 8.3 or newer with pdo_sqlite.

  1. Unpack the export in the web root.

  2. Edit configuration.php:

    • $live_site = '';
    • $tmp_path and $log_path: the full paths of tmp and administrator/logs on the server;
    • $secret: a new random string. The playground's is the same in every playground.
  3. Protect the database. data/joomla.sqlite holds the whole site, password hashes included. On Apache, data/.htaccess blocks it. On nginx, add a rule that denies /data/, or move the file outside the web root and set $db in configuration.php to its path. PHP must be able to write the file and the data folder.

  4. Set a new password for the Super User. The playground's password was public in its toolbar:

    php cli/joomla.php user:reset-password --username=admin
    

Optionally, remove the playground's certificate from libraries/vendor/composer/ca-bundle/res/cacert.pem: the block between the two "Joomla Playground CA" lines. Its private key is gone, so it does no harm, and the next Joomla update replaces the file anyway.

Running your own copy

The playground is a static website: build it once and host it on any web server with HTTPS, such as GitHub Pages. See docs/DEVELOPMENT.md for building, running it locally and the tests.

How it works and what is next

  • docs/REPORT.md: how it works, what was tried and measured.
  • docs/PLAN.md: what comes next, such as choosing Joomla and PHP versions, installing extensions from a URL, and blueprints that set up a site.

Comparable to WordPress Playground, whose PHP-in-WebAssembly runtime it uses.

License

GNU General Public License version 2 or later, like Joomla and WordPress Playground.

Credits

The playground runs on code from the WordPress community, both GPL-2.0-or-later like Joomla. No WordPress itself (core, plugins or themes) is used.

  • @php-wasm (WordPress Playground, npm, version 3.1.60): PHP compiled to WebAssembly, the runtime the whole playground stands on.

    Package Used for
    @php-wasm/web-8-3, -8-4, -8-5 The compiled PHP binaries, with their extensions and ICU data
    @php-wasm/web Loading PHP in the browser, and PHP's network access through fetch() (tcpOverFetch)
    @php-wasm/universal The PHP class, PHPRequestHandler (a request becomes a PHP run), setPhpIniEntries
    @php-wasm/fs-journal Noting which files change, for saving a site as a small snapshot
    @php-wasm/util Catching sendmail for the Mail inbox
    @php-wasm/node Running Joomla with WebAssembly PHP in Node, for the integration tests

    Other packages come with them as dependencies, such as @php-wasm/web-service-worker and @php-wasm/logger.

  • WP_MySQL_On_SQLite (wordpress/mysql-on-sqlite, Composer, version 3.1.1): MySQL emulated on SQLite, in pure PHP. The default database driver, mysqlonsqlite, is built on it, so Joomla runs its MySQL code and install SQL unchanged.

Written for this playground, though several parts follow WordPress Playground's ideas: the page, the PHP worker and the service worker; the blueprints (in the shape of WordPress's Blueprints v1, with Joomla's own steps); the CORS proxy; both Joomla database drivers, the schema converter and the bundle builds.

The demonstration data of the multilingual demo is by Clifford E Ford (plugin, module).