---
title: "Deploy Drupal, Nextcloud & Custom PHP"
description: "Launch one-click Drupal and Nextcloud instances or host custom PHP 8.3–8.5 applications on Hosted EZ, plus tune the 11 curated php.ini overrides."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.hostedez.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Drupal, Nextcloud & Custom PHP

In addition to Static Sites, WordPress, and Laravel, Hosted EZ provides dedicated runtimes for **Drupal**, **Nextcloud**, and **Custom PHP**—all running isolated PHP-FPM (`8.3`, `8.4`, or `8.5`, default `8.5`) with OPcache, SFTP, File Manager, and the Browser Terminal.

## Drupal

Hosted EZ provisions **Drupal** with an auto-configured isolated MariaDB database, **Composer**, **Drush**, an anonymous nginx full-page microcache, isolated APCu object caching, and a background systemd Drush cron timer.

- **Document root**: `public_html/web` (Composer `vendor/` and `composer.json` remain safely outside the web root).
- **Admin login**: Reveal your generated credentials on the **Drupal Admin** card in **Site → Overview**, then sign in at `/user/login`.
- **Caching**: Anonymous pages are cached in nginx tmpfs (`10m` TTL) while automatically bypassing logged-in sessions (`SESS`/`SSESS` cookies), query strings, and `/admin`, `/user`, `/batch`, `/jsonapi`, `/cron`, and `/system/files` paths. APCu accelerates ChainedFast, page, and render cache bins.
- **PHP memory floor**: Drupal sites receive at least `512 MiB` PHP `memory_limit` by default even on Starter.

### Common Drush & Composer commands

Open **Site → Terminal** (`drush` is pre-wired with `--root=public_html/web`):

```bash
# Check Drupal installation & database status
drush status

# Rebuild all Drupal caches after config or theme changes
drush cr

# Install a contributed module via Composer and enable it
composer require drupal/pathauto
drush en pathauto -y

# Apply pending database and entity updates
drush updb -y
```

## Nextcloud

Hosted EZ installs the latest **Nextcloud** release automatically with a dedicated MariaDB database, isolated APCu object caching, an nginx theming microcache, background cron, and the `occ` CLI in the Browser Terminal.

- **Document root**: `public_html`
- **Admin login**: Reveal your generated credentials on the **Nextcloud Admin** card in **Site → Overview**, then open `/index.php/login`.
- **CalDAV & CardDAV**: Ready out of the box for Apple Calendar/Contacts, Thunderbird, and mobile DAV clients over HTTPS.
- **Memory floor**: Nextcloud sites receive at least `512 MiB` PHP `memory_limit` and a `1,024 MiB` container memory floor automatically.

### Common `occ` commands

Open **Site → Terminal** (`occ` is pre-wired with `apc.enable_cli=1`):

```bash
# Inspect Nextcloud version and installed status
occ status

# List enabled and disabled apps
occ app:list

# Toggle Nextcloud's internal maintenance mode during upgrades
occ maintenance:mode --status
occ maintenance:mode --on
occ maintenance:mode --off

# Rescan files or repair missing database indices
occ db:add-missing-indices
```

> **Adding custom domains to Nextcloud**
>
> After connecting a custom domain in **Site → Domains**, verify your domain is listed in Nextcloud's `trusted_domains` array (`occ config:system:get trusted_domains` or `public_html/config/config.php`).

## Custom PHP

Choose **Custom PHP** when deploying Symfony, Slim, CodeIgniter, Flight, bespoke PHP scripts, or migrating an existing PHP application that does not need a pre-installed CMS.

- **Document root**: `public_html`
- **PHP branches**: `8.5` (default), `8.4`, and `8.3`—switchable anytime without recreating the site.
- **Composer & CLI**: `php` and `composer` are pre-installed in **Site → Terminal**.
- **Databases**: Attach one or more Managed MariaDB databases anytime from the **Databases** tab. See [Managed MariaDB & Database Studio](/databases/mariadb).
- **Apache `.htaccess`**: Supported inside `public_html/` for custom `mod_rewrite` front-controller routing.

## PHP versions and `php.ini` overrides

On any PHP or CMS site (**WordPress**, **Laravel**, **Drupal**, **Nextcloud**, or **Custom PHP**), open **Site → PHP** to switch PHP branches (`8.3`, `8.4`, or `8.5`) or configure the **11 curated `php.ini` overrides**.

| Directive | Allowed Range | Default | Notes |
| --- | --- | --- | --- |
| `memory_limit` | `64 MiB` – plan max (`256` / `512` / `1,024 MiB`) | Plan max (`512 MiB` min for Drupal/Nextcloud) | Per-request PHP memory limit |
| `upload_max_filesize` | `2 MiB` – plan max (`64` / `128` / `256 MiB`) | Plan max | Must be `<= post_max_size` |
| `post_max_size` | `2 MiB` – plan max (`64` / `128` / `256 MiB`) | Plan max | Must be `>= upload_max_filesize` |
| `max_execution_time` | `10 s` – plan max (`120` / `180` / `300 s`) | Plan max | Maximum PHP script runtime |
| `max_input_time` | `10 s` – plan max (`120` / `180` / `300 s`) | `60 s` | Maximum time spent parsing request input |
| `max_input_vars` | `1,000` – `10,000` | `1,000` | Increase for large CMS menus or form builders |
| `date.timezone` | Valid IANA timezone (e.g. `America/New_York`) | `UTC` | `"Local"` is rejected; use standard IANA names |
| `display_errors` | `true` / `false` | `false` | Keep `false` in production; inspect **Site → Logs** instead |
| `short_open_tag` | `true` / `false` | `false` | Enable only for legacy templates using `<?` |
| `session.gc_maxlifetime` | `300` – `86,400 s` | `1,440 s` (24 min) | PHP session garbage collection lifetime |
| `opcache.enable` | `true` / `false` | `true` | Keep enabled in production for bytecode caching |

> **Security-locked PHP directives**
>
> Isolation directives (`open_basedir`, `disable_functions`, `auto_prepend_file`, `auto_append_file`, `expose_php`, `allow_url_include`, `extension`, `zend_extension`, `log_errors`, `error_log`, and `user_ini.filename`) are managed by Hosted EZ and cannot be overridden via `.user.ini` or the dashboard.

Source: https://docs.hostedez.com/deploy/drupal-nextcloud-php/index.mdx
