How to Manage Micro-sites with Drupal 8?
Numerous situations might come about where you may be tempted to create a series of microsites for the organisation or business you own. It can be anything—launching a new product, starting a new service, advertising an event etc. And when you’re with Drupal, the list of benefits and advantages are endless. Below are the detailed advantages of launching and running microsites with the help of Drupal.
Ever since its original version came out Drupal has ingrained a feature for the sake of running multi-sites. This involved the running of many sites from one single code-base installation, which means that they share the same core system and contribute various themes and custom modules. Every single multi-site has a database, configuration, settings, content etc. This means that it is possible to carry out more than one update. Therefore, multi-sites could actually be an option.
There are reasons micro-sites should be used. For example, it is quite a compelling option to have a single database to maintain. It would be useless to use forked codebases since they would become unloved too soon. Also, using multi-sites would imply that only a single hosting platform needs to be maintained. This also construes a huge advantage.
Secondly, if you do micro-site installations, they would be able to make much better use of resources in the server, physical, personnel, and the financial fields. Because micro-sites of a single entity would share a common core and other modules, that code would only need to go once into the Op-code cache. By this, server resources are saved to a greater extent.
It should be noted that several proposals have already come forward to decrease support for micro-sites in Drupal, maybe even eradicate it completely. The basic argument is that micro-sites are old-fashioned. However, this is rarely true, especially where the developments by Git and Composer are concerned. This is the modern approach to multi-sites: The same code with different sites. This is what makes them so popular with website creators.
However, using Drupal is not completely free of problems. It is difficult to handle traffic spikes in one channel when it spills over to the others. Micro-sites usually make use of a common database server which often tolerates a huge amount of load. If one database is heavily loaded, then it may cause a domino effect, slowing down other databases. Running updates is also an issue. However, there are a lot of mechanisms to mitigate those. They are as follows:
- Do not employ or use a code which has not been tested out in a full-fledged manner.
- Always include staging and quality assurance phases as part of the release process. By following these two phases, you allow yourself more opportunities to detect and correct errors.
- Whether it is a shell script or continuous integration tool, it is always the best idea to automate every tool.
- The database codes should be designed so that they would be able to take care of the intervals before the database is updated. With more volatile updates, it is important that the time and day of the week are chosen carefully.
- Every single micro-site would require a different database, so you really could not manage all the content from a single site. That would involve a lot of posting and pulling of content from one place to another.
As we near the end of this article, we might just want to take a look at the other kinds of approaches to micro-site building using Drupal. A few are as follows:
Domain Access: To define the ‘domain access’, it is a collection of modules that arm the user with the right tools to run a group of affiliated sites from a single Drupal installation and one shared database. By using this module, you would be able to share content, configurations and user activity across a collection of sites.
Organic Groups: “Organic group” is a tool that allows a person to build a group within the Drupal site. Each such group would have its own user, moderator/s, administrative group, thread list, menu, and content.
Git: This is the best option so far and will give you innumerable advantages, such as independence of sites, design, single codebase and much stronger control over the updates.
Overall, it remains to be seen whether the trend of micro-sites endures the test of time in the near and distant future.