Self-host WordPress with Levelrail

Verified

The world's most widely used content management system, self-hosted with its own database.

  • AuthorWordPressVerified by Levelrail
  • LicenceGPL-2.0-or-later
  • Memory512 MiB
  • Archarm64
  • Services2

How to self-host WordPress

  1. Pull the images

    2 images are pulled on your server.

    Show images
    • mysql:8.4
    • wordpress:6.6-apache
  2. Create the app

    2 services start in a single Compose app, with 2 named volume mounts for your data, on port 80.

  3. Fill in the secrets

    3 secrets are generated and stored encrypted, 5 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

WordPress requirements

Memory
About 512 MiB
Architectures
amd64 image published, arm64 tested
Ports
80
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
GPL-2.0-or-later, copyleft license
  • Verified. Verified on arm64 with image tag 8.4. Our CI ran this exact image version and it answered on its health path. Evidence
  • Host ports. It publishes port 80 on the host, so open them in the VPS firewall only if you want that.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then WordPress. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the WordPress docs page.

Deploy WordPress your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy WordPress from the CLI

levelrail-cli templates deploy wordpress --name my-wordpress

Deploy WordPress with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/wordpress/deploy

WordPress configuration

WordPress services

ServiceImagePortsVolumes
db mysql:8.4 none wordpress_db_data -> /var/lib/mysql
wordpress wordpress:6.6-apache 80 wordpress_data -> /var/www/html

WordPress environment variables

VariableServiceValue
MYSQL_DATABASE db Preset by the template
MYSQL_PASSWORD db Generated at deploy
MYSQL_ROOT_PASSWORD db Generated at deploy
MYSQL_USER db Preset by the template
WORDPRESS_DB_HOST wordpress Preset by the template
WORDPRESS_DB_NAME wordpress Preset by the template
WORDPRESS_DB_PASSWORD wordpress Generated at deploy
WORDPRESS_DB_USER wordpress Preset by the template

Ports and volumes

Ports
80
Volumes
2 named mounts: wordpress_db_data -> /var/lib/mysql, wordpress_data -> /var/www/html

WordPress FAQ

How much memory does WordPress need?

The catalog lists about 512 MiB of memory for WordPress across its 2 services.

Does WordPress run on arm64?

For WordPress, arm64 is tested; amd64 is image published.

What licence is WordPress under?

WordPress is licensed under GPL-2.0-or-later, which is copyleft, so changes you distribute must be shared under the same terms.

Does WordPress need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does WordPress bundle?

The template includes MySQL, running as its own service.

Which ports does WordPress use?

WordPress listens on port 80 inside the stack.

Where does WordPress keep its data?

In named volumes: wordpress_db_data mounted at /var/lib/mysql and wordpress_data mounted at /var/www/html.

Can I deploy WordPress on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id wordpress for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image mysql:8.4, wordpress:6.6-apache is what you deploy there.

levelrail-cli templates deploy wordpress --name my-wordpress