|
| 1 | +.. _php-drupal-integration: |
| 2 | + |
| 3 | +========================== |
| 4 | +Drupal MongoDB Integration |
| 5 | +========================== |
| 6 | + |
| 7 | +.. facet:: |
| 8 | + :name: genre |
| 9 | + :values: tutorial |
| 10 | + |
| 11 | +.. meta:: |
| 12 | + :keywords: php framework, code example, CMS, web app, authentication |
| 13 | + |
| 14 | +.. contents:: On this page |
| 15 | + :local: |
| 16 | + :backlinks: none |
| 17 | + :depth: 2 |
| 18 | + :class: singlecol |
| 19 | + |
| 20 | +Overview |
| 21 | +-------- |
| 22 | + |
| 23 | +In this guide, you can learn about the benefits of using MongoDB Atlas |
| 24 | +as the database for Drupal sites and navigate to a tutorial that |
| 25 | +demonstrates how to set up the MongoDB driver for Drupal. |
| 26 | + |
| 27 | +`Drupal <https://www.drupal.org/about>`__ is an open-source web content |
| 28 | +management system (CMS) written in PHP. Drupal provides simple content |
| 29 | +authoring, composability, and robust authentication features. |
| 30 | + |
| 31 | +The :ref:`php-drupal-tutorial` section of this guide links to a tutorial |
| 32 | +which you can follow to set up a Drupal site that connects to MongoDB Atlas. |
| 33 | + |
| 34 | +The :ref:`php-drupal-resources` section contains links to resources and |
| 35 | +documentation for further learning. |
| 36 | + |
| 37 | +Why Use MongoDB as the Database for Drupal Sites? |
| 38 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 39 | + |
| 40 | +Websites that seek to provide personalized user experiences must contain |
| 41 | +robust capabilities for user authentication. Sites that have many |
| 42 | +authenticated users might face performance impacts due to the complexity |
| 43 | +of retrieving entity data from multiple tables in a relational database. |
| 44 | +MongoDB supports eliminates the need for complicated table joins and |
| 45 | +thus increases data retrieval speed, enhancing user experience with |
| 46 | +components such as personalized dashboards and dynamic content feeds. |
| 47 | + |
| 48 | +When you use MongoDB as your site's database, Drupal stores entity |
| 49 | +instances as JSON objects that contain all revisions, translations, and |
| 50 | +field data. This flexible data structure decreases latency and allows |
| 51 | +Drupal to support personalized, user-focused experiences. |
| 52 | + |
| 53 | +MongoDB offers the following features that improve your Drupal sites: |
| 54 | + |
| 55 | +- Horizontal scaling: Distribute loads across multiple |
| 56 | + servers, making your database scalable for large user bases. |
| 57 | + |
| 58 | +- Integrated file storage: Store user files directly in the |
| 59 | + database instead of on the web server, simplifying hosting. |
| 60 | + |
| 61 | +- Full-Text search: Avoid implementing separate search |
| 62 | + solutions by leveraging the :atlas:`Atlas Search |
| 63 | + </atlas-search/atlas-search-overview/>` feature. |
| 64 | + |
| 65 | +- AI capabilities: Perform vector searches and integrate AI services by |
| 66 | + using the :atlas:`Atlas Vector Search |
| 67 | + </atlas-vector-search/vector-search-overview/>` feature. |
| 68 | + |
| 69 | +.. _php-drupal-tutorial: |
| 70 | + |
| 71 | +Tutorial |
| 72 | +-------- |
| 73 | + |
| 74 | +To learn how to install the MongoDB driver for Drupal and set up a site |
| 75 | +that uses MongoDB Atlas as its database, see the |
| 76 | +`How to Run Drupal on MongoDB <https://dev.to/mongodb/how-to-install-drupal-on-mongodb-atlas-2dg3>`__ |
| 77 | +tutorial on the DEV Community website. |
| 78 | + |
| 79 | +This tutorial demonstrates how to perform the following steps: |
| 80 | + |
| 81 | +1. Setting up a MongoDB Atlas account and deployment. |
| 82 | + |
| 83 | +#. Setting up an AWS EC2 medium instance. |
| 84 | + |
| 85 | +#. Connecting the EC2 instance to Atlas. |
| 86 | + |
| 87 | +#. Installing the following components: |
| 88 | + |
| 89 | + - Apache web server |
| 90 | + - MongoDB PHP Extension |
| 91 | + - Drupal web server |
| 92 | + - Drupal core patch |
| 93 | + |
| 94 | +#. Connecting your Drupal site to Atlas. |
| 95 | + |
| 96 | +#. Adding content to Drupal and viewing how it is stored in Atlas. |
| 97 | + |
| 98 | +#. Safely shutting down your web server. |
| 99 | + |
| 100 | +.. _php-drupal-resources: |
| 101 | + |
| 102 | +Resources |
| 103 | +--------- |
| 104 | + |
| 105 | +Learn more about Drupal and MongoDB by viewing the following resources: |
| 106 | + |
| 107 | +- `MongoDB module suite for Drupal <https://www.drupal.org/project/mongodb>`__ |
| 108 | +- `Drupal CMS User Guide <https://new.drupal.org/docs/drupal-cms>`__ |
| 109 | +- :website:`Podcast: PHP, Drupal and MongoDB with David Bekker |
| 110 | + </developer/podcasts/ep-185-php-drupal-and-mongodb-with-david-bekker/>` |
0 commit comments