WordPress 사이트에서 데이터베이스 연결을 사용하는 경우 Migrate to Containers에서 데이터베이스를 자동으로 마이그레이션하지 않으므로 대상 클러스터에서 데이터베이스에 액세스할 수 있는지 확인합니다.
마이그레이션 계획 수정
파일 시스템을 복사하고 분석한 후 지정된 출력 경로 ANALYSIS_OUTPUT_PATH/config.yaml에 생성된 새 디렉터리에서 마이그레이션 계획을 찾을 수 있습니다.
필요에 따라 마이그레이션 계획을 수정하고 변경사항을 저장합니다.
마이그레이션 계획 세부정보와 안내를 검토하여 필요에 따라 정보를 추가합니다. 특히 다음 섹션을 수정하는 것이 좋습니다.
마이그레이션 계획 구조
WordPress 워크로드의 마이그레이션 계획은 다음과 같은 구조로 구성되며, 다음 섹션에 설명된 대로 맞춤설정할 수 있습니다.
sites:-# Image name. Edit this to change the artifacts naming.imageName:wordpress# Parent WordPress image for the generated container image.fromImage:wordpress:6.1-php7.4-apache# WordPress root directory.rootDirectory:/var/www/html/# Database connection values.databaseValues:-name:DB_NAMEvalue:database_name_here-name:DB_USERvalue:username_here-name:DB_PASSWORDvalue:password_here-name:DB_HOSTvalue:host_here
필요에 따라 정보를 추가하려면 마이그레이션 계획 세부정보와 안내를 검토합니다.
특히 다음 섹션을 수정하는 것이 좋습니다.
Docker 이미지 지정
마이그레이션 계획에서 WordPress 버전을 기반으로 Docker 커뮤니티 이미지 태그를 생성합니다.
Docker 커뮤니티 이미지를 변경하거나 자체 Docker 이미지를 제공하려면 다음 형식을 사용하여 마이그레이션 계획에서 fromImage 태그를 수정할 수 있습니다.
# Parent WordPress image for the generated container image.fromImage:wordpress:6.1-php7.4-apache
데이터베이스 연결 구성 지정
databaseValues 섹션에는 VM에서 추출한 데이터베이스 연결 구성이 포함됩니다. 이 값을 수정하여 데이터베이스 연결을 변경합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Customize migration plan for WordPress sites\n============================================\n\nYou should review the migration plan file that resulted from creating a migration.\nCustomize the file before executing the migration. The details of\nyour migration plan are used to extract the workload container artifacts from the source.\n\nThis section describes the contents of the migration and the kinds of\ncustomizations you might consider before you execute the migration and generate\ndeployment artifacts.\n\nBefore you begin\n----------------\n\n- Ensure that you've already [created a migration](/migrate/containers/docs/m2c-cli/create-a-migration-plan)\n and have the migration plan file.\n\n- If your WordPress site relies on a database connection, then ensure that the\n [database is accessible](/migrate/containers/docs/planning-best-practices#ensure_databases_are_accessible)\n from the target cluster as Migrate to Containers doesn't automatically migrate\n it.\n\n| **Note:** To change the site's URL as part of the migration, you need to [update the database contents](https://wordpress.org/documentation/article/changing-the-site-url/).\n\nEdit the migration plan\n-----------------------\n\nAfter you have copied the file system and analyzed it, you can find the\nmigration plan in the new directory that is created in the specified output\npath: \u003cvar translate=\"no\"\u003eANALYSIS_OUTPUT_PATH\u003c/var\u003e/`config.yaml`.\n\nEdit the migration plan as necessary and save the changes.\n\nReview your migration plan details and guiding comments to add information as\nneeded. Specifically, consider edits around the following sections.\n\nMigration plan structure\n------------------------\n\nThe migration plan for a WordPress workload has the following structure, which\nyou can customize as described in the following sections. \n\n sites:\n - # Image name. Edit this to change the artifacts naming.\n imageName: wordpress\n # Parent WordPress image for the generated container image.\n fromImage: wordpress:6.1-php7.4-apache\n # WordPress root directory.\n rootDirectory: /var/www/html/\n # Database connection values.\n databaseValues:\n - name: DB_NAME\n value: database_name_here\n - name: DB_USER\n value: username_here\n - name: DB_PASSWORD\n value: password_here\n - name: DB_HOST\n value: host_here\n\nTo add information as needed, review your migration plan details and guiding\ncomments.\n\nSpecifically, consider edits around the following sections.\n\n### Specify the Docker image\n\nIn the migration plan, generate a Docker community image tag based on the\nWordPress version.\n\nIf you want to change the Docker community image, or provide your own docker image,\nyou can modify the `fromImage` tag in your migration plan using the following format: \n\n```yaml\n# Parent WordPress image for the generated container image.\n fromImage: wordpress:6.1-php7.4-apache\n```\n\n### Specify the database connection configuration\n\nThe `databaseValues` section contains the database connection configuration\nextracted from the VM. Modify these values to change the database connection.\n\nThese values are passed to the migrated pod.\n\nData migration plan structure\n-----------------------------\n\nThe data migration plan for a WordPress workload has the following structure: \n\n volumes:\n - deploymentPvcName: wordpress-pvc\n folders:\n - /var/www/html/wp-content\n newPvc:\n spec:\n accessModes:\n - ReadWriteOnce\n resources:\n requests:\n storage: 10G\n\nThe uploaded content, plugins, and themes that reside in the `wp-content`\nfolder in your WordPress VM are\nexported to a persistent volume claim (PVC). The PVC is attached and mounted to\nthe migrated pod.\n\nWhat's next\n-----------\n\n- Learn how to [execute the migration](../execute-the-migration-plan)."]]