WordPress Deployment Example
WordPress is a popular open-source content management system (CMS) that powers millions of websites worldwide. With Instantly.run, deploying WordPress becomes effortless, with automated SSL certificates and domain management.
Step-by-Step Guide
This guide demonstrates how to deploy a WordPress instance using Instantly.run.
Deployment Command
docker run --context=instantly --name wordpress-site --domainname blog.example.com \
-e WORDPRESS_DB_HOST=db-host.example.com -e WORDPRESS_DB_USER=admin \
-e WORDPRESS_DB_PASSWORD=secret -e WORDPRESS_DB_NAME=wordpress \
-p 8080:80 -v ssd:/var/www/html
Command Breakdown
--context=instantly
: Ensures the container is managed under the Instantly.run context.--name wordpress-site
: Assigns the container a unique name for reference.--domainname blog.example.com
: Assigns the container a public domain.- Environment Variables:
WORDPRESS_DB_HOST
: The database host for WordPress.WORDPRESS_DB_USER
: The username for the database connection.WORDPRESS_DB_PASSWORD
: The password for the database connection.WORDPRESS_DB_NAME
: The name of the database.
-p 8080:80
: Maps port 80 in the container to port 8080 on the host.-v ssd:/var/www/html
: Mounts a volume to persist WordPress data.
Accessing the Deployment
- Public Domain: Once deployed, your WordPress site will be accessible at
https://blog.example.com
. - Automatic SSL: An SSL certificate will be automatically generated for the domain, and HTTP traffic will redirect to HTTPS.
Modifying the Deployment
To make updates (e.g., change the database host or add volumes), re-run the command with the updated parameters. For example, to change the volume mapping:
docker run --context=instantly --name wordpress-site --domainname blog.example.com \
-e WORDPRESS_DB_HOST=new-db-host.example.com -e WORDPRESS_DB_USER=admin \
-e WORDPRESS_DB_PASSWORD=secret -e WORDPRESS_DB_NAME=wordpress \
-p 8080:80 -v hdd:/var/www/html
Additional Configuration
For more configuration options, see the Bitnami WordPress Documentation.