WordPress applications

3 min read Updated 21 hours ago

WordPress deployment options

Ploi Cloud offers two ways to deploy WordPress applications, each suited for different workflows:

Source control mode

Deploy WordPress from a Git repository. This mode is ideal for:

  • Version-controlled themes and plugins
  • Custom WordPress development
  • Team collaboration with code reviews
  • Automated deployments via Git commits

With source control mode, your repository can contain:

  • A complete WordPress installation
  • Just the wp-content directory (themes, plugins, uploads)
  • Individual themes or plugins

Managed mode

WordPress files are stored in a persistent volume (20GB by default). This mode is perfect for:

  • Installing themes and plugins from the WordPress admin
  • Making content updates that persist automatically
  • Traditional WordPress workflows without Git
  • Quick WordPress sites without version control

Creating a WordPress application

  1. Click "Create application" from your team dashboard
  2. Enter your application name and select a region
  3. Choose "WordPress" as the application type
  4. Select your WordPress version (or leave blank for latest)
  5. Choose between source control mode or managed mode
  6. For source control mode:
    • Connect your Git repository
    • Select the branch to deploy
  7. For managed mode:
    • No repository is needed
    • WordPress will be installed fresh on first deployment
  8. Review and create your application

WordPress configuration

Database connection

A MySQL database is automatically created for your WordPress site. The database credentials are injected as environment variables:

  • WORDPRESS_DB_HOST
  • WORDPRESS_DB_NAME
  • WORDPRESS_DB_USER
  • WORDPRESS_DB_PASSWORD

WordPress automatically uses these environment variables, so no manual configuration is needed.

File uploads and media

For managed mode installations, all files including uploads are stored in the persistent volume and remain available across deployments.

For source control mode, consider using:

  • External object storage for media files
  • A CDN for static assets
  • Plugins that offload media to cloud storage

SFTP access

You can add an SFTP service to access your WordPress files directly. This is especially useful for managed mode installations.

  1. Navigate to your application's Services tab
  2. Click "Add service"
  3. Select "SFTP" as the service type
  4. Choose authentication method (password or SSH key)
  5. The SFTP service will have access to your WordPress files

SFTP connection details

After creating the SFTP service, you'll receive:

  • Hostname and port for connection
  • Username (always 'sftp')
  • Password or SSH key (depending on your choice)

For managed WordPress installations, you'll find your files at: /home/sftp/volumes/wordpress

PHP configuration

You can customize PHP settings for your WordPress site:

  1. Go to your application's Settings tab
  2. Find the PHP configuration section
  3. Select PHP version (7.4, 8.0, 8.1, 8.2, 8.3, or 8.4)
  4. Add PHP extensions as needed
  5. Configure PHP settings (memory limit, upload size, etc.)
  6. Deploy your application to apply changes

Custom domains

Add your own domain to your WordPress site:

  1. Navigate to the Domains tab
  2. Click "Add domain"
  3. Enter your domain name
  4. Update your DNS to point to the provided IP address
  5. Deploy your application to activate the domain
  6. SSL certificates are automatically provisioned

Best practices

Security

  • Use strong passwords for WordPress admin accounts
  • Keep WordPress, themes, and plugins updated
  • Use environment variables for sensitive configuration
  • Enable two-factor authentication for WordPress admin

Performance

  • Install a caching plugin (W3 Total Cache, WP Super Cache)
  • Add a Redis cache service for object caching
  • Optimize images before uploading
  • Use a CDN for static assets

Backups

  • For managed mode: Regular volume snapshots are recommended
  • For source control mode: Keep your repository up to date
  • Consider using WordPress backup plugins for database backups