Wordpress Deployment

PieApp detects WordPress automatically by looking for a wp-config.php or wp-config-sample.php file in your repository root. Your app is built into a Docker container running PHP-FPM and Nginx, and served at https://yourapp.pie.host with automatic HTTPS.

Requirements 

Getting Started 

1. Go to the PieApp dashboard, click launch and select PieApp.

3. Select “Wordpress” as source and Create PieApp.

4. Once the launch is complete, open your app URL and configure Wordpress database etc.

5. You may use PieDB or a Wordpress database

6. You are now ready to setup your new Wordpress website or import the existing one.

7. Use the WordPress S3 plugin to host uploaded files on S3 (PieBucket). 

PHP Version 

Select the PHP version from the Settings tab. Supported versions: 7.4, 8.0, 8.1, 8.2, 8.3.

WordPress 6.x requires PHP 7.4 or higher. PHP 8.2+ is recommended.

Changing the PHP version triggers a cold deployment — the entire image is rebuilt from scratch.

Environment Variables 

Add your configuration in the Environment tab, one per line in KEY=VALUE format:

DB_NAME=your_database
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=your-db-host

WP_HOME=https://yourapp.pie.host
WP_SITEURL=https://yourapp.pie.host

AUTH_KEY=put_a_random_string_here
SECURE_AUTH_KEY=put_a_random_string_here
LOGGED_IN_KEY=put_a_random_string_here
NONCE_KEY=put_a_random_string_here
AUTH_SALT=put_a_random_string_here
SECURE_AUTH_SALT=put_a_random_string_here
LOGGED_IN_SALT=put_a_random_string_here
NONCE_SALT=put_a_random_string_here

Generate unique salt values at https://api.wordpress.org/secret-key/1.1/salt/.

Never commit database credentials or secret keys to your repository.

wp-config.php Setup 

Update your wp-config.php to read credentials from environment variables instead of hardcoded values. This keeps secrets out of your repository and makes deployments portable.

define( 'DB_NAME',     getenv('DB_NAME')     ?: 'database_name' );
define( 'DB_USER',     getenv('DB_USER')     ?: 'username' );
define( 'DB_PASSWORD', getenv('DB_PASSWORD') ?: 'password' );
define( 'DB_HOST',     getenv('DB_HOST')     ?: 'localhost' );
define( 'DB_CHARSET',  'utf8' );
define( 'DB_COLLATE',  '' );

define( 'WP_HOME',    getenv('WP_HOME')    ?: 'https://yourapp.pie.host' );
define( 'WP_SITEURL', getenv('WP_SITEURL') ?: 'https://yourapp.pie.host' );

define( 'AUTH_KEY',         getenv('AUTH_KEY') );
define( 'SECURE_AUTH_KEY',  getenv('SECURE_AUTH_KEY') );
define( 'LOGGED_IN_KEY',    getenv('LOGGED_IN_KEY') );
define( 'NONCE_KEY',        getenv('NONCE_KEY') );
define( 'AUTH_SALT',        getenv('AUTH_SALT') );
define( 'SECURE_AUTH_SALT', getenv('SECURE_AUTH_SALT') );
define( 'LOGGED_IN_SALT',   getenv('LOGGED_IN_SALT') );
define( 'NONCE_SALT',       getenv('NONCE_SALT') );

// Disable WordPress's built-in pseudo-cron (use pie.json crons instead)
define( 'DISABLE_WP_CRON', true );

$table_prefix = 'wp_';

define( 'WP_DEBUG', false );

if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', __DIR__ . '/' );
}
require_once ABSPATH . 'wp-settings.php';

Cron Jobs 

WordPress relies on wp-cron.php for scheduled tasks (publishing, updates, cleanup). Since PieApp containers don't receive HTTP traffic to trigger pseudo-cron, you should disable the built-in pseudo-cron (as shown above) and schedule it explicitly via pie.json:

{
  "crons": [
    {
      "schedule": "*/5 * * * *",
      "command": "/usr/bin/php /app/wp-cron.php"
    }
  ]
}

Place pie.json in the root of your repository. Changes take effect after the next deployment.

Common Issues 

White screen / 500 error after deployment

Check that all database credentials are set correctly in the Environment tab and that the database server allows remote connections from PieApp. Enable WP_DEBUG temporarily to see the actual error:

WP_DEBUG=true
WP_DEBUG_LOG=true

Site URL is wrong / redirecting incorrectly

Ensure WP_HOME and WP_SITEURL in your environment variables match the URL you are accessing (e.g. https://yourapp.pie.host). Mismatched URLs cause redirect loops.

Plugins or uploads not persisting between deployments

Each deployment builds a fresh container. Files uploaded via the WordPress admin (media library, plugin installs) are not persisted. Use an external storage solution (S3-compatible) with a plugin such as WP Offload Media for persistent file storage.

wp-cron tasks not running

Ensure DISABLE_WP_CRON is set to true in wp-config.php and that the pie.json cron entry is present and correct. Cron changes only take effect after a redeployment.

Help

Facing difficulties? Use the chat box on the bottom-right corner of this page to reach us.