---
title: Deploy WordPress with AI
url: "/guides/wordpress/"
canonical_url: https://docs.blossom88.com/guides/wordpress/
markdown_url: https://docs.blossom88.com/guides/wordpress.md
summary: Deploy WordPress with AI on Blossom. Publish a website with managed MySQL,
  R2 media, and themes and plugins that survive Container replacement.
categories:
- deployment
- publishing
---

# Deploy WordPress with AI

[WordPress](https://wordpress.org/) is a publishing platform for websites and
blogs. Write posts in its visual editor, choose a theme, and add features with
plugins.

Run your own site with managed MySQL and media in your S3 or Cloudflare R2
bucket. A [Persistent Service](/docs/apps/persistent-services/)
keeps themes and plugins installed through WordPress Admin.

[Install the Blossom CLI and skill](/learn/getting-started/install/)
on your agent's machine and choose a Blossom Cloud Location when you log in.
You can also use
[Blossom BYOC (bring your own cloud)](/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Ask Your Agent

> **Ask your AI agent:** Deploy WordPress on Blossom with managed MySQL and R2 for media. Help me publish my first post.

> Follow this guide: https://docs.blossom88.com/guides/wordpress/



Your agent checks the current
[WordPress requirements](https://wordpress.org/about/requirements/), selects
compatible maintained releases, and saves the deployment configuration.

| Part | Purpose |
|---|---|
| WordPress Persistent Service | Serves the website and keeps installed themes, plugins, and WordPress files |
| Managed MySQL | Keeps posts, accounts, settings, and media metadata |
| Your S3 or R2 bucket | Keeps uploaded media and generated image sizes |

Use a managed MySQL version supported by WordPress. Link the Database instance
to the Environment and map its connection URL to the official image's
`WORDPRESS_DB_*` settings at every start.

Keep the installer behind **Blossom Account access** until your owner account
is created. Save strong authentication keys and salts as private Environment
variables, and keep them stable through updates. Then open the site to readers;
WordPress Admin still requires its own login.

Configure an email provider before relying on password resets or inviting
other editors. Test delivery to an address you control.

### Connect Your Media Bucket

Create a dedicated media bucket in your own provider account and a credential
restricted to that bucket, preferably its upload prefix. Supply the endpoint,
region, bucket, media URL, and credential through a private environment file.

The tested integration uses Human Made's
[S3 Uploads plugin](https://github.com/humanmade/S3-Uploads), installed with
Composer. Your agent configures its S3 client for R2's endpoint and path-style
requests. Temporary credentials also need their **session token** passed to
the client.

Publication media needs a public delivery URL, such as a custom domain on the
R2 bucket. Keep private documents, backups, and deployment files in a separate
private bucket. R2 doesn't use S3 object ACLs; configure the plugin accordingly
and control public access through the bucket's delivery settings.

### Keep Admin-Installed Themes and Plugins

Mount the Persistent Service's Volume at the official image's WordPress
directory. Install the upload integration and its locked Composer dependencies
there, load the autoloader before WordPress starts, and block web access to
dependency files and Composer metadata. Keep administration tools outside the
public document root.

This preserves the familiar workflow: install and update themes and plugins
in WordPress Admin. **Keep one Container for this Service.** R2 moves media
off its disk; themes and plugins still need the Volume.

## Publish Your First Post

> **Ask your AI agent:** Help me publish a post with an image, choose a theme, and install a plugin.

> Follow this guide: https://docs.blossom88.com/guides/wordpress/



Open WordPress Admin, upload an image, and publish a post. Open the public post
in a separate browser session to check its image and layout without logging in.

![A WordPress post with an R2-hosted image, served by Blossom.](/assets/images/guides/wordpress/publication.png)

![WordPress Admin showing the site's published posts.](/assets/images/guides/wordpress/admin.png)

<details class="optional-reading" markdown="1">
<summary>Commands behind the deployment</summary>

Create an App and a prebuilt-image Environment using the compatible official
WordPress image selected by your agent:

    blossom app:create --data app.yml
    blossom environment:create --data environment.yml

Create managed MySQL and link it to the Environment:

    blossom database_instance:create --data database_instance.yml --follow
    blossom environment_link:create --data environment_link.yml

environment_link.yml:

```yaml
environment_link:
  environment_id: environment-100
  target_type: DatabaseInstance
  target_id: database_instance-100
  var_name: DATABASE_URL
```

The startup command maps that URL to the official image's database settings,
then runs its normal entrypoint. Derive the canonical HTTPS site URL from
`BLOSSOM_SERVICE_HOST`, or configure your final custom domain.

Add storage under the web Service:

```yaml
service:
  # Environment, image, startup command, resources, and readiness check go here.
  name: web
  port: 80
  publicly_exposed: true
  desired_size: 1
  storage:
    size_gib: 10
    mount_path: /var/www/html
    availability: shared
```

Create the Service, push private settings, and deploy:

    blossom service:create --data service.yml
    blossom env_var:push --environment environment-100 --file .env.production
    blossom environment:deploy --id environment-100 --follow
    blossom shell --service service-100

Your agent initializes WordPress and installs the R2 integration through
Shell, without putting passwords in command arguments. Once installed, use
`/wp-login.php` for the HTTP readiness check. Keep setup behind Account access
until the owner account is ready.

</details>

## Keep Your Site Through Updates

> **Ask your AI agent:** Update my WordPress site and check that the post, media, theme, and plugin are still there.

> Follow this guide: https://docs.blossom88.com/guides/wordpress/



Back up MySQL, the Service Volume, and the bucket. These keep different parts
of the site; a database backup alone doesn't include themes or uploaded media.
See [Backups](/docs/backups/) and
[Persistent Service backups](/docs/apps/persistent-services/#back-up-a-volume).

Update WordPress core, themes, and plugins through their supported update
tools. The core files live on the Volume, so changing the Container image
alone doesn't update an existing WordPress installation. Keep the PHP image
and Composer dependencies maintained too.

Blossom stops the old writer before replacing a Persistent Service Container.
Expect a brief interruption. Check the public post and log back into Admin
afterward.

For multiple web Containers, package identical themes and plugins in a
versioned image and coordinate scheduled tasks. That's a different deployment
workflow from installing code independently in each Container through Admin.

## What You Get

- Your own WordPress site at an HTTPS address
- WordPress Admin for publishing, themes, and plugins
- Managed MySQL and media in your own S3 or R2 bucket
- A Volume that keeps installed site files through Container replacement
