drupal / localgov_microsites
LocalGov Drupal Microsites distribution
Package info
git.drupalcode.org/project/localgov_microsites.git
Type:drupal-profile
pkg:composer/drupal/localgov_microsites
Requires
- php: >=8.3
- drupal/admin_toolbar: ^3.1
- drupal/autosave_form: ^1.3
- drupal/core: ^11.3
- drupal/default_content: ^2.0@alpha
- drupal/domain_path: ^1.6
- drupal/gin: ^3.0 || ^4.0 || ^5.0
- drupal/gin_login: ^2.0.3
- drupal/gin_toolbar: ^1.0 || ^2.0 || ^3.0
- drupal/localgov_blogs: ^1.1
- drupal/localgov_claro: ^2.1.0
- drupal/localgov_core: ^2.12 || ^3.0
- drupal/localgov_directories: ^3.1
- drupal/localgov_events: ^3.0
- drupal/localgov_guides: ^2.1
- drupal/localgov_live_preview: ^1.1@beta
- drupal/localgov_microsites_base: ^2.0 || ^3.0
- drupal/localgov_microsites_colour_picker_fields: ^1.0.0-beta1
- drupal/localgov_microsites_group: ^4.0
- drupal/localgov_news: ^2.3
- drupal/localgov_page: ^1.2
- drupal/metatag: ^2.0.2
- drupal/redirect: ^1.9
- drupal/require_login: ^3.0
- drupal/responsive_preview: ^2.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- 5.x-dev
- 5.1.0
- 5.0.0
- 4.x-dev
- 4.6.0
- 4.5.1
- 4.5.0
- 4.3.0
- 4.2.1
- 4.2.0
- 4.1.0
- 4.0.2
- 4.0.1
- 4.0.0
- 4.0.0-beta4
- 4.0.0-beta3
- 4.0.0-beta2
- 4.0.0-beta1
- 4.0.0-alpha5
- 4.0.0-alpha4
- 4.0.0-alpha3
- 4.0.0-alpha2
- 4.0.0-alpha1
- 3.x-dev
- 3.0.0-alpha2
- 3.0.0-alpha1
- 2.x-dev
- 2.1.0-beta6
- 2.1.0-beta5
- 2.1.0-beta4
- 2.1.0-beta3
- 2.1.0-beta2
- 2.1.0-beta1
- 2.0.0-beta2
- 2.0.0-beta-1
- 1.0.0-alpha1
- dev-release-4.x
This package is auto-updated.
Last update: 2026-11-19 12:09:26 UTC
README
LocalGov Drupal Microsites
Drupal distribution and install profile to help UK councils collaborate and share Drupal code for publishing website content across a number of microsites from a single Drupal installation.
This repository is the Drupal installation profile that is best installed using composer to require a project template, localgov_microsites_project, to scaffold and build the codebase which includes this profile.
Please see https://www.drupal.org/project/localgov_microsites_project
Funding
This work was initially funded by the Local Digital Fund (https://www.localdigital.gov.uk/fund/) from the Ministry of Housing, Communities & Local Government (MHCLG).
Supported branches
We are actively supporting and developing the 5.x branch for Drupal 11. We will support the 4.x branch for Drupal 10 until Drupal 10 is out of support.
The 1.x, 2.x and 3.x branches are no longer actively supported and not recommended for new sites.
If you are still using the 1.x, 2.x or 3.x branches on your site, please create an issue to let us know.
Documentation
Further technical documentation can be found at https://project.pages.drupalcode.org/localgov_docs/.
Installation
For installation guidance please se https://git.drupalcode.org/project/localgov_microsites_project
Requirements for installing LocalGov Drupal locally for testing and development
To install LocalGov Drupal locally you will need an appropriate versions of:
- PHP (see https://www.drupal.org/docs/system-requirements/php-requirements)
- A database server like MySQL (see https://www.drupal.org/docs/system-requirements/database-server-requirements)
- A web server like APache2 (see https://www.drupal.org/docs/system-requirements/web-server-requirements)
Many of us use the Lando file included to run a local docker environment for testing and development, but seom people prefer to run the web servers natively on their host machine.
PHP requirements
We follow Drupal's PHP recommendations: https://www.drupal.org/docs/system-requirements/php-requirements#versions
We currently recommend and test against PHP 8.3.
Developer notes for default content
This profile creates a single node of demo content using the https://www.drupal.org/project/default_content module.
This node includes layout paragraphs and paragraph content to demonstrate some of the content components available for a new microsite. When a new microsite is created, it attempts to clone this node into the new microsite.
As developers, we often want to update the default content, using drush.
To export an item of content and all references:
drush dcer <entity type> <entity id> --folder=profiles/contrib/localgov_microsites/content/
So for node/1:
drush dcer node 1 --folder=profiles/contrib/localgov_microsites/content/
Composer and Lando
To install locally, you will need Composer and we recommend using ddev for a consistent developer environment.
Please also see the Lando requirements section for details of Docker requirements for different operating systems.
https://docs.lando.dev/basics/installation.html#system-requirements
Installing locally with composer and ddev
To install LocalGov Microsites locally for testing or development, use the Composer-based project template.
Change MY_PROJECT to whatever you'd like your project directory to be called.
composer create-project --stability stable drupal/localgov_microsites_project:^5.0 MY_PROJECT --no-install
Change directory into the MY_PROJECT directory and run ddev start.
cd MY_PROJECT
ddev start
Once ddev has finished building, use ddev to run composer install and the site installer.
ddev ssh;
composer install;
drush si localgov_microsites -y;
Note: As you might be running a different version of PHP on your host machine from the version that ddev runs, it is advisable to run composer install from within ddev. This ensures dependencies reflect the PHP version that the webserver is actually running.
Composer notes
If developing locally and you want to force composer to clone again
from source rather than use composer cache, you can add the --no-cache flag.
composer create-project drupal/localgov_microsites_project --stability alpha --no-cache --no-install MY_PROJECT
If you just want to pull in the latest changes to LocalGov Drupal run composer
update with the --no-cache flag.
composer update --no-cache
If you want to be sure you are getting the latest commits when developing, clearing composer cache, deleting the folders and re-running composer update seems to be a solid approach:
rm -rf web/profiles/contrib/ web/modules/contrib/ web/themes/contrib/;
composer clear-cache; composer update --with-dependencies --no-cache;
ddev start;
ddev ssh;
drush si localgov_microsites -y;
If you run into memory limit errors
when running Composer commands, prefix the commands with COMPOSER_MEMORY_LIMIT=-1.
For example, to install the project run:
COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/localgov_microsites_project MY_PROJECT
Contributing
See CONTRIBUTING.md for current contribution guidelines.
Issue tracking
Most issues will be tracked in this repository
Development issues relating to specific projects or module should be tracked in the project repository.
Coding standards
PHP CodeSniffer is installed as a dev dependency by Composer and configured to use Drupal coding standards and best practices. It is a good idea to run these before committing any code. All code in pull requests should pass all CodeSniffer tests.
To check code using Lando run:
ddev phpcs
To attempt to automatically fix coding errors in Lando run:
ddev phcbf
Coding standards resources
Running tests
The included phpunit.xml.dist file contains configuration for automatically
running the LocalGov Microsites test suite.
To run all LocalGov Drupal tests with DDEV use:
ddev phpunit
To run all the tests for a specific module use:
ddev phpunit web/modules/contrib/localgov_my_module
Tests can be filtered using the --filter option. To only run a specific test
use:
ddev phpunit --filter=myTestName
Testing resources
- PHPUnit documentation
- Drupal 8 PHPUnit documentation
- Drupal 8 testing documentation
- Workshop: Automated Testing and Test Driven Development in Drupal 8
Maintainers
For a list of maintainers, please see https://www.drupal.org/project/localgov_microsites_project