# 12: WordPress - Build Your Website

WordPress is the most popular platform for building websites and blogs. With Infinity Tools, you can install WordPress securely on your own server with just a few steps. For everything beyond installation and basic usage, see the [official WordPress documentation](https://wordpress.org/support/).

## What is WordPress? (Simple Explanation)

**WordPress** lets you create a website or blog using themes and plugins — no coding required. You manage posts, pages, and media from a friendly dashboard, and extend features with plugins (contact forms, SEO, e‑commerce, and more).

- ✅ **Easy to use** dashboard for content
- ✅ **Thousands of themes** to change the look
- ✅ **Plugins** for features like forms, SEO, shops
- ✅ **You own it** — runs on your server

## Prerequisites

Before installing WordPress, make sure you have:

- ✅ **Traefik installed** (from Chapter 4) for HTTPS and domains
- ✅ **Docker running** (from Chapter 3)
- ✅ **Apprise installed** (from Chapter 5) for notifications
- ✅ **Borgmatic installed** (from Chapter 6) for automated backups (optional but recommended)
- ✅ **A domain name** (recommended) and email for SSL certificates

**Interdependencies:** WordPress uses a database (MariaDB). Database backups integrate with Borgmatic (Chapter 6), and Borgmatic notifications rely on Apprise (Chapter 5).

## Step 1: Start Infinity Tools

Connect to your server via SSH and start Infinity Tools:

```
sudo infinity-tools
```

### Open Applications

1. Go to **📱 APPLICATIONS**
2. Select **WordPress**
3. Choose **Install WordPress**

## Step 2: Choose HTTPS Mode

When prompted:

```
Use Traefik for SSL? (Y/n)
```

- **Y (recommended):** Uses your domain and automatic SSL via Traefik
- **N:** Standalone mode using a direct port (HTTP or self‑signed HTTPS)

## Step 3: Enter Your Domain (Traefik Mode)

Examples:

- `myblog.yourdomain.com`
- `www.yourdomain.com` (will redirect to the main domain)

No domain? Pick a port when asked (for local access only).

## Step 4: Optional Redis Cache

You can enable a performance cache called **Redis**. If you enable it during installation, Infinity Tools sets up a Redis container for you.

### Recommended free plugin

Install the free plugin **Redis Object Cache** to speed up WordPress:

- From your dashboard: **Plugins → Add New**
- Search for **Redis Object Cache** by Till Krüss
- Click **Install**, then **Activate**
- Go to **Settings → Redis** and click **Enable Object Cache**

[Redis Object Cache plugin (wordpress.org)](https://wordpress.org/plugins/redis-cache/)

## Step 5: Wait for Installation

Setup usually takes a few minutes. WordPress, the database, and (optionally) Redis will be created.

## Step 6: Open Your Site

- **Traefik mode:** Visit `https://your-domain`
- **Standalone mode:** Visit the IP and port shown by the installer (e.g., `http://SERVER_IP:PORT`)

Complete the WordPress setup wizard and create your admin account.

## Step 7: Verify It’s Running

In Infinity Tools, go to **📊 STATUS &amp; HEALTH → STATUS**. You should see WordPress, the database, and (if used) Redis running.

## Recommended Next Steps

- ✅ **Choose a theme** that fits your site
- ✅ **Install key plugins** (SEO, forms, security)
- ✅ **Enable Redis Object Cache** if you set up Redis
- ✅ **Backups**: confirm Borgmatic includes WordPress data

## Where Your Data Lives

- `/opt/speedbits/wordpress/wp_data/` — WordPress files
- `/opt/speedbits/wordpress/db_data/` — Database files (MariaDB)
- `/opt/speedbits/wordpress/redis_data/` — Redis data (if enabled)

## Troubleshooting

### Can’t access the site

- Check Traefik is running: `docker ps | grep traefik`
- Verify your domain points to your server (DNS)
- Wait a few minutes for SSL certificates
- View logs: `docker logs wordpress`

### Database connection error

- Check database container: `docker ps | grep wp-db`
- Confirm password file: `/opt/speedbits/wordpress/db_password.txt`
- Restart: `cd /opt/speedbits/wordpress && docker compose restart`

### Enable HTTPS in standalone mode

Standalone HTTPS uses a self‑signed certificate and may show a browser warning. Click “Advanced → Proceed”, or switch to Traefik for trusted HTTPS.

## Quick Reference

**Check containers:**

```
docker ps | grep -E "wordpress|wp-db|redis"
```

**View logs:**

```
docker logs wordpress
```

**Restart services:**

```
cd /opt/speedbits/wordpress && docker compose restart
```

## Helpful Resources

- [Official WordPress documentation](https://wordpress.org/support/)
- [Redis Object Cache plugin](https://wordpress.org/plugins/redis-cache/)