Skip to content

Custom repositories

Robert Isoski edited this page Jan 14, 2020 · 8 revisions

What are "Custom repositories" (WonderCMS 3.x.x and above)

The "Custom repository" field in the Settings->Themes or Settings->Plugins enables you to install a theme (or plugin) that is not listed in the official WonderCMS repository.

It also enables you to serve your theme or plugin to other users.

You can provide your theme/plugin users with a link to your theme or plugin repository. GitHub or GitLab are supported.

How to create a custom repository - a theme or plugin you can share with the world

As a plugin or theme maintainer, a few files must be provided for the theme/plugin to be correctly installed for WonderCMS users.

Note: There's example repositories which you can use/fork to make it easier at the bottom of this article.

  • Custom theme repository requirements

    Your repository must include the following files:

    • theme.php contains your theme and all WonderCMS theme elements
    • style.css must be inside a /css folder
    • version 3.0.0
    • summary short summary
    • preview.jpg compressed screenshot of your theme
  • Custom plugin repository requirements

    Your plugin repository must include the following files:

    • plugin-name.php contains your plugin code
      • IMPORTANT: plugin-name.php must be the same as the plugin folder name
    • version 3.0.0
    • summary short summary
    • preview.jpg compressed screenshot of your plugin

Install theme or plugin to your website

After finishing creating a custom theme/plugin repository, login to your website and open Settings -> Themes (or Plugins) and scroll to the bottom.

Paste your repository URL (example: https://github.com/yourUsername/yourThemeOrPlugin) and click "Add". Your theme/plugin should be now listed in the Settings -> Themes/Plugins section.

How to send a theme/plugin update to users or your website

  • Commit new changes to your theme/plugin files on Github.
  • Change the version file (eg: from 3.0.0 to 3.0.1) after you've confirmed everything is working.
  • Users will receive an "Update" notification in their Settings panel.
    • This will happen either after 24 hours OR when the users manually click the "Check for updates" button in the Settings panel.
  • When "Update" is clicked, all the users existing theme/plugin (from your changed files) will be overwritten with the latest ones from your theme/plugin repository.

Related information

Example projects to fork/clone

Clone this wiki locally