Updating the core
Because the core (htdocs/_fegg/core/) and the project (htdocs/_fegg/site/) are separate, security fixes and new features of Fegg can be rolled out to each project by replacing the core, the same way you update WordPress itself.
Routine updates
./fegg-cli core:status # current version, and whether core files were changed
./fegg-cli core:update --dry-run # show the difference to the latest release (changes nothing)
./fegg-cli core:update # update to the latest tag (vX.Y.Z)
./fegg-cli core:update v5.1.0 # update to a given version
npm run build:scss # rebuild the CMS CSS if htdocs/cms/scss changed
- The release is fetched with
git. If you can clone from GitHub over SSH (git clone git@github.com:...works for you), no token is needed. - Only core files are replaced:
htdocs/_fegg/core/,htdocs/_fegg/.htaccessandhtdocs/cms/.site/,htdocs/index.php,htdocs/.htaccessandfegg-cliare not changed. - If core files were edited in the project, the command lists them and stops. Move those changes to overrides in
site/(see Directory structure) and run it again. Add--forceonly if you really want to overwrite them. - The replaced files are kept in
htdocs/_fegg/site/data/core-backup/<old version>-<timestamp>/. - After the update, the template cache is cleared and
fegg-cli migrationruns automatically. - Finally, the
core/UPGRADE.mdsections for every version crossed are printed. They list what you have to change by hand (entry files,.htaccess, deprecated APIs). Read them.
Run the tests and check the site, then commit. git status should show only core files.
Changing the source repository
By default the release is fetched from git@github.com:lionheart-group/lh-fegg-skelton.git. To use another repository (a fork, or HTTPS), set it in the project:
<?php
defined('FEGG_CORE_DIR') || exit;
$fegg_update['repository'] = 'https://github.com/lionheart-group/lh-fegg-skelton.git';
The environment variable FEGG_UPDATE_REPO takes precedence over this file.
When the server has no SSH (FTP-only hosting)
- Run
./fegg-cli core:updatein your local working copy, then run the tests and check that everything works. - Commit the changed files.
- Upload
htdocs/_fegg/core/andhtdocs/cms/(including the built CSS) over FTP. Uploadhtdocs/_fegg/.htaccessonly if it changed. fegg-cli migrationcannot run on the server. For versions that change tables, either upload a database file built locally or open/cms/migrate/in the CMS.- Check the live site with
./fegg-cli doctor https://example.com.
Merging upstream with git
You can also update by adding the skeleton repository as upstream and merging a release tag:
git remote add upstream git@github.com:lionheart-group/lh-fegg-skelton.git
git fetch upstream --tags
git merge v5.1.0
If the project only edited site/, there are no conflicts in the core. The skeleton's sample files in site/ (sample controllers and templates) may also have changed; in that case keep the project's version.
Versions
| Version | Meaning |
|---|---|
| Patch (5.0.x) | Fixes inside the core. core:update alone is enough |
| Minor (5.x.0) | New features. Optional work for projects is described in UPGRADE.md |
| Major (x.0.0) | Changes that require fixes to project code |
The full text, including the release procedure for skeleton maintainers, is in docs/updating.md of the skeleton repository.