Di chuyển từ Workers trang web sang Pages Migrating from Workers Sites to Pages ការផ្លាស់ប្តូរពី Workers តំបន់ទៅ Pages
Hướng dẫn chi tiết đồng bộ từ docs Cloudflare — mỗi section có backlink tới đúng vị trí trên trang gốc. Detailed guide synced from Cloudflare docs — each section links to the matching anchor on the official page. មគ្គុទ្ទេសក៍លម្អិតធ្វើសមកាលពី docs Cloudflare — ផ្នែកនីមួយៗមានតំណទៅទីតាំងត្រូវគ្នានៅទំព័រផ្លូវការ។
← Danh mục ← Catalog ← បញ្ជីGiải thích nhanh Quick context បរិបទរហ័ស
Thuộc Developer Platform — thực hành triển khai code, API và dữ liệu trên edge/serverless. Tutorial «Migrating từ Workers Sites to Pages» giúp bạn làm quen luồng triển khai thật — phù hợp đọc trước khi mở tài liệu gốc tiếng Anh. Đọc phần tóm tắt và lưu ý trước — sau đó mở docs gốc để copy lệnh và cấu hình chi tiết.
Learn how to migrate from Workers Sites to Cloudflare Pages.
តើធ្វើដូចម្តេចដើម្បីផ្លាស់ប្តូរពី Workers តំបន់ទៅ Cloudflare Pages ។
Lưu ý Note ចំណាំ
Lưu ý trước khi làm Notes before you start ចំណាំមុនពេលចាប់ផ្តើម
- Đây là bản tóm tắt trên Orange Cloud Learning Hub — không thay thế tài liệu chính thức.
- Luôn mở liên kết «Tài liệu gốc» bên dưới khi cần lệnh CLI, snippet code và ảnh minh họa đầy đủ.
- Cần tài khoản Cloudflare, Wrangler CLI và (thường) hoàn thành hướng dẫn Get started của Workers/Pages.
- Docs Cloudflare cập nhật thường xuyên — đối chiếu ngày «Rà soát lần cuối» trên trang gốc khi triển khai production.
- This is a summary on Orange Cloud Learning Hub — it does not replace the official documentation.
- Open the Official docs link below for CLI commands, code snippets, and full screenshots.
- Requires a Cloudflare account, Wrangler CLI, and (typically) completing the Workers/Pages Get started guide.
- Cloudflare docs change frequently — verify the Last reviewed date on the official page before production use.
- នេះគឺជាការបញ្ជាក់អំពី Orange Cloud Learning Hub — វាគឺជាការផ្លាស់ប្តូរនៃឯកសារផ្លូវការ។
- ចុចតំណភ្ជាប់ Docs Official នៅខាងក្រោមសម្រាប់ការបញ្ជា CLI, សៀវភៅកូដនិងរូបថតពេញលេញ។
- តម្រូវឱ្យមានគណនី Cloudflare, Wrangler CLI និង (ប្រហែលជា) ការបញ្ចប់គណនី Workers/Pages Get started ។
- Cloudflare បានផ្លាស់ប្តូរជាធម្មតានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅ។
Tài liệu gốc — rà soát lần cuối: almost 6 years ago Official docs — last reviewed: almost 6 years ago ឯកសារផ្លូវការ — ពិនិត្យចុងក្រោយ: almost 6 years ago
Overview Overview Overview
Trong tutorial này, bạn sẽ migrate an existing Cloudflare Workers Sites application to Cloudflare Pages.
Read the "Overview" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «Overview» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
_worker.js trong thư mục đầu ra của dự án Pages của bạn._worker.js file in the output directory of your Pages project._worker.js នៅក្នុងឯកសារផលិតកម្មនៃគម្រោង Pages របស់អ្នក។<em>worker.js, toàn bộ thư mục /functions bị bỏ qua - điều này bao gồm các tính năng định tuyến và middleware của nó. Thay vào đó, tệp </em>worker.js được triển khai như hiện tại và phải được viết bằng cách sử dụng Module Worker syntax.<em>worker.js file, the entire /functions directory is ignored - this includes its routing and middleware characteristics. Instead, the </em>worker.js file is deployed as is and must be written using the Module Worker syntax.<em>worker.js ទាញយកឯកសារ /functions ទាំងអស់ត្រូវបានបាត់បង់ - នេះរួមបញ្ចូលទាំងលក្ខណៈពិសេសដំណើរការនិង middleware របស់វា។ ទោះជាយ៉ាងណាក៏ដោយឯកសារ </em>worker.js ត្រូវបានដំឡើងដូចគ្នានេះហើយត្រូវតែត្រូវបានសរសេរដោយប្រើ Module Worker syntax ។Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Loại bỏ mã không cần thiết Remove unnecessary code ទាញយកលេខកូដមិនចាំបាច់
Phần «Gỡ unnecessary code» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Remove unnecessary code" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ទាញយកលេខកូដមិនចាំបាច់» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
- Một ứng dụng được xây dựng với một static site tool hoặc một bộ sưu tập tĩnh của HTML, CSS và JavaScript tập tin.
- Nếu bạn sử dụng một công cụ trang web tĩnh, một thư mục xây dựng (được gọi là
buckettrong Wrangler configuration file) nơi dự án tĩnh xây dựng tệp HTML, CSS và JavaScript của bạn. - Một ứng dụng Worker để phục vụ đó xây dựng thư mục. Đối với hầu hết các dự án, đây có thể là thư mục
workers-site.
- An application built with a static site tool or a static collection of HTML, CSS and JavaScript files.
- If using a static site tool, a build directory (called
bucketin the Wrangler configuration file) where the static project builds your HTML, CSS, and JavaScript files. - A Worker application for serving that build directory. For most projects, this is likely to be the
workers-sitedirectory.
- កម្មវិធីដែលត្រូវបានបង្កើតឡើងដោយប្រើ static site tool ឬប្រព័ន្ធប្រតិបត្តិការដែលមានប្រព័ន្ធប្រតិបត្តិការ HTML, CSS និង JavaScript ។
- ប្រសិនបើអ្នកប្រើឧបករណ៍គេហទំព័រធម្មតានិច, មាត្រាឌីជីថលសាងសង់ (ដែលត្រូវបានគេហៅថា
bucketនៅក្នុង Wrangler configuration file) ដែលគម្រោងធម្មតានិចបានបង្កើតឯកសារ HTML, CSS និង JavaScript របស់អ្នក។ - កម្មវិធី Worker សម្រាប់ការបម្រើដែលបង្កើត directory ។ សម្រាប់គម្រោងភាគច្រើនវាត្រូវបានគេហទំព័រ
workers-site។
build của bạn (nếu bạn có một), và trường bucket, hoặc xây dựng thư mục, từ tệp Wrangler trong thư mục dự án của bạn.build command (if you have one), and the bucket field, or build directory, from the Wrangler file in your project's directory.build command (if you have one), and the bucket field, or build directory, from the Wrangler file in your project's directory.Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Migrate headers và redirects Migrate headers and redirects ទាញយក headers និង redirect
Phần «Di chuyển headers và redirects» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Migrate headers and redirects" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ទាញយក headers និង redirect» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
_redirects trong thư mục đầu ra của bạn. Pages hiện đang cung cấp hỗ trợ hạn chế cho các chuyển hướng nâng cao. Sẽ có thêm hỗ trợ trong tương lai. Để biết danh sách các loại hỗ trợ, hãy tham khảo Redirects documentation._redirects file in your output directory. Pages currently offers limited support for advanced redirects. More support will be added in the future. For a list of support types, refer to the Redirects documentation._redirects នៅក្នុងប្រព័ន្ធប្រតិបត្តិការរបស់អ្នក។ Pages ឥឡូវនេះផ្តល់ជូននូវការគាំទ្រតូចសម្រាប់ការបង្វិលកម្រិតខ្ពស់។ ការគាំទ្របន្ថែមទៀតនឹងត្រូវបានបន្ថែមនៅក្នុងអនាគត។ ប្រសិនបើអ្នកមានគុណសម្បត្តិគុណសម្បត្តិគុណសម្បត្តិគុណសម្បត្តិ, សូមមើល Redirects documentation ។_redirects của bạn._redirects file._redirects ។_redirects, Cloudflare cũng cung cấp Bulk Redirects, xử lý các chuyển hướng vượt quá giới hạn quy tắc chuyển hướng 2,100 được thiết lập bởi Pages._redirects file, Cloudflare also offers Bulk Redirects, which handles redirects that surpasses the 2,100 redirect rules limit set by Pages._redirects, Cloudflare ក៏ផ្តល់ជូននូវ Bulk Redirects ដែលអាចដំណើរការបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជាបញ្ជា Pages<em>headers trong thư mục đầu ra của bạn. Điều quan trọng cần lưu ý là tiêu đề tùy chỉnh được xác định trong tệp </em>headers hiện không được áp dụng cho các câu trả lời từ Functions, ngay cả khi đường dẫn Function khớp với mẫu URL. Để tìm hiểu thêm về xử lý tiêu đề, hãy tham khảo Headers.<em>headers file in your output directory. It is important to note that custom headers defined in the </em>headers file are not currently applied to responses from Functions, even if the Function route matches the URL pattern. To learn more about handling headers, refer to Headers.<em>headers នៅក្នុងប្រព័ន្ធប្រតិបត្តិការរបស់អ្នក។ វាគឺជាការសំខាន់ក្នុងការយល់ដឹងថានៅពេលនេះថានៅក្នុងឯកសារ </em>headers មិនត្រូវបានអនុវត្តទៅនឹងការឆ្លើយតបពី Functions ដូចគ្នានេះផងដែរប៉ុន្តែថានៅពេលបច្ចុប្បន្នថានៅពេលបច្ចុប្បន្នថានៅពេលបច្ចុប្បន្នថានៅពេលបច្ចុប្បន្ន។ ប្រសិនបើអ្នកចង់ដឹងបន្ថែមទៀតអំពីការដោះស្រាយអាសយដ្ឋាន, សូមមើល Headers ។Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Kết nối với nhà cung cấp git của bạn Connect to your git provider ការចូលរួមជាមួយអ្នកផ្គត់ផ្គង់ git របស់អ្នក
Phần «Kết nối vào git provider» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Connect to your git provider" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការចូលរួមជាមួយអ្នកផ្គត់ផ្គង់ git របស់អ្នក» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Sử dụng Direct Upload Using Direct Upload ការប្រើប្រាស់ Direct Upload
Phần «Using Direct Upload» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Using Direct Upload" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការប្រើប្រាស់ Direct Upload» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Làm sạch ứng dụng cũ của bạn và gán tên miền Cleaning up your old application and assigning the domain ការចែកចាយកម្មវិធីថ្មីរបស់អ្នកនិងកំណត់តំបន់បណ្ដាញ
Phần «Cleaning up your old ứng dụng và assigning domain» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Cleaning up your old application and assigning the domain" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការចែកចាយកម្មវិធីថ្មីរបស់អ្នកនិងកំណត់តំបន់បណ្ដាញ» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
- Trong bảng điều khiển Cloudflare, đi đến trang Workers & Pages.
- In the Cloudflare dashboard, go to the Workers & Pages page.
- ក្នុងប្រព័ន្ធប្រតិបត្តិការ Cloudflare សូមចូលទៅក្នុងទំព័រ Workers & Pages ។
- Chọn nhân viên của bạn
- Đi đến Manage \> Delete Worker.
- Select your Worker.
- Go to Manage \> Delete Worker.
- ជ្រើសបុគ្គលិករបស់អ្នក
- ចុចទៅ Manage \> Delete Worker ។
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/pages/","name":"Pages"}},{"@type":"ListItem","position":3,"item":{"@id":"/pages/migrations/","name":"Migration guides"}},{"@type":"ListItem","position":4,"item":{"@id":"/pages/migrations/migrating-from-workers/","name":"Migrating from Workers Sites to Pages"}}]} Xem bản đầy đủ trên developers.cloudflare.com (ảnh, tab cấu hình). View the full guide on developers.cloudflare.com (images, config tabs). មើលមគ្គុទ្ទេសក៍ពេញលើ developers.cloudflare.com (រូបភាព, tab កំណត់)។
Tài liệu gốc ↗ Official docs ↗ ឯកសារផ្លូវការ ↗