{
  "manifest_version": "1.0.0",
  "template": {
    "id": "49866db5-c8c9-4e82-9770-61152aab5a78",
    "slug": "wordpress-mysql-with-mpm-fix",
    "name": "Wordpress + MySQL with mpm fix",
    "description": "This is a simple Wordpress template with mpm fix and mysql image.",
    "url": "https://railway.com/deploy/wordpress-mysql-with-mpm-fix",
    "upstream": {
      "image": "wordpress"
    }
  },
  "services": [
    {
      "name": "wordpress",
      "source": {
        "image": "wordpress"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/www/html",
      "http": true
    },
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.7"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "WORDPRESS_DB_HOST",
      "service": "wordpress",
      "description": "Provide a value for WORDPRESS_DB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_DB_NAME",
      "service": "wordpress",
      "description": "Provide a value for WORDPRESS_DB_NAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_DB_USER",
      "service": "wordpress",
      "description": "Provide a value for WORDPRESS_DB_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_AUTH_KEY",
      "service": "wordpress",
      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_AUTH_SALT",
      "service": "wordpress",
      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_NONCE_KEY",
      "service": "wordpress",
      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_NONCE_SALT",
      "service": "wordpress",
      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_DB_PASSWORD",
      "service": "wordpress",
      "description": "Provide a value for WORDPRESS_DB_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORDPRESS_LOGGED_IN_KEY",
      "service": "wordpress",
      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_LOGGED_IN_SALT",
      "service": "wordpress",
      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_SECURE_AUTH_KEY",
      "service": "wordpress",
      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WORDPRESS_SECURE_AUTH_SALT",
      "service": "wordpress",
      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_HOST",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_PORT",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQL_USER",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_USER.",
      "secret": false,
      "strategy": "default",
      "default": "wordpress"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_DATABASE.",
      "secret": false,
      "strategy": "default",
      "default": "wordpress"
    },
    {
      "key": "MYSQL_PASSWORD",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_ROOT_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "wordpress-mysql-with-mpm-fix"
      }
    },
    "cli": "railway deploy --template wordpress-mysql-with-mpm-fix",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "49866db5-c8c9-4e82-9770-61152aab5a78",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "261b1dc3-ff39-4956-a0e4-ff58355dc218": {
                  "icon": null,
                  "name": "wordpress",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"sleep 3 && a2dismod mpm_worker && a2dismod  mpm_event  && a2enmod mpm_prefork && docker-entrypoint.sh apache2-foreground\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "wordpress",
                    "autoUpdates": {
                      "type": "patch",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 1,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 2,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 3,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 4,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 5,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 6,
                          "endHour": 6,
                          "startHour": 2
                        }
                      ]
                    }
                  },
                  "variables": {
                    "WORDPRESS_DB_HOST": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{MySQL.MYSQL_HOST}}"
                    },
                    "WORDPRESS_DB_NAME": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{MySQL.MYSQL_DATABASE}}"
                    },
                    "WORDPRESS_DB_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{MySQL.MYSQL_USER}}"
                    },
                    "WORDPRESS_AUTH_KEY": {
                      "isOptional": false,
                      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
                      "defaultValue": "{{WORDPRESS_AUTH_KEY}}"
                    },
                    "WORDPRESS_AUTH_SALT": {
                      "isOptional": false,
                      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
                      "defaultValue": "{{WORDPRESS_AUTH_SALT}}"
                    },
                    "WORDPRESS_NONCE_KEY": {
                      "isOptional": false,
                      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
                      "defaultValue": "{{WORDPRESS_NONCE_KEY}}"
                    },
                    "WORDPRESS_NONCE_SALT": {
                      "isOptional": false,
                      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
                      "defaultValue": "{{WORDPRESS_NONCE_SALT}}"
                    },
                    "WORDPRESS_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{MySQL.MYSQL_PASSWORD}}"
                    },
                    "WORDPRESS_LOGGED_IN_KEY": {
                      "isOptional": false,
                      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
                      "defaultValue": "{{WORDPRESS_LOGGED_IN_KEY}}"
                    },
                    "WORDPRESS_LOGGED_IN_SALT": {
                      "isOptional": false,
                      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
                      "defaultValue": "{{WORDPRESS_LOGGED_IN_SALT}}"
                    },
                    "WORDPRESS_SECURE_AUTH_KEY": {
                      "isOptional": false,
                      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
                      "defaultValue": "{{WORDPRESS_SECURE_AUTH_KEY}}"
                    },
                    "WORDPRESS_SECURE_AUTH_SALT": {
                      "isOptional": false,
                      "description": "Change these to different unique phrases! You can generate these using the WordPress.org secret-key service: https://api.wordpress.org/secret-key/1.1/salt/",
                      "defaultValue": "{{WORDPRESS_SECURE_AUTH_SALT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "261b1dc3-ff39-4956-a0e4-ff58355dc218": {
                      "mountPath": "/var/www/html"
                    }
                  }
                },
                "f8d9ce1a-473c-42d7-91c6-fdd511b84cc2": {
                  "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.7",
                    "autoUpdates": {
                      "type": "patch",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 1,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 2,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 3,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 4,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 5,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 6,
                          "endHour": 6,
                          "startHour": 2
                        }
                      ]
                    }
                  },
                  "variables": {
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "mysql://${{MYSQ_LUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_HOST": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQL_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "3306"
                    },
                    "MYSQL_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "wordpress"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "wordpress"
                    },
                    "MYSQL_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{MYSQL_PASSWORD}}"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "mysql://${{MYSQL_USER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "f8d9ce1a-473c-42d7-91c6-fdd511b84cc2": {
                      "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
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-18T15:55:30.104Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_21a68f5b52a04a3fb30f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 49,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "wordpress"
  }
}
