# WordPress Applications

> Deploy WordPress sites with persistent storage and automatic updates.

WordPress on Ploi Cloud
-----------------------

Ploi Cloud provides optimized support for WordPress applications, with flexible deployment options and automated management features.

### WordPress Deployment Options

- **Source Control Mode** - Deploy WordPress from a Git repository. Ideal for version-controlled themes, plugins, and custom code.
- **Managed Mode** - WordPress files are stored in a persistent 20GB volume. Install themes and plugins directly from the WordPress admin.

### Initial Setup

When creating a WordPress application:

1. Select "WordPress" as the application type
2. Choose your WordPress version
3. Select deployment mode (source control or managed)
4. Add a MySQL database service
5. Configure your domain settings

### Database Configuration

Database credentials are automatically injected as environment variables:

```
  define(<span class="hljs-string">'DB_NAME'</span>, getenv(<span class="hljs-string">'WORDPRESS_DB_NAME'</span>));
  define(<span class="hljs-string">'DB_USER'</span>, getenv(<span class="hljs-string">'WORDPRESS_DB_USER'</span>));
  define(<span class="hljs-string">'DB_PASSWORD'</span>, getenv(<span class="hljs-string">'WORDPRESS_DB_PASSWORD'</span>));
  define(<span class="hljs-string">'DB_HOST'</span>, getenv(<span class="hljs-string">'WORDPRESS_DB_HOST'</span>));
```

### WordPress Features

- Multiple PHP versions (7.4 through 8.5)
- Redis service support for object caching
- Custom build commands for theme/plugin compilation
- Health check configuration
- Environment variable management

### Persistent Storage

In managed mode:

- 20GB persistent volume mounted at /var/www/html
- All WordPress files persist across deployments
- Direct plugin and theme installation from WordPress admin
- No Git repository required

### Performance Optimization

- PHP-FPM with configurable extensions
- Redis object caching available
- Custom PHP settings support
