{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4c06037f-5c08-4731-8ab3-157266c21172",
    "slug": "wordpress-railway",
    "name": "WordPress",
    "description": "Open source publishing platform of choice for millions of websites globally",
    "url": "https://railway.com/deploy/wordpress-railway",
    "upstream": {
      "image": "wordpress:7.0.2-php8.4-apache"
    }
  },
  "services": [
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "wordpress",
      "source": {
        "image": "wordpress:7.0.2-php8.4-apache"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/www/html",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "Private hostname, never publicly exposed",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "MySQL port on the private network",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "Superuser; give the app a scoped user instead",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Private-network connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Alias consumers reference as ${{MySQL.MYSQLDATABASE}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "Alias of the root password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Database created on first init",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "External connection string; empty host/port until a TCP proxy exists",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root password, generated once at init — read only when the data dir is created",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private hostname, reachable only inside the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Standard Redis port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default ACL user created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string, use this from other services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Convenience alias of the generated password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Generated password for the default user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public connection string over the TCP proxy, for external tools",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "wordpress",
      "description": "HTTP port, matches domain target port",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "REDISHOST",
      "service": "wordpress",
      "description": "Private Redis host for object cache",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPORT",
      "service": "wordpress",
      "description": "Redis port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "wordpress",
      "description": "Redis AUTH password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_DB_HOST",
      "service": "wordpress",
      "description": "Private MySQL host and port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_DB_NAME",
      "service": "wordpress",
      "description": "Database created for WordPress",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_DB_USER",
      "service": "wordpress",
      "description": "Least-privilege database user, not root",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_AUTH_KEY",
      "service": "wordpress",
      "description": "Signs auth cookies, keep stable",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_AUTH_SALT",
      "service": "wordpress",
      "description": "Salt for the auth key",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_NONCE_KEY",
      "service": "wordpress",
      "description": "Signs form nonces, keep stable",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_NONCE_SALT",
      "service": "wordpress",
      "description": "Salt for the nonce key",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_DB_PASSWORD",
      "service": "wordpress",
      "description": "Password for that scoped user",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_CONFIG_EXTRA",
      "service": "wordpress",
      "description": "Extra PHP eval'd in wp-config.php",
      "secret": false,
      "strategy": "default",
      "default": "define('WP_HOME','https://'.getenv('RAILWAY_PUBLIC_DOMAIN')); define('WP_SITEURL','https://'.getenv('RAILWAY_PUBLIC_DOMAIN')); define('FORCE_SSL_ADMIN',true); define('DISALLOW_FILE_EDIT',true); define('WP_MEMORY_LIMIT','256M'); define('WP_MAX_MEMORY_LIMIT','512M'); define('WP_REDIS_HOST',getenv('REDISHOST')); define('WP_REDIS_PORT',(int)getenv('REDISPORT')); define('WP_REDIS_PASSWORD',getenv('REDISPASSWORD')); define('WP_REDIS_CLIENT','predis'); define('WP_REDIS_PREFIX','wp:'); define('WP_REDIS_DATABASE',0); define('WP_REDIS_TIMEOUT',2); define('WP_REDIS_READ_TIMEOUT',2);"
    },
    {
      "key": "WORDPRESS_TABLE_PREFIX",
      "service": "wordpress",
      "description": "Prefix for all WordPress tables",
      "secret": false,
      "strategy": "default",
      "default": "wp_"
    },
    {
      "key": "WORDPRESS_LOGGED_IN_KEY",
      "service": "wordpress",
      "description": "Signs logged-in cookies, keep stable",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_LOGGED_IN_SALT",
      "service": "wordpress",
      "description": "Salt for the logged-in key",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_SECURE_AUTH_KEY",
      "service": "wordpress",
      "description": "Signs secure auth cookies, keep stable",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_SECURE_AUTH_SALT",
      "service": "wordpress",
      "description": "Salt for the secure auth key",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "wordpress-railway"
      }
    },
    "cli": "railway deploy --template wordpress-railway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4c06037f-5c08-4731-8ab3-157266c21172",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "534f4459-6556-4c06-85a9-763ee349e10d": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "Private hostname, never publicly exposed",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MySQL port on the private network",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "Superuser; give the app a scoped user instead",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Private-network connection string",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Alias consumers reference as ${{MySQL.MYSQLDATABASE}}",
                      "defaultValue": "${{MYSQL_DATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "Alias of the root password",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database created on first init",
                      "defaultValue": "railway"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "External connection string; empty host/port until a TCP proxy exists",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password, generated once at init — read only when the data dir is created",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "534f4459-6556-4c06-85a9-763ee349e10d": {
                      "mountPath": "/var/lib/mysql"
                    }
                  },
                  "haTemplateCode": "mysql-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "MySQL Replicas",
                      "options": [
                        2,
                        4,
                        6,
                        8
                      ],
                      "nodeLabel": "MySQL",
                      "description": "Requires odd count for quorum",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your MySQL instance to an HA cluster with Group Replication failover and HAProxy routing to the primary.",
                    "supportedImageMajorVersions": [
                      8,
                      9
                    ]
                  }
                },
                "b9b6b8cb-603f-4d9d-90b0-dc8449d1d572": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Standard Redis port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default ACL user created on first boot",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Convenience alias of the generated password",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the default user",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public connection string over the TCP proxy, for external tools",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "b9b6b8cb-603f-4d9d-90b0-dc8449d1d572": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "f96d21ba-ffd7-43ae-a261-3ca7b8fe0bcd": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/wordpress.svg",
                  "name": "wordpress",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'printf \"upload_max_filesize=64M\\npost_max_size=64M\\nmemory_limit=256M\\nmax_execution_time=300\\nmax_input_vars=3000\\n\" > /usr/local/etc/php/conf.d/zz-railway.ini; a2dismod mpm_event mpm_worker >/dev/null 2>&1 || true; rm -f /etc/apache2/mods-enabled/mpm_event.* /etc/apache2/mods-enabled/mpm_worker.*; a2enmod mpm_prefork >/dev/null 2>&1 || true; grep -q \"100.64.0.0/10\" /etc/apache2/conf-available/remoteip.conf || { echo \"RemoteIPInternalProxy 100.64.0.0/10\"; echo \"RemoteIPInternalProxy fd00::/8\"; } >> /etc/apache2/conf-available/remoteip.conf; apache2ctl -t; exec docker-entrypoint.sh apache2-foreground'",
                    "healthcheckPath": "/",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "wordpress:7.0.2-php8.4-apache"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port, matches domain target port",
                      "defaultValue": "80"
                    },
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Private Redis host for object cache",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis port",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis AUTH password",
                      "defaultValue": "${{Redis.REDISPASSWORD}}"
                    },
                    "WORDPRESS_DB_HOST": {
                      "isOptional": false,
                      "description": "Private MySQL host and port",
                      "defaultValue": "${{MySQL.MYSQLHOST}}:${{MySQL.MYSQLPORT}}"
                    },
                    "WORDPRESS_DB_NAME": {
                      "isOptional": false,
                      "description": "Database created for WordPress",
                      "defaultValue": "${{MySQL.MYSQL_DATABASE}}"
                    },
                    "WORDPRESS_DB_USER": {
                      "isOptional": false,
                      "description": "Least-privilege database user, not root",
                      "defaultValue": "${{MySQL.MYSQL_USER}}"
                    },
                    "WORDPRESS_AUTH_KEY": {
                      "isOptional": false,
                      "description": "Signs auth cookies, keep stable",
                      "defaultValue": "{{WORDPRESS_AUTH_KEY}}"
                    },
                    "WORDPRESS_AUTH_SALT": {
                      "isOptional": false,
                      "description": "Salt for the auth key",
                      "defaultValue": "{{WORDPRESS_AUTH_SALT}}"
                    },
                    "WORDPRESS_NONCE_KEY": {
                      "isOptional": false,
                      "description": "Signs form nonces, keep stable",
                      "defaultValue": "{{WORDPRESS_NONCE_KEY}}"
                    },
                    "WORDPRESS_NONCE_SALT": {
                      "isOptional": false,
                      "description": "Salt for the nonce key",
                      "defaultValue": "{{WORDPRESS_NONCE_SALT}}"
                    },
                    "WORDPRESS_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for that scoped user",
                      "defaultValue": "${{MySQL.MYSQL_PASSWORD}}"
                    },
                    "WORDPRESS_CONFIG_EXTRA": {
                      "isOptional": false,
                      "description": "Extra PHP eval'd in wp-config.php",
                      "defaultValue": "define('WP_HOME','https://'.getenv('RAILWAY_PUBLIC_DOMAIN')); define('WP_SITEURL','https://'.getenv('RAILWAY_PUBLIC_DOMAIN')); define('FORCE_SSL_ADMIN',true); define('DISALLOW_FILE_EDIT',true); define('WP_MEMORY_LIMIT','256M'); define('WP_MAX_MEMORY_LIMIT','512M'); define('WP_REDIS_HOST',getenv('REDISHOST')); define('WP_REDIS_PORT',(int)getenv('REDISPORT')); define('WP_REDIS_PASSWORD',getenv('REDISPASSWORD')); define('WP_REDIS_CLIENT','predis'); define('WP_REDIS_PREFIX','wp:'); define('WP_REDIS_DATABASE',0); define('WP_REDIS_TIMEOUT',2); define('WP_REDIS_READ_TIMEOUT',2);"
                    },
                    "WORDPRESS_TABLE_PREFIX": {
                      "isOptional": false,
                      "description": "Prefix for all WordPress tables",
                      "defaultValue": "wp_"
                    },
                    "WORDPRESS_LOGGED_IN_KEY": {
                      "isOptional": false,
                      "description": "Signs logged-in cookies, keep stable",
                      "defaultValue": "{{WORDPRESS_LOGGED_IN_KEY}}"
                    },
                    "WORDPRESS_LOGGED_IN_SALT": {
                      "isOptional": false,
                      "description": "Salt for the logged-in key",
                      "defaultValue": "{{WORDPRESS_LOGGED_IN_SALT}}"
                    },
                    "WORDPRESS_SECURE_AUTH_KEY": {
                      "isOptional": false,
                      "description": "Signs secure auth cookies, keep stable",
                      "defaultValue": "{{WORDPRESS_SECURE_AUTH_KEY}}"
                    },
                    "WORDPRESS_SECURE_AUTH_SALT": {
                      "isOptional": false,
                      "description": "Salt for the secure auth key",
                      "defaultValue": "{{WORDPRESS_SECURE_AUTH_SALT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  },
                  "volumeMounts": {
                    "f96d21ba-ffd7-43ae-a261-3ca7b8fe0bcd": {
                      "mountPath": "/var/www/html"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "wordpress",
      "method": "GET",
      "path": "/",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-05T06:29:13.531Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_8c8daa4e67154e8eaf7a",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED,SUCCESS,SUCCESS"
      }
    ]
  }
}
