{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4e4aa6e9-36be-4d2b-be98-fcb6c6cad3e6",
    "slug": "wordpress-mariadb-wp-cli",
    "name": "WordPress (MariaDB, WP-CLI)",
    "description": "WordPress 7 on MariaDB: 128 MB uploads, HTTPS behind the proxy, WP-CLI",
    "url": "https://railway.com/deploy/wordpress-mariadb-wp-cli",
    "upstream": {
      "repo_url": "https://github.com/dektionstudio/railway-template-images"
    }
  },
  "services": [
    {
      "name": "MariaDB",
      "source": {
        "image": "mariadb:11.8"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "WordPress",
      "source": {
        "repo": "https://github.com/dektionstudio/railway-template-images"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/www/html",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MARIADB_USER",
      "service": "MariaDB",
      "description": "Database user for WordPress",
      "secret": false,
      "strategy": "default",
      "default": "wordpress"
    },
    {
      "key": "MARIADB_DATABASE",
      "service": "MariaDB",
      "description": "Database for WordPress",
      "secret": false,
      "strategy": "default",
      "default": "wordpress"
    },
    {
      "key": "MARIADB_PASSWORD",
      "service": "MariaDB",
      "description": "Database password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MARIADB_AUTO_UPGRADE",
      "service": "MariaDB",
      "description": "Upgrade the data files automatically after a MariaDB version change",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "MARIADB_ROOT_PASSWORD",
      "service": "MariaDB",
      "description": "Root password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "WordPress",
      "description": "Apache port",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "WORDPRESS_URL",
      "service": "WordPress",
      "description": "Open this to run the WordPress installer",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "WORDPRESS_DB_HOST",
      "service": "WordPress",
      "description": "MariaDB over the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "WORDPRESS_DB_NAME",
      "service": "WordPress",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_DB_USER",
      "service": "WordPress",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_DB_PASSWORD",
      "service": "WordPress",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_CONFIG_EXTRA",
      "service": "WordPress",
      "description": "Extra wp-config.php code: trust Railway's HTTPS header, write files directly",
      "secret": false,
      "strategy": "default",
      "default": "if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { $_SERVER['HTTPS'] = 'on'; }\ndefine('FS_METHOD', 'direct');"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "wordpress-mariadb-wp-cli"
      }
    },
    "cli": "railway deploy --template wordpress-mariadb-wp-cli",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4e4aa6e9-36be-4d2b-be98-fcb6c6cad3e6",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "12e50d1e-2c62-4817-9a7e-75abdadb91f9": {
                  "icon": "https://cdn.jsdelivr.net/gh/devicons/devicon@v2.16.0/icons/mariadb/mariadb-original.svg",
                  "name": "MariaDB",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mariadb:11.8"
                  },
                  "variables": {
                    "MARIADB_USER": {
                      "isOptional": false,
                      "description": "Database user for WordPress",
                      "defaultValue": "wordpress"
                    },
                    "MARIADB_DATABASE": {
                      "isOptional": false,
                      "description": "Database for WordPress",
                      "defaultValue": "wordpress"
                    },
                    "MARIADB_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password (generated)",
                      "defaultValue": "{{MARIADB_PASSWORD}}"
                    },
                    "MARIADB_AUTO_UPGRADE": {
                      "isOptional": false,
                      "description": "Upgrade the data files automatically after a MariaDB version change",
                      "defaultValue": "1"
                    },
                    "MARIADB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password (generated)",
                      "defaultValue": "{{MARIADB_ROOT_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "5dd91f1e-792c-4792-ae83-96e235770e74": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "d0922147-fb5d-4fc1-b82f-30fc499cb766": {
                  "icon": "https://cdn.jsdelivr.net/gh/devicons/devicon@v2.16.0/icons/wordpress/wordpress-plain.svg",
                  "name": "WordPress",
                  "deploy": {
                    "healthcheckPath": "/wp-admin/install.php",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "dektionstudio/railway-template-images",
                    "rootDirectory": "/wordpress"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Apache port",
                      "defaultValue": "80"
                    },
                    "WORDPRESS_URL": {
                      "isOptional": false,
                      "description": "Open this to run the WordPress installer",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "WORDPRESS_DB_HOST": {
                      "isOptional": false,
                      "description": "MariaDB over the private network",
                      "defaultValue": "${{MariaDB.RAILWAY_PRIVATE_DOMAIN}}:3306"
                    },
                    "WORDPRESS_DB_NAME": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{MariaDB.MARIADB_DATABASE}}"
                    },
                    "WORDPRESS_DB_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{MariaDB.MARIADB_USER}}"
                    },
                    "WORDPRESS_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{MariaDB.MARIADB_PASSWORD}}"
                    },
                    "WORDPRESS_CONFIG_EXTRA": {
                      "isOptional": false,
                      "description": "Extra wp-config.php code: trust Railway's HTTPS header, write files directly",
                      "defaultValue": "if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { $_SERVER['HTTPS'] = 'on'; }\ndefine('FS_METHOD', 'direct');"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  },
                  "volumeMounts": {
                    "93073398-5c3e-468f-bf11-cb57f8a44df2": {
                      "mountPath": "/var/www/html"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "WordPress",
      "method": "GET",
      "path": "/wp-admin/install.php",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-25T16:14:54.488Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-25T15:20:57.186Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_8533f510f97c4921be67",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 170,
    "typical_build_seconds": 62,
    "typical_start_seconds": 11,
    "slowest_service": "WordPress"
  }
}
