[{"data":1,"prerenderedAt":3777},["ShallowReactive",2],{"content-navigation":3,"$fY4mAj2l3kRkTDttxn6FGzqBc2O9HAJ2qp-_8LmMX7aw":1825,"/tutorials/migration/migrate-from-wordpress-to-directus":1830},[4,112,119,224,333,429,481,1087,1113,1142],{"title":5,"path":6,"stem":7,"children":8,"page":89},"Partials","/_partials","_partials",[9,15,20,25,29,33,38,42,47,51,56,60,64,68,90,94,98,103,108],{"title":10,"path":11,"stem":12,"description":13,"icon":14,"links":14},"Advanced Field Creation Mode","/_partials/advanced-field-creation-mode","_partials/advanced-field-creation-mode","You can use these advanced options to automatically set the values of fields at specific events by clicking on \"Continue in Advanced Field Creation Mode\".",null,{"title":16,"path":17,"stem":18,"description":19,"icon":14,"links":14},"Authentication","/_partials/authentication","_partials/authentication","While the Public role can be configured to make data available without authentication, anything that is not public requires a user to authenticate their requests.",{"title":21,"path":22,"stem":23,"description":24,"icon":14,"links":14},"Config Env Vars","/_partials/config-env-vars","_partials/config-env-vars","",{"title":26,"path":27,"stem":28,"description":24,"icon":14,"links":14},"Deployment Public Instance","/_partials/deployment-public-instance","_partials/deployment-public-instance",{"title":30,"path":31,"stem":32,"description":24,"icon":14,"links":14},"Engine Studio Box","/_partials/engine-studio-box","_partials/engine-studio-box",{"title":34,"path":35,"stem":36,"description":37,"icon":14,"links":14},"Extension Hook Footguns","/_partials/extension-hook-footguns","_partials/extension-hook-footguns","Directus reads system collections to operate. Be careful when modifying the output of system collection read or query events. Also ensure not to directly or indirectly emit the same event your hook is handling or you will create an infinite loop.",{"title":39,"path":40,"stem":41,"description":24,"icon":14,"links":14},"Extension Hook System Collections","/_partials/extension-hook-system-collections","_partials/extension-hook-system-collections",{"title":43,"path":44,"stem":45,"description":46,"icon":14,"links":14},"Extensions Api","/_partials/extensions-api","_partials/extensions-api","This extension type is loaded into the Directus process. They can use the provided services exported by the @directus/extensions-sdk package and can be written in JavaScript or TypeScript.",{"title":48,"path":49,"stem":50,"description":24,"icon":14,"links":14},"Extensions Api Internals","/_partials/extensions-api-internals","_partials/extensions-api-internals",{"title":52,"path":53,"stem":54,"description":55,"icon":14,"links":14},"Extensions App","/_partials/extensions-app","_partials/extensions-app","This extension type is loaded into the Directus Data Studio. They are are built with Vue 3, and can use the provided composables exported by the @directus/extensions-sdk package. Extensions can be written in JavaScript or TypeScript.",{"title":57,"path":58,"stem":59,"description":24,"icon":14,"links":14},"Extensions App Internals","/_partials/extensions-app-internals","_partials/extensions-app-internals",{"title":61,"path":62,"stem":63,"description":24,"icon":14,"links":14},"Extensions Theme","/_partials/extensions-theme","_partials/extensions-theme",{"title":65,"path":66,"stem":67,"description":24,"icon":14,"links":14},"Extensions Uid","/_partials/extensions-uid","_partials/extensions-uid",{"title":69,"path":70,"stem":71,"children":72,"page":89},"Home Hero","/_partials/home-hero","_partials/home-hero",[73,77,81,85],{"title":74,"path":75,"stem":76,"description":24,"icon":14,"links":14},"Auth","/_partials/home-hero/auth","_partials/home-hero/auth",{"title":78,"path":79,"stem":80,"description":24,"icon":14,"links":14},"Data","/_partials/home-hero/data","_partials/home-hero/data",{"title":82,"path":83,"stem":84,"description":24,"icon":14,"links":14},"File","/_partials/home-hero/file","_partials/home-hero/file",{"title":86,"path":87,"stem":88,"description":24,"icon":14,"links":14},"Realtime","/_partials/home-hero/realtime","_partials/home-hero/realtime",false,{"title":91,"path":92,"stem":93,"description":24,"icon":14,"links":14},"Json Function","/_partials/json-function","_partials/json-function",{"title":95,"path":96,"stem":97,"description":24,"icon":14,"links":14},"License","/_partials/license","_partials/license",{"title":99,"path":100,"stem":101,"description":102,"icon":14,"links":14},"Query Functions","/_partials/query-functions","_partials/query-functions","Functions accept a field and return a modified value. Functions can be used in any query parameter you'd normally supply a field key, including fields, aggregation, and filters.",{"title":104,"path":105,"stem":106,"description":107,"icon":14,"links":14},"Quickstart Making Calls","/_partials/quickstart-making-calls","_partials/quickstart-making-calls","You can use a visual API testing tool like Postman or Hoppscotch, a terminal-based based tool like curl or HTTPie, or make HTTP requests directly in a script written in your programming language of choice.",{"title":109,"path":110,"stem":111,"description":24,"icon":14,"links":14},"Snippet Auth Token","/_partials/snippet-auth-token","_partials/snippet-auth-token",{"title":113,"path":114,"stem":115,"children":116,"description":118,"icon":14,"links":14},"Directus API Reference","/api","api/index",[117],{"title":113,"path":114,"stem":115,"description":118,"icon":14,"links":14},"Learn how to use our API",{"title":120,"path":121,"stem":122,"children":123,"page":89},"Cloud","/cloud","cloud",[124,144,174,204],{"title":125,"path":126,"stem":127,"children":128,"page":89},"Getting Started","/cloud/getting-started","cloud/1.getting-started",[129,134,139],{"title":130,"path":131,"stem":132,"description":133,"icon":14,"links":14},"Introduction","/cloud/getting-started/introduction","cloud/1.getting-started/1.introduction","Whether you're a hobbyist, startup, or enterprise, our flexible Directus Cloud platform lets you get up and running with Directus quickly.",{"title":135,"path":136,"stem":137,"description":138,"icon":14,"links":14},"Cloud Teams","/cloud/getting-started/teams","cloud/1.getting-started/2.teams","A team is an organizational system that groups accounts together as team members and provides consolidated billing for projects.",{"title":140,"path":141,"stem":142,"description":143,"icon":14,"links":14},"Managing Cloud Accounts","/cloud/getting-started/accounts","cloud/1.getting-started/3.accounts","An account is your portal to Directus Cloud. You can use it to manage your teams, team members, projects and billing.",{"title":145,"path":146,"stem":147,"children":148,"page":89},"Projects","/cloud/projects","cloud/2.projects",[149,154,159,164,169],{"title":150,"path":151,"stem":152,"description":153,"icon":14,"links":14},"Create a Project","/cloud/projects/create","cloud/2.projects/1.create","Create a project in Directus Cloud.",{"title":155,"path":156,"stem":157,"description":158,"icon":14,"links":14},"Destroy a Project","/cloud/projects/destroy","cloud/2.projects/2.destroy","Destroy a Directus Cloud project and cancel your subscription.",{"title":160,"path":161,"stem":162,"description":163,"icon":14,"links":14},"Version Upgrades","/cloud/projects/version-upgrades","cloud/2.projects/3.version-upgrades","Learn about automatic upgrades and version locking in Directus Cloud.",{"title":165,"path":166,"stem":167,"description":168,"icon":14,"links":14},"Monitoring Projects","/cloud/projects/monitoring","cloud/2.projects/4.monitoring","Learn how to monitor your Directus Cloud project.",{"title":170,"path":171,"stem":172,"description":173,"icon":14,"links":14},"Backups","/cloud/projects/backups","cloud/2.projects/5.backups","Learn about automatic backups in Directus Cloud.",{"title":175,"path":176,"stem":177,"children":178,"page":89},"Configuration","/cloud/configuration","cloud/3.configuration",[179,184,189,194,199],{"title":180,"path":181,"stem":182,"description":183,"icon":14,"links":14},"Custom Domains","/cloud/configuration/custom-domains","cloud/3.configuration/1.custom-domains","Learn how to set up a custom domain for your Directus Enterprise Cloud project.",{"title":185,"path":186,"stem":187,"description":188,"icon":14,"links":14},"Environment Variables","/cloud/configuration/environment-variables","cloud/3.configuration/2.environment-variables","Learn about environment variables in Directus Cloud.",{"title":190,"path":191,"stem":192,"description":193,"icon":14,"links":14},"Direct Database Access","/cloud/configuration/direct-database-access","cloud/3.configuration/3.direct-database-access","Learn how to directly access your Directus Cloud project's database.",{"title":195,"path":196,"stem":197,"description":198,"icon":14,"links":14},"Custom Extensions","/cloud/configuration/custom-extensions","cloud/3.configuration/4.custom-extensions","Learn how to deploy custom extensions to your Directus Cloud project.",{"title":200,"path":201,"stem":202,"description":203,"icon":14,"links":14},"Datacenter Regions","/cloud/configuration/datacenter-regions","cloud/3.configuration/5.datacenter-regions","Learn where datacenters for cloud projects are located.",{"title":205,"path":206,"stem":207,"children":208,"page":89},"Billing","/cloud/billing","cloud/4.billing",[209,214,219],{"title":210,"path":211,"stem":212,"description":213,"icon":14,"links":14},"Manage Billing","/cloud/billing/manage-billing","cloud/4.billing/1.manage-billing","Learn how to manage billing for your Directus Cloud project.",{"title":215,"path":216,"stem":217,"description":218,"icon":14,"links":14},"Changing Your Tier","/cloud/billing/changing-tier","cloud/4.billing/2.changing-tier","Learn how to change the tier of your Directus Cloud project.",{"title":220,"path":221,"stem":222,"description":223,"icon":14,"links":14},"Cancel Your Subscription","/cloud/billing/cancel-subscription","cloud/4.billing/3.cancel-subscription","Learn how to cancel your Directus Cloud project subscription.",{"title":225,"path":226,"stem":227,"children":228,"page":89},"Community","/community","community",[229,249,274,293,318],{"title":230,"path":231,"stem":232,"children":233,"page":89},"Overview","/community/overview","community/1.overview",[234,239,244],{"title":235,"path":236,"stem":237,"description":238,"icon":14,"links":14},"Welcome","/community/overview/welcome","community/1.overview/1.welcome","Welcome to the Directus community!",{"title":240,"path":241,"stem":242,"description":243,"icon":14,"links":14},"Code of Conduct","/community/overview/conduct","community/1.overview/2.conduct","Our standards, responsibilities, and enforcement guidelines to create a positive community.",{"title":245,"path":246,"stem":247,"description":248,"icon":14,"links":14},"Moderation Guidelines","/community/overview/moderation","community/1.overview/3.moderation","Guidelines we give to community moderators.",{"title":250,"path":251,"stem":252,"children":253,"page":89},"Contribution","/community/contribution","community/2.contribution",[254,259,264,269],{"title":255,"path":256,"stem":257,"description":258,"icon":14,"links":14},"Translations","/community/contribution/translations","community/2.contribution/1.translations","How to contribute to translating the Data Studio.",{"title":260,"path":261,"stem":262,"description":263,"icon":14,"links":14},"Documentation","/community/contribution/documentation","community/2.contribution/2.documentation","How to contribute to the Directus documentation.",{"title":265,"path":266,"stem":267,"description":268,"icon":14,"links":14},"Feature Requests","/community/contribution/feature-requests","community/2.contribution/3.feature-requests","How to add feature requests, and our process for reviewing them.",{"title":270,"path":271,"stem":272,"description":273,"icon":14,"links":14},"Pull Requests","/community/contribution/pull-requests","community/2.contribution/4.pull-requests","Our process for contributing pull requests to Directus.",{"title":275,"path":276,"stem":277,"children":278,"page":89},"Codebase","/community/codebase","community/3.codebase",[279,283,288],{"title":275,"path":280,"stem":281,"description":282,"icon":14,"links":14},"/community/codebase/overview","community/3.codebase/1.overview","Overview of the Directus codebase for new contributors",{"title":284,"path":285,"stem":286,"description":287,"icon":14,"links":14},"Development Environment","/community/codebase/dev-environment","community/3.codebase/2.dev-environment","How to set up and run a development environment for Directus so that you can work on the platform's source code.",{"title":289,"path":290,"stem":291,"description":292,"icon":14,"links":14},"Testing","/community/codebase/testing","community/3.codebase/3.testing","How to run unit and blackbox tests in the Directus codebase.",{"title":294,"path":295,"stem":296,"children":297,"page":89},"Reporting And Support","/community/reporting-and-support","community/4.reporting-and-support",[298,303,308,313],{"title":299,"path":300,"stem":301,"description":302,"icon":14,"links":14},"Troubleshooting Steps","/community/reporting-and-support/troubleshooting-steps","community/4.reporting-and-support/1.troubleshooting-steps","If you're experiencing issues or think you have found a problem in Directus, be sure to follow these steps.",{"title":304,"path":305,"stem":306,"description":307,"icon":14,"links":14},"Bug Reporting","/community/reporting-and-support/bug-reporting","community/4.reporting-and-support/2.bug-reporting","How to report bugs in Directus.",{"title":309,"path":310,"stem":311,"description":312,"icon":14,"links":14},"Security Reporting","/community/reporting-and-support/security-reporting","community/4.reporting-and-support/3.security-reporting","How to report security issues in Directus.",{"title":314,"path":315,"stem":316,"description":317,"icon":14,"links":14},"Customer Support","/community/reporting-and-support/customer-support","community/4.reporting-and-support/4.customer-support","How to get help with Directus as a user and customer.",{"title":319,"path":320,"stem":321,"children":322,"page":89},"Programs","/community/programs","community/5.programs",[323,328],{"title":324,"path":325,"stem":326,"description":327,"icon":14,"links":14},"Guest Authors","/community/programs/guest-authors","community/5.programs/1.guest-authors","Our guest author program invites authors to join and get paid to write tutorials for the Directus community.",{"title":329,"path":330,"stem":331,"description":332,"icon":14,"links":14},"Directus Labs","/community/programs/directus-labs","community/5.programs/2.directus-labs","Directus Labs is the official organization for Directus templates, settings and experimental projects.",{"title":175,"path":334,"stem":335,"children":336,"page":89},"/configuration","configuration",[337,341,346,351,356,361,366,371,376,381,386,391,396,401,406,410,415,420,425],{"title":130,"path":338,"stem":339,"description":340,"icon":14,"links":14},"/configuration/intro","configuration/0.intro","Environment variables are used for all configuration within a Directus project. These variables can be defined in a number of ways, which we cover below.",{"title":342,"path":343,"stem":344,"description":345,"icon":14,"links":14},"General","/configuration/general","configuration/1.general","Configuration for the general system, server, first admin user, and telemetry.",{"title":347,"path":348,"stem":349,"description":350,"icon":14,"links":14},"AI","/configuration/ai","configuration/ai","Configuration for AI Assistant and Model Context Protocol (MCP) features.",{"title":352,"path":353,"stem":354,"description":355,"icon":14,"links":14},"Auth & SSO","/configuration/auth-sso","configuration/auth-sso","Configuration for authentication methods, including local email/password, OAuth 2.0, OpenID, LDAP, and SAML.",{"title":357,"path":358,"stem":359,"description":360,"icon":14,"links":14},"Cache","/configuration/cache","configuration/cache","Configuration for internal and output caching.",{"title":362,"path":363,"stem":364,"description":365,"icon":14,"links":14},"Database","/configuration/database","configuration/database","Configuration for database connections.",{"title":367,"path":368,"stem":369,"description":370,"icon":14,"links":14},"Email","/configuration/email","configuration/email","Configuration for email settings and templates.",{"title":372,"path":373,"stem":374,"description":375,"icon":14,"links":14},"Extensions","/configuration/extensions","configuration/extensions","Configuration for extensions and the Directus Marketplace.",{"title":377,"path":378,"stem":379,"description":380,"icon":14,"links":14},"Files","/configuration/files","configuration/files","Configuration for storage locations, metadata, upload limits, and transformations.",{"title":382,"path":383,"stem":384,"description":385,"icon":14,"links":14},"Flows","/configuration/flows","configuration/flows","Configure environment variables, memory, and timeout for Flows.",{"title":387,"path":388,"stem":389,"description":390,"icon":14,"links":14},"Logging","/configuration/logging","configuration/logging","Configuration for general and Realtime logging.",{"title":392,"path":393,"stem":394,"description":395,"icon":14,"links":14},"Metrics","/configuration/metrics","configuration/metrics","Configuration for metrics.",{"title":397,"path":398,"stem":399,"description":400,"icon":14,"links":14},"Migrations","/configuration/migrations","configuration/migrations","Creation of custom migration files to automate database changes.",{"title":402,"path":403,"stem":404,"description":405,"icon":14,"links":14},"PM2","/configuration/pm2","configuration/pm2","Configuration for PM2, the process manager for Directus.",{"title":86,"path":407,"stem":408,"description":409,"icon":14,"links":14},"/configuration/realtime","configuration/realtime","Configuration for WebSockets and GraphQL Subscriptions.",{"title":411,"path":412,"stem":413,"description":414,"icon":14,"links":14},"Security & Limits","/configuration/security-limits","configuration/security-limits","Configuration for access tokens, cookies, CSP, hashing, CORS, rate limiting, and request limits.",{"title":416,"path":417,"stem":418,"description":419,"icon":14,"links":14},"Synchronization","/configuration/synchronization","configuration/synchronization","Configuration around synchronization and Redis.",{"title":421,"path":422,"stem":423,"description":424,"icon":14,"links":14},"Theming","/configuration/theming","configuration/theming","Configuration of the Data Studio's theming engine and appearance settings.",{"title":255,"path":426,"stem":427,"description":428,"icon":14,"links":14},"/configuration/translations","configuration/translations","Directus supports translations for both the Data Studio UI and authored content.",{"title":125,"description":14,"icon":14,"links":14,"path":430,"stem":431,"children":432,"page":89},"/getting-started","getting-started",[433,437,442,446,451,456,461,466,471,476],{"title":230,"path":434,"stem":435,"description":436,"icon":14,"links":14},"/getting-started/overview","getting-started/1.overview","Learn about the Directus Data Engine and Studio, when to use it, and a how it works.",{"title":438,"path":439,"stem":440,"description":441,"icon":14,"links":14},"Accessibility","/getting-started/accessibility","getting-started/10.accessibility","We are always looking for ways to make Directus Studio more accessible. Here are some of the methods we currently support.",{"title":150,"path":443,"stem":444,"description":445,"icon":14,"links":14},"/getting-started/create-a-project","getting-started/2.create-a-project","Learn about how to create a managed Directus project or self-host with Docker.",{"title":447,"path":448,"stem":449,"description":450,"icon":14,"links":14,"label":447},"Configure a Data Model","/getting-started/data-model","getting-started/3.data-model","This guide will cover creating a collection in Directus via the Data Studio, creating fields, and configuring relationships.",{"title":452,"path":453,"stem":454,"description":455,"icon":14,"links":14},"Use the API","/getting-started/use-the-api","getting-started/4.use-the-api","Get started with Directus APIs. Learn to interact with collections, fetch, and create data.",{"title":457,"path":458,"stem":459,"description":460,"icon":14,"links":14},"Authenticate a User","/getting-started/authenticate-user","getting-started/5.authenticate-user","Get started with Directus Auth. Learn how to register, login, create users, and make authenticated requests.",{"title":462,"path":463,"stem":464,"description":465,"icon":14,"links":14},"Upload & Access Files","/getting-started/upload-files","getting-started/6.upload-files","This guide will cover importing a file via URL, requesting assets, and using transformation parameters.",{"title":467,"path":468,"stem":469,"description":470,"icon":14,"links":14},"Create an Automation","/getting-started/create-an-automation","getting-started/7.create-an-automation","Get started using flows, triggers, operations and the data chain in Directus Automate.",{"title":472,"path":473,"stem":474,"description":475,"icon":14,"links":14},"Connect to Realtime Data","/getting-started/connect-to-realtime","getting-started/8.connect-to-realtime","This guide will cover connecting to Directus via WebSockets on the web, subscribing to changes, and creating new items over the connection.",{"title":477,"path":478,"stem":479,"description":480,"icon":14,"links":14},"Resources & Links","/getting-started/resources","getting-started/9.resources","Key links across the Directus ecosystem.",{"title":482,"path":483,"stem":484,"children":485,"page":89},"Guides","/guides","guides",[486,512,595,642,677,707,732,756,771,886,899,988],{"title":487,"description":14,"icon":488,"links":14,"path":489,"stem":490,"children":491,"page":89},"Data Model","directus-explore","/guides/data-model","guides/01.data-model",[492,497,502,507],{"title":493,"path":494,"stem":495,"description":496,"icon":14,"links":14},"Collections","/guides/data-model/collections","guides/01.data-model/1.collections","Directus collections help you manage your data. Create custom collections, define fields, configure relationships, and leverage features like content versioning and access control. Learn how to create, configure, and manage collections in Directus.",{"title":498,"path":499,"stem":500,"description":501,"icon":14,"links":14},"Fields","/guides/data-model/fields","guides/01.data-model/2.fields","Directus fields let you define how your data is stored and displayed. Learn about creating fields, data types, interfaces, validations, relationships, and more. Discover how to configure fields to perfectly suit your data modeling needs in Directus.",{"title":503,"path":504,"stem":505,"description":506,"icon":14,"links":14},"Interfaces","/guides/data-model/interfaces","guides/01.data-model/3.interfaces","Manage your data effectively with Directus fields. Discover various field types, interfaces, validations, and relationships to perfectly suit your data modeling needs.",{"title":508,"path":509,"stem":510,"description":511,"icon":14,"links":14},"Relationships","/guides/data-model/relationships","guides/01.data-model/4.relationships","Leverage Directus relationships to create powerful data connections. Explore Many to One, One to Many, Many to Many, and Many to Any relationships, along with Translations for multilingual content management.",{"title":513,"description":14,"icon":514,"links":14,"path":515,"stem":516,"children":517,"page":89},"Content","directus-editor","/guides/content","guides/02.content",[518,523,528,533,538,543,548,552,574],{"title":519,"path":520,"stem":521,"description":522,"icon":14,"links":14},"Collection Explorer","/guides/content/explore","guides/02.content/1.explore","Learn to filter, layout, batch edit and more with collections in the collection explorer.",{"title":524,"path":525,"stem":526,"description":527,"icon":14,"links":14},"Item Editor","/guides/content/editor","guides/02.content/2.editor","Learn to create, duplicate, archive and perform other actions with items using Directus.",{"title":529,"path":530,"stem":531,"description":532,"icon":14,"links":14},"Layouts","/guides/content/layouts","guides/02.content/3.layouts","Learn to use layouts for viewing and interacting with items in a collection using Directus.",{"title":534,"path":535,"stem":536,"description":537,"icon":14,"links":14},"Import & Export","/guides/content/import-export","guides/02.content/4.import-export","Learn to import and export multiple items stored as files using Directus.",{"title":539,"path":540,"stem":541,"description":542,"icon":14,"links":14},"Live Preview","/guides/content/live-preview","guides/02.content/5.live-preview","Learn to set up your project for live previewing items from your application.",{"title":544,"path":545,"stem":546,"description":547,"icon":14,"links":14},"Content Versioning","/guides/content/content-versioning","guides/02.content/6.content-versioning","This guide covers the process of enabling and utilizing Content Versioning in Directus.",{"title":255,"path":549,"stem":550,"description":551,"icon":14,"links":14},"/guides/content/translations","guides/02.content/7.translations","Both content and the data studio can be translated into multiple languages.",{"title":553,"path":554,"stem":555,"children":556,"description":558,"icon":14,"links":14},"Visual Editor","/guides/content/visual-editor","guides/02.content/8.visual-editor/0.index",[557,559,564,569],{"title":553,"path":554,"stem":555,"description":558,"icon":14,"links":14},"The Directus visual editor module allows you to visually edit the content of your website directly in-place.",{"title":560,"path":561,"stem":562,"description":563,"icon":14,"links":14},"Frontend Library","/guides/content/visual-editor/frontend-library","guides/02.content/8.visual-editor/1.frontend-library","A library that allows your website to communicate with your Directus project and enables Visual Editing.",{"title":565,"path":566,"stem":567,"description":568,"icon":14,"links":14},"Studio Module","/guides/content/visual-editor/studio-module","guides/02.content/8.visual-editor/2.studio-module","Learn how to edit your website's content in place from within the Directus Studio.",{"title":570,"path":571,"stem":572,"description":573,"icon":14,"links":14},"Customization","/guides/content/visual-editor/customization","guides/02.content/8.visual-editor/3.customization","Customize the styling of your Visual Editing experience to suit your brand or website theming.",{"title":575,"path":576,"stem":577,"children":578,"description":580,"icon":14,"links":14},"Collaborative Editing","/guides/content/collaborative-editing","guides/02.content/9.collaborative-editing/0.index",[579,581,585,590],{"title":575,"path":576,"stem":577,"description":580,"icon":14,"links":14},"Directus Collaborative Editing enables real-time data synchronization and collaborative editing across collections, allowing multiple users to edit content simultaneously without conflicts.",{"title":175,"path":582,"stem":583,"description":584,"icon":14,"links":14},"/guides/content/collaborative-editing/configuration","guides/02.content/9.collaborative-editing/1.configuration","Learn how to configure Collaborative Editing in your Directus project.",{"title":586,"path":587,"stem":588,"description":589,"icon":14,"links":14},"Usage Guide","/guides/content/collaborative-editing/usage","guides/02.content/9.collaborative-editing/2.usage","Learn how to use Collaborative Editing for real-time collaboration on content in your Directus project.",{"title":591,"path":592,"stem":593,"description":594,"icon":14,"links":14},"Development & Custom Extensions","/guides/content/collaborative-editing/development","guides/02.content/9.collaborative-editing/3.development","Learn how Custom Interfaces integrate with Collaborative Editing in Directus.",{"title":74,"description":14,"icon":596,"links":14,"path":597,"stem":598,"children":599,"page":89},"directus-auth","/guides/auth","guides/03.auth",[600,605,610,615,620,625,630],{"title":601,"path":602,"stem":603,"description":604,"icon":14,"links":14},"Access Tokens","/guides/auth/tokens-cookies","guides/03.auth/1.tokens-cookies","Learn how to authenticate requests & explore standard, session, and static token types.",{"title":606,"path":607,"stem":608,"description":609,"icon":14,"links":14},"Access Control","/guides/auth/access-control","guides/03.auth/2.access-control","Manage user and role permissions and policies for interacting with data in Directus.",{"title":611,"path":612,"stem":613,"description":614,"icon":14,"links":14},"Creating Users","/guides/auth/creating-users","guides/03.auth/3.creating-users","Learn about creating users in directus, including API creation, inviting users, and seamless invites.",{"title":616,"path":617,"stem":618,"description":619,"icon":14,"links":14},"Email Login","/guides/auth/email-login","guides/03.auth/4.email-login","Learn about user registration, login with standard/session tokens, refresh, logout, and resetting passwords.",{"title":621,"path":622,"stem":623,"description":624,"icon":14,"links":14},"Two-Factor Auth","/guides/auth/2fa","guides/03.auth/5.2fa","Secure your logins with one-time codes! Learn how to generate secrets, enable/disable 2FA.",{"title":626,"path":627,"stem":628,"description":629,"icon":14,"links":14},"Accountability","/guides/auth/accountability","guides/03.auth/6.accountability","Learn to audit user activity and enforce accountability using the activity feed.",{"title":631,"path":632,"stem":633,"children":634,"description":636,"icon":14,"links":14},"Single Sign-On","/guides/auth/sso","guides/03.auth/7.sso/1.index",[635,637],{"title":631,"path":632,"stem":633,"description":636,"icon":14,"links":14},"Single Sign-On is a mechanism which allows to use external providers to login into systems.",{"title":638,"path":639,"stem":640,"description":641,"icon":14,"links":14},"Seamless SSO","/guides/auth/sso/seamless","guides/03.auth/7.sso/2.seamless","Seamless SSO is a setup to allow logging in without the user ever seeing Directus' login page.",{"title":643,"description":14,"icon":644,"links":14,"path":645,"stem":646,"children":647,"page":89},"Connect","directus-connect","/guides/connect","guides/04.connect",[648,652,657,662,667,672],{"title":16,"path":649,"stem":650,"description":651,"icon":14,"links":14},"/guides/connect/authentication","guides/04.connect/1.authentication","Discover how to authenticate Directus Connect requests using authorization headers, session cookies, or query parameters.",{"title":653,"path":654,"stem":655,"description":656,"icon":14,"links":14},"Filter Rules","/guides/connect/filter-rules","guides/04.connect/2.filter-rules","Learn about filter rules in Directus - available operators, filter syntax, relational fields, dynamic variables, logical operators, and functions parameters. Understand how to build complex filters for permissions, validations, and automations.",{"title":658,"path":659,"stem":660,"description":661,"icon":14,"links":14},"Query Parameters","/guides/connect/query-parameters","guides/04.connect/3.query-parameters","Learn about Directus query parameters - fields, filter, search, sort, limit, offset, page, aggregate, groupBy, deep, alias, and export. Understand how to customize your API requests and retrieve specific data from your collections.",{"title":663,"path":664,"stem":665,"description":666,"icon":14,"links":14},"Relational Data","/guides/connect/relations","guides/04.connect/4.relations","Directus enables you to manage and interact with relational data. This section will guide you through the different types of relationships and how to work with them.",{"title":668,"path":669,"stem":670,"description":671,"icon":14,"links":14},"Error Codes","/guides/connect/errors","guides/04.connect/5.errors","Learn about Directus error codes - understand what each code means, from validation failures to rate limits exceeded. Troubleshoot issues with your API requests and resolve errors efficiently.",{"title":673,"path":674,"stem":675,"description":676,"icon":14,"links":14},"Directus SDK","/guides/connect/sdk","guides/04.connect/6.sdk","A JavaScript and TypeScript library that simplifies working with Directus.",{"title":377,"description":14,"icon":678,"links":14,"path":679,"stem":680,"children":681,"page":89},"directus-files","/guides/files","guides/05.files",[682,687,692,697,702],{"title":683,"path":684,"stem":685,"description":686,"icon":14,"links":14},"Upload Files","/guides/files/upload","guides/05.files/1.upload","Learn to upload files to Directus via both the data studio or API.",{"title":688,"path":689,"stem":690,"description":691,"icon":14,"links":14},"Download Files","/guides/files/download","guides/05.files/2.download","Learn to download content from the File Library",{"title":693,"path":694,"stem":695,"description":696,"icon":14,"links":14},"Manage Files","/guides/files/manage","guides/05.files/3.manage","Learn to view, modify, edit and set files' focal points.",{"title":698,"path":699,"stem":700,"description":701,"icon":14,"links":14},"Access Files","/guides/files/access","guides/05.files/4.access","Learn how to access uploaded files, authenticate, provide optional filenames and directly download them.",{"title":703,"path":704,"stem":705,"description":706,"icon":14,"links":14},"Transform Files","/guides/files/transform","guides/05.files/5.transform","Learn how to transform files and set custom presets for these transformations.",{"title":708,"description":14,"icon":709,"links":14,"path":710,"stem":711,"children":712,"page":89},"Automate","directus-automate","/guides/automate","guides/06.automate",[713,717,722,727],{"title":382,"path":714,"stem":715,"description":716,"icon":14,"links":14},"/guides/automate/flows","guides/06.automate/1.flows","Flows enable custom, event-driven data processing and task automation within Directus.",{"title":718,"path":719,"stem":720,"description":721,"icon":14,"links":14},"Data Chain","/guides/automate/data-chain","guides/06.automate/2.data-chain","Data chains are created by each flow and hold information that can be accessed within different operations.",{"title":723,"path":724,"stem":725,"description":726,"icon":14,"links":14},"Triggers","/guides/automate/triggers","guides/06.automate/3.triggers","Triggers define the action or events that start flows.",{"title":728,"path":729,"stem":730,"description":731,"icon":14,"links":14},"Operations","/guides/automate/operations","guides/06.automate/4.operations","Operations are individual customizable actions in a flow.",{"title":86,"description":14,"icon":733,"links":14,"path":734,"stem":735,"children":736,"page":89},"directus-realtime","/guides/realtime","guides/07.realtime",[737,741,746,751],{"title":16,"path":738,"stem":739,"description":740,"icon":14,"links":14},"/guides/realtime/authentication","guides/07.realtime/1.authentication","Learn to implement the three authentication modes.",{"title":742,"path":743,"stem":744,"description":745,"icon":14,"links":14},"Subscriptions","/guides/realtime/subscriptions","guides/07.realtime/2.subscriptions","Learn to manage realtime subscriptions with both websockets and GraphQL.",{"title":747,"path":748,"stem":749,"description":750,"icon":14,"links":14},"Actions","/guides/realtime/actions","guides/07.realtime/3.actions","Learn to execute CRUD actions via websockets.",{"title":752,"path":753,"stem":754,"description":755,"icon":14,"links":14},"Custom WebSocket Handlers","/guides/realtime/custom-handlers","guides/07.realtime/4.custom-handlers","Build custom WebSocket message handlers, push messages to connected clients, and react to WebSocket events using hook extensions.",{"title":757,"description":14,"icon":758,"links":14,"path":759,"stem":760,"children":761,"page":89},"Insights","directus-insights","/guides/insights","guides/08.insights",[762,766],{"title":230,"path":763,"stem":764,"description":765,"icon":14,"links":14},"/guides/insights/overview","guides/08.insights/1.overview","Insights is a module in Directus that allows rapid, no-code build-out of analytics dashboards.",{"title":767,"path":768,"stem":769,"description":770,"icon":14,"links":14},"Panels","/guides/insights/panels","guides/08.insights/2.panels","Panels are the building-blocks you can add onto insights dashboards to create, save and display data analytics.",{"title":372,"description":14,"icon":772,"links":14,"path":773,"stem":774,"children":775,"page":89},"directus-marketplace","/guides/extensions","guides/09.extensions",[776,780,785,817,864,869,881],{"title":230,"path":777,"stem":778,"description":779,"icon":14,"links":14},"/guides/extensions/overview","guides/09.extensions/0.overview","Extensions are used to extend the functionality of Directus.",{"title":781,"path":782,"stem":783,"description":784,"icon":14,"links":14},"Quickstart","/guides/extensions/quickstart","guides/09.extensions/1.quickstart","This guide will cover how to get started with developing an extension for Directus.",{"title":786,"path":787,"stem":788,"children":789,"description":791,"icon":14,"links":14},"API Extensions","/guides/extensions/api-extensions","guides/09.extensions/2.api-extensions/0.index",[790,792,797,802,807,812],{"title":786,"path":787,"stem":788,"description":791,"icon":14,"links":14},"API Extensions extend the functionality of the API.",{"title":793,"path":794,"stem":795,"description":796,"icon":14,"links":14},"Event Hooks","/guides/extensions/api-extensions/hooks","guides/09.extensions/2.api-extensions/1.hooks","Hooks allow running code when during the Directus lifecycle or database events.",{"title":798,"path":799,"stem":800,"description":801,"icon":14,"links":14},"API Endpoints","/guides/extensions/api-extensions/endpoints","guides/09.extensions/2.api-extensions/2.endpoints","Endpoints allow you to register new API routes in your Directus project.",{"title":803,"path":804,"stem":805,"description":806,"icon":14,"links":14},"Flow Operations","/guides/extensions/api-extensions/operations","guides/09.extensions/2.api-extensions/3.operations","Operations are single steps in a Flow - the no-code automation tool part of Directus Automate.",{"title":808,"path":809,"stem":810,"description":811,"icon":14,"links":14},"Services","/guides/extensions/api-extensions/services","guides/09.extensions/2.api-extensions/4.services","When building extensions, you may use internal Directus services directly.",{"title":813,"path":814,"stem":815,"description":816,"icon":14,"links":14},"Sandbox","/guides/extensions/api-extensions/sandbox","guides/09.extensions/2.api-extensions/5.sandbox","Sandboxed Extensions run in an isolated environment and must request permission scopes.",{"title":818,"path":819,"stem":820,"children":821,"description":823,"icon":14,"links":14},"App Extensions","/guides/extensions/app-extensions","guides/09.extensions/3.app-extensions/0.index",[822,824,829,834,839,844,849,854,859],{"title":818,"path":819,"stem":820,"description":823,"icon":14,"links":14},"App Extensions extend the functionality of the Data Studio.",{"title":825,"path":826,"stem":827,"description":828,"icon":14,"links":14},"Editor Interfaces","/guides/extensions/app-extensions/interfaces","guides/09.extensions/3.app-extensions/1.interfaces","Interfaces are form inputs used primarily inside of the Directus Editor.",{"title":830,"path":831,"stem":832,"description":833,"icon":14,"links":14},"Inline Displays","/guides/extensions/app-extensions/displays","guides/09.extensions/3.app-extensions/2.displays","Displays are used to display a single value throughout the Data Studio.",{"title":835,"path":836,"stem":837,"description":838,"icon":14,"links":14},"Explore Layouts","/guides/extensions/app-extensions/layouts","guides/09.extensions/3.app-extensions/3.layouts","Layouts are used to display a list of items in Explore pages in different ways.",{"title":840,"path":841,"stem":842,"description":843,"icon":14,"links":14},"Dashboard Panels","/guides/extensions/app-extensions/panels","guides/09.extensions/3.app-extensions/4.panels","Panels are customizable components within Directus Insights dashboards.",{"title":845,"path":846,"stem":847,"description":848,"icon":14,"links":14},"Custom Modules","/guides/extensions/app-extensions/modules","guides/09.extensions/3.app-extensions/5.modules","Modules are top-level areas of the Data Studio, navigated to from the left-hand module bar.",{"title":850,"path":851,"stem":852,"description":853,"icon":14,"links":14},"Custom Themes","/guides/extensions/app-extensions/themes","guides/09.extensions/3.app-extensions/6.themes","Themes are used to style elements of the Data Studio including colors and fonts.",{"title":855,"path":856,"stem":857,"description":858,"icon":14,"links":14},"UI Library","/guides/extensions/app-extensions/ui-library","guides/09.extensions/3.app-extensions/7.ui-library","Directus offers globally-registered UI components for building extensions.",{"title":860,"path":861,"stem":862,"description":863,"icon":14,"links":14},"Composables","/guides/extensions/app-extensions/composables","guides/09.extensions/3.app-extensions/8.composables","Vue composables for working with Directus services when building extensions.",{"title":865,"path":866,"stem":867,"description":868,"icon":14,"links":14},"Bundling Extensions","/guides/extensions/bundles","guides/09.extensions/4.bundles","Bundles are a way to group extensions together as a single distributable package.",{"title":870,"path":871,"stem":872,"children":873,"description":875,"icon":14,"links":14},"Marketplace Beta","/guides/extensions/marketplace","guides/09.extensions/5.marketplace/0.index",[874,876],{"title":870,"path":871,"stem":872,"description":875,"icon":14,"links":14},"The Directus Marketplace provides a way for users to install extensions in their projects directly the Data Studio.",{"title":877,"path":878,"stem":879,"description":880,"icon":14,"links":14},"Publishing Extensions","/guides/extensions/marketplace/publishing","guides/09.extensions/5.marketplace/1.publishing","Publish extensions to the Directus Marketplace via npm, including required metadata, best practices, and author profile setup.",{"title":882,"path":883,"stem":884,"description":885,"icon":14,"links":14},"CLI","/guides/extensions/cli","guides/09.extensions/6.cli","Using the create-directus-extension to build, validate and manage extensions.",{"title":887,"path":888,"stem":889,"children":890,"description":14,"icon":898,"links":14},"Deployments","/guides/deployments","guides/10.deployments/0.index",[891,893],{"title":230,"path":888,"stem":889,"description":892,"icon":14,"links":14},"Trigger, monitor, and manage frontend deployments directly from Directus.",{"title":894,"path":895,"stem":896,"description":897,"icon":14,"links":14},"Security","/guides/deployments/security","guides/10.deployments/1.security","Access control, permissions, and credential protection for the Deployment module.","directus-deployments",{"title":347,"path":900,"stem":901,"children":902,"description":14,"icon":987,"links":14},"/guides/ai","guides/11.ai/0.index",[903,906,937],{"title":904,"path":900,"stem":901,"description":905,"icon":14,"links":14},"AI + Directus","Use AI to interact with Directus - either through the built-in AI Assistant or by connecting external AI tools via MCP.",{"title":907,"path":908,"stem":909,"children":910,"description":14,"icon":14,"links":14},"AI Assistant","/guides/ai/assistant","guides/11.ai/1.assistant/0.index",[911,913,918,923,928,933],{"title":230,"path":908,"stem":909,"description":912,"icon":14,"links":14},"Chat with an AI assistant directly inside Directus. Create content, manage your schema, trigger automations, and explore your data through natural conversation.",{"title":914,"path":915,"stem":916,"description":917,"icon":14,"links":14},"Setup","/guides/ai/assistant/setup","guides/11.ai/1.assistant/1.setup","Configure AI Assistant by adding your AI provider API keys and customizing assistant behavior.",{"title":919,"path":920,"stem":921,"description":922,"icon":14,"links":14},"Usage","/guides/ai/assistant/usage","guides/11.ai/1.assistant/2.usage","Learn how to use AI Assistant to interact with your Directus instance through natural conversation.",{"title":924,"path":925,"stem":926,"description":927,"icon":14,"links":14},"Tools","/guides/ai/assistant/tools","guides/11.ai/1.assistant/3.tools","Reference of all tools available to AI Assistant for interacting with your Directus instance.",{"title":929,"path":930,"stem":931,"description":932,"icon":14,"links":14},"Best Practices","/guides/ai/assistant/tips","guides/11.ai/1.assistant/4.tips","Get the most out of AI Assistant with practical tips, example prompts, and common pitfalls to avoid.",{"title":894,"path":934,"stem":935,"description":936,"icon":14,"links":14},"/guides/ai/assistant/security","guides/11.ai/1.assistant/5.security","Security considerations for using AI Assistant safely with your Directus data.",{"title":938,"path":939,"stem":940,"children":941,"description":14,"icon":14,"links":14},"MCP Server","/guides/ai/mcp","guides/11.ai/2.mcp/0.index",[942,944,949,954,958,963,968,972],{"title":230,"path":939,"stem":940,"description":943,"icon":14,"links":14},"Connect AI assistants directly to your Directus instance. Let Claude, ChatGPT, and other AI tools manage your content without manual copy-pasting.",{"title":945,"path":946,"stem":947,"description":948,"icon":14,"links":14},"Installation","/guides/ai/mcp/installation","guides/11.ai/2.mcp/1.installation","Set up the Directus MCP server and connect your AI tools in under 5 minutes.",{"title":950,"path":951,"stem":952,"description":953,"icon":14,"links":14},"Use Cases","/guides/ai/mcp/use-cases","guides/11.ai/2.mcp/2.use-cases","Real examples of how to use AI with your Directus content to save time and reduce repetitive work.",{"title":924,"path":955,"stem":956,"description":957,"icon":14,"links":14},"/guides/ai/mcp/tools","guides/11.ai/2.mcp/3.tools","Learn about the tools available in the Directus remote MCP server and how they enable AI-powered content management.",{"title":959,"path":960,"stem":961,"description":962,"icon":14,"links":14},"Prompts","/guides/ai/mcp/prompts","guides/11.ai/2.mcp/4.prompts","Learn how to configure and use stored prompts with the Directus MCP Server.",{"title":964,"path":965,"stem":966,"description":967,"icon":14,"links":14},"Troubleshooting","/guides/ai/mcp/troubleshooting","guides/11.ai/2.mcp/5.troubleshooting","Common issues and solutions when setting up and using the Directus MCP server.",{"title":894,"path":969,"stem":970,"description":971,"icon":14,"links":14},"/guides/ai/mcp/security","guides/11.ai/2.mcp/6.security","Practical security guidelines for using the Directus MCP server safely and protecting your data.",{"title":973,"path":974,"stem":975,"children":976,"description":14,"icon":14,"links":14},"Local MCP","/guides/ai/mcp/local-mcp","guides/11.ai/2.mcp/7.local-mcp/0.index",[977,979,983],{"title":945,"path":974,"stem":975,"description":978,"icon":14,"links":14},"The Directus Content MCP Server allows you to interact with your Directus data through AI tools using the Model Context Protocol.",{"title":924,"path":980,"stem":981,"description":982,"icon":14,"links":14},"/guides/ai/mcp/local-mcp/tools","guides/11.ai/2.mcp/7.local-mcp/1.tools","Learn about the tools available in the local Directus Content MCP Server and how to configure them.",{"title":959,"path":984,"stem":985,"description":986,"icon":14,"links":14},"/guides/ai/mcp/local-mcp/prompts","guides/11.ai/2.mcp/7.local-mcp/2.prompts","Configure stored prompts with the local MCP server using environment variables and manual collection setup.","directus-ai",{"title":989,"description":14,"icon":990,"links":14,"path":991,"stem":992,"children":993},"Integrations","directus-integrations","/guides/integrations","guides/12.integrations/index",[994,996,1003,1024,1046,1065,1076],{"title":989,"path":991,"stem":992,"description":995,"icon":14,"links":14},"Connect Directus with third-party tools and services to extend functionality and automate workflows.",{"title":997,"path":998,"stem":999,"children":1000,"description":14,"icon":14,"links":14},"Framer","/guides/integrations/framer","guides/11.integrations/6.framer/0.index",[1001],{"title":997,"path":998,"stem":999,"description":1002,"icon":14,"links":14},"Connect your Directus collections to Framer's CMS to sync content in both directions using the Directus Framer plugin.",{"title":1004,"path":1005,"stem":1006,"children":1007,"description":14,"icon":14,"links":14},"n8n","/guides/integrations/n8n","guides/12.integrations/1.n8n/0.index",[1008,1011,1015,1020],{"title":1009,"path":1005,"stem":1006,"description":1010,"icon":14,"links":14},"Integration","Connect Directus with n8n to automate workflows, sync data, and integrate your CMS with other services using the Directus community node.",{"title":747,"path":1012,"stem":1013,"description":1014,"icon":14,"links":14},"/guides/integrations/n8n/directus-n8n-actions","guides/12.integrations/1.n8n/directus-n8n-actions","Complete guide for using Directus actions in n8n workflows, including working with items, users, and files.",{"title":1016,"path":1017,"stem":1018,"description":1019,"icon":14,"links":14},"Advanced","/guides/integrations/n8n/directus-n8n-advanced","guides/12.integrations/1.n8n/directus-n8n-advanced","Advanced guide for using Directus raw CRUD operations in n8n, including raw JSON operations, complex filters, relational queries, and query parameters.",{"title":723,"path":1021,"stem":1022,"description":1023,"icon":14,"links":14},"/guides/integrations/n8n/directus-n8n-triggers","guides/12.integrations/1.n8n/directus-n8n-triggers","Complete guide for using Directus triggers in n8n workflows to automate workflows when events happen in Directus.",{"title":1025,"path":1026,"stem":1027,"children":1028,"description":14,"icon":14,"links":14},"Clay","/guides/integrations/clay","guides/12.integrations/2.clay/0.index",[1029,1031,1036,1041],{"title":1009,"path":1026,"stem":1027,"description":1030,"icon":14,"links":14},"Connect Directus with Clay to automate data enrichment and sync content between platforms using webhooks and HTTP API templates.",{"title":1032,"path":1033,"stem":1034,"description":1035,"icon":14,"links":14},"Data Operations","/guides/integrations/clay/directus-clay-data-operations","guides/12.integrations/2.clay/directus-clay-data-operations","Advanced techniques for working with Directus data in Clay, including filters, pagination, common use cases, and best practices.",{"title":1037,"path":1038,"stem":1039,"description":1040,"icon":14,"links":14},"Templates","/guides/integrations/clay/use-clay-templates-with-directus","guides/12.integrations/2.clay/use-clay-templates-with-directus","Learn how to use Clay's pre-built HTTP API templates to connect with Directus for data enrichment and synchronization.",{"title":1042,"path":1043,"stem":1044,"description":1045,"icon":14,"links":14},"Webhooks","/guides/integrations/clay/use-directus-webhooks-with-clay","guides/12.integrations/2.clay/use-directus-webhooks-with-clay","Learn how to set up Directus Flows to automatically send data to Clay webhooks for real-time data synchronization.",{"title":1047,"path":1048,"stem":1049,"children":1050,"description":14,"icon":14,"links":14},"Zapier","/guides/integrations/zapier","guides/12.integrations/3.zapier/0.index",[1051,1053,1057,1061],{"title":1009,"path":1048,"stem":1049,"description":1052,"icon":14,"links":14},"Connect Directus with Zapier to automate workflows, sync data, and integrate your CMS with thousands of other apps using the Directus Zapier integration.",{"title":747,"path":1054,"stem":1055,"description":1056,"icon":14,"links":14},"/guides/integrations/zapier/actions","guides/12.integrations/3.zapier/actions","Complete guide for using Directus actions in Zapier workflows, including working with items, users, and files.",{"title":1016,"path":1058,"stem":1059,"description":1060,"icon":14,"links":14},"/guides/integrations/zapier/advanced","guides/12.integrations/3.zapier/advanced","Advanced guide for using Directus API features in Zapier, including raw request actions, advanced filtering, and custom API calls.",{"title":723,"path":1062,"stem":1063,"description":1064,"icon":14,"links":14},"/guides/integrations/zapier/triggers","guides/12.integrations/3.zapier/triggers","Complete guide for using Directus triggers in Zapier workflows to automatically start Zaps when events happen in Directus.",{"title":1066,"path":1067,"stem":1068,"children":1069,"description":14,"icon":14,"links":14},"Vercel","/guides/integrations/vercel","guides/12.integrations/4.vercel/0.index",[1070,1072],{"title":1066,"path":1067,"stem":1068,"description":1071,"icon":14,"links":14},"Connect Directus with Vercel to trigger deployments, monitor build status, and manage your frontend projects directly from your Directus instance.",{"title":887,"path":1073,"stem":1074,"description":1075,"icon":14,"links":14},"/guides/integrations/vercel/deployments","guides/12.integrations/4.vercel/deployments","Complete guide for triggering deployments, monitoring build status, and viewing logs for your Vercel projects from Directus.",{"title":1077,"path":1078,"stem":1079,"children":1080,"description":14,"icon":14,"links":14},"Netlify","/guides/integrations/netlify","guides/12.integrations/5.netlify/0.index",[1081,1083],{"title":1077,"path":1078,"stem":1079,"description":1082,"icon":14,"links":14},"Integrate Directus with Netlify to deploy your sites, track build progress, and manage frontend projects from within your Directus instance.",{"title":887,"path":1084,"stem":1085,"description":1086,"icon":14,"links":14},"/guides/integrations/netlify/deployments","guides/12.integrations/5.netlify/deployments","Full guide for triggering builds, tracking deployment progress, and viewing logs for your Netlify sites from Directus.",{"title":230,"path":1088,"stem":1089,"children":1090,"description":1092,"icon":14,"links":14},"/releases","releases/1.index",[1091,1093,1098],{"title":230,"path":1088,"stem":1089,"description":1092,"icon":14,"links":14},"Releases are how we roll out new features, updates, and fixes to Directus.",{"title":1094,"path":1095,"stem":1096,"description":1097,"icon":14,"links":14},"Changelog","/releases/changelog","releases/2.changelog","A monthly summary of what's new from the Directus team.",{"title":1099,"path":1100,"stem":1101,"children":1102,"description":1104,"icon":14,"links":14},"Breaking Changes","/releases/breaking-changes","releases/3.breaking-changes/0.index",[1103,1105,1109],{"title":1099,"path":1100,"stem":1101,"description":1104,"icon":14,"links":14},"Breaking changes may require action on your part before upgrading.",{"title":1106,"path":1107,"stem":1108,"description":1104,"icon":14,"links":14},"Version 10","/releases/breaking-changes/version-10","releases/3.breaking-changes/1.version-10",{"title":1110,"path":1111,"stem":1112,"description":1104,"icon":14,"links":14},"Version 11","/releases/breaking-changes/version-11","releases/3.breaking-changes/2.version-11",{"title":1114,"description":14,"icon":14,"links":14,"path":1115,"stem":1116,"children":1117,"page":89},"Self-Hosting","/self-hosting","self-hosting",[1118,1122,1127,1132,1137],{"title":230,"path":1119,"stem":1120,"description":1121,"icon":14,"links":14},"/self-hosting/overview","self-hosting/1.overview","Self-hosting Directus means running the Directus software on your own infrastructure.",{"title":1123,"path":1124,"stem":1125,"description":1126,"icon":14,"links":14},"Requirements","/self-hosting/requirements","self-hosting/2.requirements","This page outlines the requirements for self-hosting Directus.",{"title":1128,"path":1129,"stem":1130,"description":1131,"icon":14,"links":14},"Deployment","/self-hosting/deploying","self-hosting/3.deploying","This section covers the deployment process of Directus, including environment variables, versioning, persistence, and initial admin user setup.",{"title":1133,"path":1134,"stem":1135,"description":1136,"icon":14,"links":14},"Upgrading","/self-hosting/upgrading","self-hosting/4.upgrading","Learn how to upgrade Directus to the latest version.",{"title":1138,"path":1139,"stem":1140,"description":1141,"icon":14,"links":14},"Including Extensions","/self-hosting/including-extensions","self-hosting/5.including-extensions","Learn how to include extensions in your self-hosted Directus project.",{"title":1143,"path":1144,"stem":1145,"children":1146},"Tutorials","/tutorials","tutorials",[1147,1150,1370,1530,1576,1602,1719,1749],{"title":1143,"path":1144,"stem":1148,"description":1149,"icon":14,"links":14},"tutorials/index","This is a collection of step-by-step guides and practical examples to help you get the most out of our platform. Whether you're a beginner or an experienced user, our tutorials are designed to provide you with the knowledge and skills you need to succeed.",{"title":125,"path":1151,"stem":1152,"children":1153,"description":24,"icon":14,"links":14},"/tutorials/getting-started","tutorials/1.getting-started/index",[1154,1155,1160,1165,1170,1175,1180,1185,1190,1195,1200,1205,1210,1215,1220,1225,1230,1235,1240,1245,1250,1255,1260,1265,1270,1275,1280,1285,1290,1295,1300,1305,1310,1315,1320,1325,1330,1335,1340,1345,1350,1355,1360,1365],{"title":125,"path":1151,"stem":1152,"description":24,"icon":14,"links":14},{"title":1156,"path":1157,"stem":1158,"description":1159,"icon":14,"links":14},"Create Reusable Blocks with Many-to-Any Relationships","/tutorials/getting-started/create-reusable-blocks-with-many-to-any-relationships","tutorials/1.getting-started/create-reusable-blocks-with-many-to-any-relationships","Learn how to data model for multiple, repeating sections of content.",{"title":1161,"path":1162,"stem":1163,"description":1164,"icon":14,"links":14},"Fetch Data from Directus in Android with Kotlin","/tutorials/getting-started/fetch-data-from-directus-in-android-with-kotlin","tutorials/1.getting-started/fetch-data-from-directus-in-android-with-kotlin","Learn how to integrate Directus in your Android app with Kotlin.",{"title":1166,"path":1167,"stem":1168,"description":1169,"icon":14,"links":14},"Fetch Data from Directus in iOS with Swift","/tutorials/getting-started/fetch-data-from-directus-in-ios-with-swift","tutorials/1.getting-started/fetch-data-from-directus-in-ios-with-swift","Learn how to integrate Directus in your iOS app with Swift.",{"title":1171,"path":1172,"stem":1173,"description":1174,"icon":14,"links":14},"Fetch Data from Directus with Angular","/tutorials/getting-started/fetch-data-from-directus-with-angular","tutorials/1.getting-started/fetch-data-from-directus-with-angular","Learn how to integrate Directus in your Angular web application.",{"title":1176,"path":1177,"stem":1178,"description":1179,"icon":14,"links":14},"Fetch Data from Directus with Astro","/tutorials/getting-started/fetch-data-from-directus-with-astro","tutorials/1.getting-started/fetch-data-from-directus-with-astro","Learn how to integrate Directus in your Astro web application.",{"title":1181,"path":1182,"stem":1183,"description":1184,"icon":14,"links":14},"Fetch Data from Directus with Django","/tutorials/getting-started/fetch-data-from-directus-with-django","tutorials/1.getting-started/fetch-data-from-directus-with-django","Learn how to integrate Directus in your Django web application.",{"title":1186,"path":1187,"stem":1188,"description":1189,"icon":14,"links":14},"Fetch Data from Directus with Eleventy 3","/tutorials/getting-started/fetch-data-from-directus-with-eleventy-3","tutorials/1.getting-started/fetch-data-from-directus-with-eleventy-3","Learn how to integrate Directus in your 11ty web application.",{"title":1191,"path":1192,"stem":1193,"description":1194,"icon":14,"links":14},"Fetch Data from Directus with Flask","/tutorials/getting-started/fetch-data-from-directus-with-flask","tutorials/1.getting-started/fetch-data-from-directus-with-flask","Learn how to integrate Directus in your Flask web application.",{"title":1196,"path":1197,"stem":1198,"description":1199,"icon":14,"links":14},"Fetch Data from Directus with Flutter","/tutorials/getting-started/fetch-data-from-directus-with-flutter","tutorials/1.getting-started/fetch-data-from-directus-with-flutter","Learn how to integrate Directus in your Flutter app with Dart.",{"title":1201,"path":1202,"stem":1203,"description":1204,"icon":14,"links":14},"Fetch Data from Directus with Laravel","/tutorials/getting-started/fetch-data-from-directus-with-laravel","tutorials/1.getting-started/fetch-data-from-directus-with-laravel","Learn how to integrate Directus in your Laravel web application.",{"title":1206,"path":1207,"stem":1208,"description":1209,"icon":14,"links":14},"Fetch Data from Directus with Next.js","/tutorials/getting-started/fetch-data-from-directus-with-nextjs","tutorials/1.getting-started/fetch-data-from-directus-with-nextjs","Learn how to integrate Directus in your Next.js web application.",{"title":1211,"path":1212,"stem":1213,"description":1214,"icon":14,"links":14},"Fetch Data from Directus with Nuxt","/tutorials/getting-started/fetch-data-from-directus-with-nuxt","tutorials/1.getting-started/fetch-data-from-directus-with-nuxt","Learn how to integrate Directus in your Nuxt web application.",{"title":1216,"path":1217,"stem":1218,"description":1219,"icon":14,"links":14},"Fetch Data from Directus with SolidStart","/tutorials/getting-started/fetch-data-from-directus-with-solidstart","tutorials/1.getting-started/fetch-data-from-directus-with-solidstart","Learn how to integrate Directus in your SolidStart web application.",{"title":1221,"path":1222,"stem":1223,"description":1224,"icon":14,"links":14},"Fetch Data from Directus with Spring Boot","/tutorials/getting-started/fetch-data-from-directus-with-spring-boot","tutorials/1.getting-started/fetch-data-from-directus-with-spring-boot","Learn how to integrate Directus in your Spring Boot web application.",{"title":1226,"path":1227,"stem":1228,"description":1229,"icon":14,"links":14},"Fetch Data from Directus with SvelteKit","/tutorials/getting-started/fetch-data-from-directus-with-sveltekit","tutorials/1.getting-started/fetch-data-from-directus-with-sveltekit","Learn how to integrate Directus in your SvelteKit web application.",{"title":1231,"path":1232,"stem":1233,"description":1234,"icon":14,"links":14},"Implement Directus Auth with iOS","/tutorials/getting-started/implement-directus-auth-with-ios","tutorials/1.getting-started/implement-directus-auth-with-ios","Learn how to register, login, and protect content in your iOS app.",{"title":1236,"path":1237,"stem":1238,"description":1239,"icon":14,"links":14},"Implement Multilingual Content with Directus and SvelteKit","/tutorials/getting-started/implement-multilingual-content-with-directus-and-svelte-kit","tutorials/1.getting-started/implement-multilingual-content-with-directus-and-svelte-kit","Learn how to handle internationalization in your SvelteKit application.",{"title":1241,"path":1242,"stem":1243,"description":1244,"icon":14,"links":14},"Implementing Live Preview in Astro","/tutorials/getting-started/implementing-live-preview-in-astro","tutorials/1.getting-started/implementing-live-preview-in-astro","Learn how to setup Directus live preview with Astro.",{"title":1246,"path":1247,"stem":1248,"description":1249,"icon":14,"links":14},"Implementing Live Preview in Next.js","/tutorials/getting-started/implementing-live-preview-in-next-js","tutorials/1.getting-started/implementing-live-preview-in-next-js","Learn how to setup Directus live preview with Next.js.",{"title":1251,"path":1252,"stem":1253,"description":1254,"icon":14,"links":14},"Implementing Live Preview in Nuxt","/tutorials/getting-started/implementing-live-preview-in-nuxt","tutorials/1.getting-started/implementing-live-preview-in-nuxt","Learn how to setup Directus live preview with Nuxt.",{"title":1256,"path":1257,"stem":1258,"description":1259,"icon":14,"links":14},"Implementing Live Preview in React","/tutorials/getting-started/implementing-live-preview-in-react","tutorials/1.getting-started/implementing-live-preview-in-react","Learn how to setup Directus live preview with React.",{"title":1261,"path":1262,"stem":1263,"description":1264,"icon":14,"links":14},"Implementing Live Preview in SvelteKit","/tutorials/getting-started/implementing-live-preview-in-sveltekit","tutorials/1.getting-started/implementing-live-preview-in-sveltekit","Learn how to setup Directus live preview with SvelteKit.",{"title":1266,"path":1267,"stem":1268,"description":1269,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Astro","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-astro","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-astro","Learn how to access multilingual Directus content using Astro.",{"title":1271,"path":1272,"stem":1273,"description":1274,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Next.js","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-next","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-next","Learn how to access multilingual Directus content using Next.js.",{"title":1276,"path":1277,"stem":1278,"description":1279,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Nuxt","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-nuxt","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-nuxt","Learn how to access multilingual Directus content using Nuxt.",{"title":1281,"path":1282,"stem":1283,"description":1284,"icon":14,"links":14},"Implementing Multilingual Content using Directus and SvelteKit","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-sveltekit","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-sveltekit","Learn how to access multilingual Directus content using SvelteKit.",{"title":1286,"path":1287,"stem":1288,"description":1289,"icon":14,"links":14},"Integrating the Directus Visual Editor with Next.js","/tutorials/getting-started/integrating-the-directus-visual-editor-with-nextjs","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-nextjs","Learn how to integrate the Directus Visual Editor with Next.js.",{"title":1291,"path":1292,"stem":1293,"description":1294,"icon":14,"links":14},"Integrating the Directus Visual Editor with Nuxt","/tutorials/getting-started/integrating-the-directus-visual-editor-with-nuxt","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-nuxt","Learn how to integrate the Directus Visual Editor with Nuxt.",{"title":1296,"path":1297,"stem":1298,"description":1299,"icon":14,"links":14},"Integrating the Directus Visual Editor with SvelteKit","/tutorials/getting-started/integrating-the-directus-visual-editor-with-sveltekit","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-sveltekit","Learn how to integrate the Directus Visual Editor with SvelteKit.",{"title":1301,"path":1302,"stem":1303,"description":1304,"icon":14,"links":14},"Rendering Dynamic Blocks Using Astro","/tutorials/getting-started/rendering-dynamic-blocks-using-astro","tutorials/1.getting-started/rendering-dynamic-blocks-using-astro","Learn how to render dynamic blocks using Astro.",{"title":1306,"path":1307,"stem":1308,"description":1309,"icon":14,"links":14},"Rendering Dynamic Blocks Using Next.js","/tutorials/getting-started/rendering-dynamic-blocks-using-next","tutorials/1.getting-started/rendering-dynamic-blocks-using-next","Learn how to render dynamic blocks using Next.js.",{"title":1311,"path":1312,"stem":1313,"description":1314,"icon":14,"links":14},"Rendering Dynamic Blocks Using Nuxt","/tutorials/getting-started/rendering-dynamic-blocks-using-nuxt","tutorials/1.getting-started/rendering-dynamic-blocks-using-nuxt","Learn how to render dynamic blocks using Nuxt.",{"title":1316,"path":1317,"stem":1318,"description":1319,"icon":14,"links":14},"Rendering Dynamic Blocks Using SvelteKit","/tutorials/getting-started/rendering-dynamic-blocks-using-sveltekit","tutorials/1.getting-started/rendering-dynamic-blocks-using-sveltekit","Learn how to render dynamic blocks using SvelteKit.",{"title":1321,"path":1322,"stem":1323,"description":1324,"icon":14,"links":14},"Set Up Live Preview with Next.js","/tutorials/getting-started/set-up-live-preview-with-next-js","tutorials/1.getting-started/set-up-live-preview-with-next-js","Learn how to confgure Live Preview with Next.js' draft mode.",{"title":1326,"path":1327,"stem":1328,"description":1329,"icon":14,"links":14},"Set Up Live Preview with Nuxt","/tutorials/getting-started/set-up-live-preview-with-nuxt","tutorials/1.getting-started/set-up-live-preview-with-nuxt","Learn how to create a Nuxt preview plugin to configure Live Preview.",{"title":1331,"path":1332,"stem":1333,"description":1334,"icon":14,"links":14},"Submit Forms Using Directus and Next.js","/tutorials/getting-started/submit-forms-using-directus-and-nextjs","tutorials/1.getting-started/submit-forms-using-directus-and-nextjs","Learn how to submit forms using Directus and Next.js.",{"title":1336,"path":1337,"stem":1338,"description":1339,"icon":14,"links":14},"Submit Forms Using Directus and Nuxt","/tutorials/getting-started/submit-forms-using-directus-and-nuxt","tutorials/1.getting-started/submit-forms-using-directus-and-nuxt","Learn how to submit forms using Directus and Nuxt.",{"title":1341,"path":1342,"stem":1343,"description":1344,"icon":14,"links":14},"Submit Forms Using Directus and SvelteKit","/tutorials/getting-started/submit-forms-using-directus-and-sveltekit","tutorials/1.getting-started/submit-forms-using-directus-and-sveltekit","Learn how to submit forms using Directus and SvelteKit.",{"title":1346,"path":1347,"stem":1348,"description":1349,"icon":14,"links":14},"Using Authentication in Astro","/tutorials/getting-started/using-authentication-in-astro","tutorials/1.getting-started/using-authentication-in-astro","Learn how to setup Directus authentication with Astro.",{"title":1351,"path":1352,"stem":1353,"description":1354,"icon":14,"links":14},"Using Authentication in Next.js","/tutorials/getting-started/using-authentication-in-next-js","tutorials/1.getting-started/using-authentication-in-next-js","Learn how to setup Directus authentication with Next.js.",{"title":1356,"path":1357,"stem":1358,"description":1359,"icon":14,"links":14},"Using Authentication in Nuxt","/tutorials/getting-started/using-authentication-in-nuxt","tutorials/1.getting-started/using-authentication-in-nuxt","Learn how to setup Directus authentication with Nuxt.",{"title":1361,"path":1362,"stem":1363,"description":1364,"icon":14,"links":14},"Using Authentication in React","/tutorials/getting-started/using-authentication-in-react","tutorials/1.getting-started/using-authentication-in-react","Learn how to setup Directus authentication with React.",{"title":1366,"path":1367,"stem":1368,"description":1369,"icon":14,"links":14},"Using Authentication in SvelteKit","/tutorials/getting-started/using-authentication-in-sveltekit","tutorials/1.getting-started/using-authentication-in-sveltekit","Learn how to setup Directus authentication with SvelteKit.",{"title":145,"path":1371,"stem":1372,"children":1373,"description":24,"icon":14,"links":14},"/tutorials/projects","tutorials/2.projects/index",[1374,1375,1380,1385,1390,1395,1400,1405,1410,1415,1420,1425,1430,1435,1440,1445,1450,1455,1460,1465,1470,1475,1480,1485,1490,1495,1500,1505,1510,1515,1520,1525],{"title":145,"path":1371,"stem":1372,"description":24,"icon":14,"links":14},{"title":1376,"path":1377,"stem":1378,"description":1379,"icon":14,"links":14},"Build a Multi-User Chat with JavaScript and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-javascript-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-javascript-and-directus-realtime","Learn how to send and receive data over a realtime connection with JavaScript.",{"title":1381,"path":1382,"stem":1383,"description":1384,"icon":14,"links":14},"Build a Multi-User Chat with React and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-react-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-react-and-directus-realtime","Learn how to send and receive data over a realtime connection in React applications.",{"title":1386,"path":1387,"stem":1388,"description":1389,"icon":14,"links":14},"Build a Multi-User Chat with Vue.js and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-vue-js-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-vue-js-and-directus-realtime","Learn how to send and receive data over a realtime connection in a Vue.js application.",{"title":1391,"path":1392,"stem":1393,"description":1394,"icon":14,"links":14},"Build a Notebook Chrome Extension with Directus Auth","/tutorials/projects/build-a-notebook-chrome-extension-with-directus-auth","tutorials/2.projects/build-a-notebook-chrome-extension-with-directus-auth","Learn to build and integrate a Chrome Extension with Directus Auth.",{"title":1396,"path":1397,"stem":1398,"description":1399,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Astro","/tutorials/projects/build-a-realtime-chat-app-using-directus-and-astro","tutorials/2.projects/build-a-realtime-chat-app-using-directus-and-astro","Learn how to setup Directus realtime with Astro.",{"title":1401,"path":1402,"stem":1403,"description":1404,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Nuxt","/tutorials/projects/build-a-realtime-chat-app-using-directus-and-nuxt","tutorials/2.projects/build-a-realtime-chat-app-using-directus-and-nuxt","Learn how to setup Directus realtime with Nuxt.",{"title":1406,"path":1407,"stem":1408,"description":1409,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Next.js","/tutorials/projects/build-a-realtime-chat-app-with-directus-and-next","tutorials/2.projects/build-a-realtime-chat-app-with-directus-and-next","Learn how to setup Directus realtime with Next.js.",{"title":1411,"path":1412,"stem":1413,"description":1414,"icon":14,"links":14},"Build a Realtime Chat App with Directus and SvelteKit","/tutorials/projects/build-a-realtime-chat-app-with-directus-and-sveltekit","tutorials/2.projects/build-a-realtime-chat-app-with-directus-and-sveltekit","Learn how to setup Directus realtime with SvelteKit.",{"title":1416,"path":1417,"stem":1418,"description":1419,"icon":14,"links":14},"Build a Testimonial Widget with SvelteKit and Directus","/tutorials/projects/build-a-testimonial-widget-with-sveltekit-and-directus","tutorials/2.projects/build-a-testimonial-widget-with-sveltekit-and-directus","Learn how to set up a testimonial widget using SvelteKit and Directus.",{"title":1421,"path":1422,"stem":1423,"description":1424,"icon":14,"links":14},"Build a User Feedback Widget with Vue.js","/tutorials/projects/build-a-user-feedback-widget-with-vue-js","tutorials/2.projects/build-a-user-feedback-widget-with-vue-js-","Learn how we built our docs feedback widget with Directus.",{"title":1426,"path":1427,"stem":1428,"description":1429,"icon":14,"links":14},"Build a Video Streaming App with SvelteKit and Directus","/tutorials/projects/build-a-video-streaming-app-with-sveltekit-and-directus","tutorials/2.projects/build-a-video-streaming-app-with-sveltekit-and-directus","Learn how to store and retrieve video metadata, and then build a streaming application.",{"title":1431,"path":1432,"stem":1433,"description":1434,"icon":14,"links":14},"Build an Ecommerce Platform with Next.js, Stripe, and Directus Automate","/tutorials/projects/build-an-ecommerce-platform-with-next-js-stripe-and-directus-automate","tutorials/2.projects/build-an-ecommerce-platform-with-next-js-stripe-and-directus-automate","Learn to integrate Stripe with Directus Automate to build an e-commerce website.",{"title":1436,"path":1437,"stem":1438,"description":1439,"icon":14,"links":14},"Build an Hotel Booking Platform with Next.js, Stripe, and Directus Automate","/tutorials/projects/build-an-hotel-booking-platform-with-next-js-stripe-and-directus-automate","tutorials/2.projects/build-an-hotel-booking-platform-with-next-js-stripe-and-directus-automate","Learn to build a hotel booking site with dynamic availability and payments via Stripe.",{"title":1441,"path":1442,"stem":1443,"description":1444,"icon":14,"links":14},"Build Directus Garden - A Passive Collaborative Event Booth Demo","/tutorials/projects/build-directus-garden-a-passive-collaborative-event-booth-demo","tutorials/2.projects/build-directus-garden-a-passive-collaborative-event-booth-demo","Learn how we built our engagement platform for live in-person events with P5.js.",{"title":1446,"path":1447,"stem":1448,"description":1449,"icon":14,"links":14},"Build Forms Dynamically using Directus and Astro","/tutorials/projects/build-forms-dynamically-using-directus-and-astro","tutorials/2.projects/build-forms-dynamically-using-directus-and-astro","Learn how to setup Directus fields with Astro.",{"title":1451,"path":1452,"stem":1453,"description":1454,"icon":14,"links":14},"Build Forms Dynamically using Directus and Next.js","/tutorials/projects/build-forms-dynamically-using-directus-and-next","tutorials/2.projects/build-forms-dynamically-using-directus-and-next","Learn how to setup Directus fields with Next.js.",{"title":1456,"path":1457,"stem":1458,"description":1459,"icon":14,"links":14},"Build Forms Dynamically using Directus and Nuxt","/tutorials/projects/build-forms-dynamically-using-directus-and-nuxt","tutorials/2.projects/build-forms-dynamically-using-directus-and-nuxt","Learn how to setup Directus fields with Nuxt.",{"title":1461,"path":1462,"stem":1463,"description":1464,"icon":14,"links":14},"Build Forms Dynamically using Directus and SvelteKit","/tutorials/projects/build-forms-dynamically-using-directus-and-sveltekit","tutorials/2.projects/build-forms-dynamically-using-directus-and-sveltekit","Learn how to setup Directus fields with SvelteKit.",{"title":1466,"path":1467,"stem":1468,"description":1469,"icon":14,"links":14},"Build the Leap Week Registration and Referral System","/tutorials/projects/build-the-leap-week-registration-and-referral-system","tutorials/2.projects/build-the-leap-week-registration-and-referral-system-","Learn how we built our referral-based ticketing and raffle system with AI-generated rabbitars.",{"title":1471,"path":1472,"stem":1473,"description":1474,"icon":14,"links":14},"Building AIVenture - An AI-Powered Game with Directus","/tutorials/projects/building-ai-venture-an-ai-powered-game-with-directus","tutorials/2.projects/building-ai-venture-an-ai-powered-game-with-directus","Learn the advanced techniques used with Directus Automate to build a game.",{"title":1476,"path":1477,"stem":1478,"description":1479,"icon":14,"links":14},"Create a CMS using Directus and Astro","/tutorials/projects/create-a-cms-using-directus-and-astro","tutorials/2.projects/create-a-cms-using-directus-and-astro","Learn how to create a CMS using Directus and Astro.",{"title":1481,"path":1482,"stem":1483,"description":1484,"icon":14,"links":14},"Create a CMS using Directus and Next.js","/tutorials/projects/create-a-cms-using-directus-and-nextjs","tutorials/2.projects/create-a-cms-using-directus-and-nextjs","Learn how to create a CMS using Directus and Next.js.",{"title":1486,"path":1487,"stem":1488,"description":1489,"icon":14,"links":14},"Create a CMS using Directus and Nuxt","/tutorials/projects/create-a-cms-using-directus-and-nuxt","tutorials/2.projects/create-a-cms-using-directus-and-nuxt","Learn how to create a CMS using Directus and Nuxt.",{"title":1491,"path":1492,"stem":1493,"description":1494,"icon":14,"links":14},"Create a CMS using Directus and SvelteKit","/tutorials/projects/create-a-cms-using-directus-and-sveltekit","tutorials/2.projects/create-a-cms-using-directus-and-sveltekit","Learn how to create a CMS using Directus and SvelteKit.",{"title":1496,"path":1497,"stem":1498,"description":1499,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Astro","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-astro","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-astro","Learn how to create dynamic pages you can use in your CMS using Directus and Astro.",{"title":1501,"path":1502,"stem":1503,"description":1504,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Next.js","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-nextjs","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-nextjs","Learn how to create dynamic pages you can use in your CMS using Directus and Next.js.",{"title":1506,"path":1507,"stem":1508,"description":1509,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Nuxt","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-nuxt","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-nuxt","Learn how to create dynamic pages you can use in your CMS using Directus and Nuxt.",{"title":1511,"path":1512,"stem":1513,"description":1514,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and SvelteKit","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-sveltekit","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-sveltekit","Learn how to create dynamic pages you can use in your CMS using Directus and SvelteKit.",{"title":1516,"path":1517,"stem":1518,"description":1519,"icon":14,"links":14},"How I Built an AI Open Source Santa Roast App with Directus and Nuxt","/tutorials/projects/how-i-built-an-ai-open-source-santa-roast-app-with-directus-and-nuxt","tutorials/2.projects/how-i-built-an-ai-open-source-santa-roast-app-with-directus-and-nuxt","Bryant breaks down how he built an AI-powered app that roasts developers based on their GitHub contributions.",{"title":1521,"path":1522,"stem":1523,"description":1524,"icon":14,"links":14},"Integrate Directus with ESP32 Hardware Sensors","/tutorials/projects/integrate-directus-with-esp-32-hardware-sensors","tutorials/2.projects/integrate-directus-with-esp-32-hardware-sensors","Learn how to integrate Directus with IoT systems by reading and publishing sensor data.",{"title":1526,"path":1527,"stem":1528,"description":1529,"icon":14,"links":14},"Use Directus as a Baby Health Tracker with Owlet and OpsGenie","/tutorials/projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","tutorials/2.projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","Learn how to integrate Directus with hardware sensors and incident repsonse systems.",{"title":1531,"path":1532,"stem":1533,"children":1534,"description":24,"icon":14,"links":14},"Tips & Tricks","/tutorials/tips-and-tricks","tutorials/3.tips-and-tricks/index",[1535,1536,1541,1546,1551,1556,1561,1566,1571],{"title":1531,"path":1532,"stem":1533,"description":24,"icon":14,"links":14},{"title":1537,"path":1538,"stem":1539,"description":1540,"icon":14,"links":14},"Advanced Types with the Directus SDK","/tutorials/tips-and-tricks/advanced-types-with-the-directus-sdk","tutorials/3.tips-and-tricks/advanced-types-with-the-directus-sdk","Learn how to more-easily work with types and the Directus SDK.",{"title":1542,"path":1543,"stem":1544,"description":1545,"icon":14,"links":14},"Build a Monitoring Pipeline For Flows And Extensions","/tutorials/tips-and-tricks/build-a-monitoring-pipeline-for-flows-and-extensions","tutorials/3.tips-and-tricks/build-a-monitoring-pipeline-for-flows-and-extensions-","Learn how to set up complex pipelines to monitor automations and extensions.",{"title":1547,"path":1548,"stem":1549,"description":1550,"icon":14,"links":14},"Configure Okta as a Single Sign-On Provider","/tutorials/tips-and-tricks/configure-okta-as-a-single-sign-on-provider","tutorials/3.tips-and-tricks/configure-okta-as-a-single-sign-on-provider","Learn how to set up Okta SSO with the SAML authentication mechanism.",{"title":1552,"path":1553,"stem":1554,"description":1555,"icon":14,"links":14},"Implement Pagination and Infinite Scrolling in Next.js","/tutorials/tips-and-tricks/implement-pagination-and-infinite-scrolling-in-next-js","tutorials/3.tips-and-tricks/implement-pagination-and-infinite-scrolling-in-next-js-","Learn various techniques to load paginated data in your Next.js application.",{"title":1557,"path":1558,"stem":1559,"description":1560,"icon":14,"links":14},"Importing Files in Directus Automate","/tutorials/tips-and-tricks/importing-files-in-directus-automate","tutorials/3.tips-and-tricks/importing-files-in-directus-automate","Learn how to use the Request URL operation to import files in Directus Automate.",{"title":1562,"path":1563,"stem":1564,"description":1565,"icon":14,"links":14},"Preview Files in Live Preview with Google Docs Previews","/tutorials/tips-and-tricks/preview-files-in-live-preview-with-google-docs-previews","tutorials/3.tips-and-tricks/preview-files-in-live-preview-with-google-docs-previews","Learn how to use Google Gview to preview many file formats in Directus Editor.",{"title":1567,"path":1568,"stem":1569,"description":1570,"icon":14,"links":14},"Search Engine Optimization Best Practices","/tutorials/tips-and-tricks/search-engine-optimization-best-practices","tutorials/3.tips-and-tricks/search-engine-optimization-best-practices","Learn some best practices for enabling SEO in your projects using Directus.",{"title":1572,"path":1573,"stem":1574,"description":1575,"icon":14,"links":14},"Understanding Kubernetes","/tutorials/tips-and-tricks/understanding-kubernetes","tutorials/3.tips-and-tricks/understanding-kubernetes","Learn about key Kubernetes concepts and how they interact with each other.",{"title":1577,"path":1578,"stem":1579,"children":1580,"description":24,"icon":14,"links":14},"Migration","/tutorials/migration","tutorials/4.migration/index",[1581,1582,1587,1592,1597],{"title":1577,"path":1578,"stem":1579,"description":24,"icon":14,"links":14},{"title":1583,"path":1584,"stem":1585,"description":1586,"icon":14,"links":14},"Migrate from Notion to Directus","/tutorials/migration/migrate-from-notion-to-directus","tutorials/4.migration/migrate-from-notion-to-directus","Learn how to migrate data from Notion databases to Directus.",{"title":1588,"path":1589,"stem":1590,"description":1591,"icon":14,"links":14},"Migrate from Nuxt Content to Directus","/tutorials/migration/migrate-from-nuxt-content-to-directus","tutorials/4.migration/migrate-from-nuxt-content-to-directus","Learn how to move from a flat-file CMS to Directus.",{"title":1593,"path":1594,"stem":1595,"description":1596,"icon":14,"links":14},"Migrate from WordPress to Directus","/tutorials/migration/migrate-from-wordpress-to-directus","tutorials/4.migration/migrate-from-wordpress-to-directus","Learn how to migrate posts and images to Directus, with tips on plugins.",{"title":1598,"path":1599,"stem":1600,"description":1601,"icon":14,"links":14},"Promoting Changes Between Environments in Directus","/tutorials/migration/promoting-changes-between-environments-in-directus","tutorials/4.migration/promoting-changes-between-environments-in-directus","Learn the options to migrate schema and data between Directus projects.",{"title":372,"path":1603,"stem":1604,"children":1605,"description":1607,"icon":14,"links":14},"/tutorials/extensions","tutorials/5.extensions/index",[1606,1608,1613,1618,1623,1628,1633,1638,1643,1650,1657,1664,1669,1674,1679,1684,1689,1694,1699,1704,1709,1714],{"title":372,"path":1603,"stem":1604,"description":1607,"icon":14,"links":14},"All about extensions",{"title":1609,"path":1610,"stem":1611,"description":1612,"icon":14,"links":14},"Check Permissions in a Custom Endpoint","/tutorials/extensions/check-permissions-in-a-custom-endpoint","tutorials/5.extensions/check-permissions-in-a-custom-endpoint","Learn how to use internal Directus permissions when creating a custom endpoint.",{"title":1614,"path":1615,"stem":1616,"description":1617,"icon":14,"links":14},"Create Collection Items in Custom Panels","/tutorials/extensions/create-collection-items-in-custom-panels","tutorials/5.extensions/create-collection-items-in-custom-panels","Learn how to use built-in interfaces and composables to create new collections.",{"title":1619,"path":1620,"stem":1621,"description":1622,"icon":14,"links":14},"Create New Customers in Stripe in a Custom Hook","/tutorials/extensions/create-new-customers-in-stripe-in-a-custom-hook","tutorials/5.extensions/create-new-customers-in-stripe-in-a-custom-hook","Learn how to use the Stripe SDK to create data when actions occur in Directus.",{"title":1624,"path":1625,"stem":1626,"description":1627,"icon":14,"links":14},"Display External API Data From Vonage In Custom Panels","/tutorials/extensions/display-external-api-data-from-vonage-in-custom-panels","tutorials/5.extensions/display-external-api-data-from-vonage-in-custom-panels","Learn how to display records from external systems in Directus Insights.",{"title":1629,"path":1630,"stem":1631,"description":1632,"icon":14,"links":14},"Display External Weather API Data In Custom Panels","/tutorials/extensions/display-external-weather-api-data-in-custom-panels","tutorials/5.extensions/display-external-weather-api-data-in-custom-panels","Learn how to display external data in panels with a bundle and endpoint.",{"title":1634,"path":1635,"stem":1636,"description":1637,"icon":14,"links":14},"Format Dates in a Custom Display Extension","/tutorials/extensions/format-dates-in-a-custom-display-extension","tutorials/5.extensions/format-dates-in-a-custom-display-extension","Learn how to build a custom display to format data in Directus.",{"title":1639,"path":1640,"stem":1641,"description":1642,"icon":14,"links":14},"Implement Navigation in Multipage Custom Modules","/tutorials/extensions/implement-navigation-in-multipage-custom-modules","tutorials/5.extensions/implement-navigation-in-multipage-custom-modules","Learn how to navigate between multiple pages in module extensions.",{"title":1644,"path":1645,"stem":1646,"children":1647,"description":1649,"icon":14,"links":14},"Integrate Algolia Indexing with Custom Hooks","/tutorials/extensions/integrate-algolia-indexing-with-custom-hooks","tutorials/5.extensions/integrate-algolia-indexing-with-custom-hooks",[1648],{"title":1644,"path":1645,"stem":1646,"description":1649,"icon":14,"links":14},"Learn how to maintain an Algolia index when data is created, updated, and deleted.",{"title":1651,"path":1652,"stem":1653,"children":1654,"description":1656,"icon":14,"links":14},"Integrate Elasticsearch Indexing with Custom Hooks","/tutorials/extensions/integrate-elasticsearch-indexing-with-custom-hooks","tutorials/5.extensions/integrate-elasticsearch-indexing-with-custom-hooks",[1655],{"title":1651,"path":1652,"stem":1653,"description":1656,"icon":14,"links":14},"Learn how to maintain an Elasticsearch index when data is created, updated, and deleted.",{"title":1658,"path":1659,"stem":1660,"children":1661,"description":1663,"icon":14,"links":14},"Integrate Meilisearch Indexing with Custom Hooks","/tutorials/extensions/integrate-meilisearch-indexing-with-custom-hooks","tutorials/5.extensions/integrate-meilisearch-indexing-with-custom-hooks",[1662],{"title":1658,"path":1659,"stem":1660,"description":1663,"icon":14,"links":14},"Learn how to maintain an Meilisearch index when data is created, updated, and deleted.",{"title":1665,"path":1666,"stem":1667,"description":1668,"icon":14,"links":14},"Monitor and Error Track with Sentry in Custom Hooks","/tutorials/extensions/monitor-and-error-track-with-sentry-in-custom-hooks","tutorials/5.extensions/monitor-and-error-track-with-sentry-in-custom-hooks","Learn how to integrate Sentry error tracking in both your API and Data Studio.",{"title":1670,"path":1671,"stem":1672,"description":1673,"icon":14,"links":14},"Proxy an External API in a Custom Endpoint Extension","/tutorials/extensions/proxy-an-external-api-in-a-custom-endpoint-extension","tutorials/5.extensions/proxy-an-external-api-in-a-custom-endpoint-extension","Learn how to make external APIs available via Directus in a custom endpoint.",{"title":1675,"path":1676,"stem":1677,"description":1678,"icon":14,"links":14},"Read Collection Data in Custom Layouts","/tutorials/extensions/read-collection-data-in-custom-layouts","tutorials/5.extensions/read-collection-data-in-custom-layouts","Learn how to build your first layout with data from a collection.",{"title":1680,"path":1681,"stem":1682,"description":1683,"icon":14,"links":14},"Send SMS Messages with Twilio in Custom Operations","/tutorials/extensions/send-sms-messages-with-twilio-in-custom-operations","tutorials/5.extensions/send-sms-messages-with-twilio-in-custom-operations","Learn how to build a custom operation that uses the Twilio SDK.",{"title":1685,"path":1686,"stem":1687,"description":1688,"icon":14,"links":14},"Send SMS Messages with Twilio in Custom Panels","/tutorials/extensions/send-sms-messages-with-twilio-in-custom-panels","tutorials/5.extensions/send-sms-messages-with-twilio-in-custom-panels","Learn how to build a form inside a panel extension and use external APIs.",{"title":1690,"path":1691,"stem":1692,"description":1693,"icon":14,"links":14},"Summarize Relational Items in a Custom Display Extension","/tutorials/extensions/summarize-relational-items-in-a-custom-display-extension","tutorials/5.extensions/summarize-relational-items-in-a-custom-display-extension","Learn how to work with relational data in display extensions.",{"title":1695,"path":1696,"stem":1697,"description":1698,"icon":14,"links":14},"Understand Available Slots in Custom Modules","/tutorials/extensions/understand-available-slots-in-custom-modules","tutorials/5.extensions/understand-available-slots-in-custom-modules","Learn about all of the slots available in your custom modules.",{"title":1700,"path":1701,"stem":1702,"description":1703,"icon":14,"links":14},"Use Dynamic Values in Custom Email Templates","/tutorials/extensions/use-dynamic-values-in-custom-email-templates","tutorials/5.extensions/use-dynamic-values-in-custom-email-templates","Learn how to inject dynamic data into liquid templates.",{"title":1705,"path":1706,"stem":1707,"description":1708,"icon":14,"links":14},"Use npm Packages in Custom Operations","/tutorials/extensions/use-npm-packages-in-custom-operations","tutorials/5.extensions/use-npm-packages-in-custom-operations","Learn how to expose an npm package as an operation in Directus Automate.",{"title":1710,"path":1711,"stem":1712,"description":1713,"icon":14,"links":14},"Validate Phone Numbers with Twilio in a Custom Hook","/tutorials/extensions/validate-phone-numbers-with-twilio-in-a-custom-hook","tutorials/5.extensions/validate-phone-numbers-with-twilio-in-a-custom-hook","Learn how to prevent an item from saving if it has an invalid phone number.",{"title":1715,"path":1716,"stem":1717,"description":1718,"icon":14,"links":14},"Validating Third-Party JWTs in Directus (with Okta)","/tutorials/extensions/validating-third-party-jwts-in-directus","tutorials/5.extensions/validating-third-party-jwts-in-directus","Learn how to translate third part JWT's to Directus accountability",{"title":1114,"path":1720,"stem":1721,"children":1722,"description":24,"icon":14,"links":14},"/tutorials/self-hosting","tutorials/6.self-hosting/index",[1723,1724,1729,1734,1739,1744],{"title":1114,"path":1720,"stem":1721,"description":24,"icon":14,"links":14},{"title":1725,"path":1726,"stem":1727,"description":1728,"icon":14,"links":14},"Deploy Directus to an Ubuntu Server","/tutorials/self-hosting/deploy-directus-to-an-ubuntu-server","tutorials/6.self-hosting/deploy-directus-to-an-ubuntu-server","Learn how to deploy Directus on a Docker container on an Ubuntu server.",{"title":1730,"path":1731,"stem":1732,"description":1733,"icon":14,"links":14},"Deploy Directus to AWS EC2","/tutorials/self-hosting/deploy-directus-to-aws-ec2","tutorials/6.self-hosting/deploy-directus-to-aws-ec2","Learn how to deploy a Directus to AWS EC2, with a RDS database and a S3 storage bucket.",{"title":1735,"path":1736,"stem":1737,"description":1738,"icon":14,"links":14},"Deploy Directus to Azure Web Apps","/tutorials/self-hosting/deploy-directus-to-azure-web-apps","tutorials/6.self-hosting/deploy-directus-to-azure-web-apps","Learn how to deploy Directus on a Docker container on Azure.",{"title":1740,"path":1741,"stem":1742,"description":1743,"icon":14,"links":14},"Deploy Directus to Digital Ocean","/tutorials/self-hosting/deploy-directus-to-digital-ocean","tutorials/6.self-hosting/deploy-directus-to-digital-ocean","Learn how to deploy Directus on the Digital Ocean App Platform.",{"title":1745,"path":1746,"stem":1747,"description":1748,"icon":14,"links":14},"Deploy Directus to Google Cloud Platform","/tutorials/self-hosting/deploy-directus-to-google-cloud-platform","tutorials/6.self-hosting/deploy-directus-to-google-cloud-platform","Learn how to deploy Directus on GCP with a Cloud SQL database and Cloud Storage Bucket.",{"title":1750,"path":1751,"stem":1752,"children":1753,"description":24,"icon":14,"links":14},"Workflows","/tutorials/workflows","tutorials/7.workflows/index",[1754,1755,1760,1765,1770,1775,1780,1785,1790,1795,1800,1805,1810,1815,1820],{"title":1750,"path":1751,"stem":1752,"description":24,"icon":14,"links":14},{"title":1756,"path":1757,"stem":1758,"description":1759,"icon":14,"links":14},"Build Content Approval Workflows with Custom Permissions","/tutorials/workflows/build-content-approval-workflows-with-custom-permissions","tutorials/7.workflows/build-content-approval-workflows-with-custom-permissions","Learn how to configure roles and permissions for complex automations.",{"title":1761,"path":1762,"stem":1763,"description":1764,"icon":14,"links":14},"Combine Live Preview and Content Versioning with Next.js","/tutorials/workflows/combine-live-preview-and-content-versioning-with-next-js","tutorials/7.workflows/combine-live-preview-and-content-versioning-with-next-js","Learn how to set up Live Preview with different content versions in your Next.js application.",{"title":1766,"path":1767,"stem":1768,"description":1769,"icon":14,"links":14},"Create GitHub Issues with Directus Automate","/tutorials/workflows/create-github-issues-with-directus-automate","tutorials/7.workflows/create-github-issues-with-directus-automate","Learn how to integrate GitHub with Directus Automate to create new issues.",{"title":1771,"path":1772,"stem":1773,"description":1774,"icon":14,"links":14},"Detect High-Risk Phone Numbers with Vonage and Directus Automate","/tutorials/workflows/detect-high-risk-phone-numbers-with-vonage-and-directus-automate","tutorials/7.workflows/detect-high-risk-phone-numbers-with-vonage-and-directus-automate","Learn how to integrate Vonage's Number Insights API with Directus Automate to validate numbers.",{"title":1776,"path":1777,"stem":1778,"description":1779,"icon":14,"links":14},"Enrich User Data with Clearbit and Directus Automate","/tutorials/workflows/enrich-user-data-with-clearbit-and-directus-automate","tutorials/7.workflows/enrich-user-data-with-clearbit-and-directus-automate","Learn how to integrate Clearbit data enrichment with Directus Automate.",{"title":1781,"path":1782,"stem":1783,"description":1784,"icon":14,"links":14},"Generate Images with DALL•E and Directus Automate","/tutorials/workflows/generate-images-with-dall-e-and-directus-automate","tutorials/7.workflows/generate-images-with-dall-e-and-directus-automate","Learn how to integrate OpenAI's Dall•E models with Directus Automate.",{"title":1786,"path":1787,"stem":1788,"description":1789,"icon":14,"links":14},"Generate Social Posts with GPT-4 and Directus Automate","/tutorials/workflows/generate-social-posts-with-gpt-4-and-directus-automate","tutorials/7.workflows/generate-social-posts-with-gpt-4-and-directus-automate","Learn how to integrate OpenAI's GPT-4 model with Directus Automate.",{"title":1791,"path":1792,"stem":1793,"description":1794,"icon":14,"links":14},"Generate Transcripts with Deepgram and Directus Automate","/tutorials/workflows/generate-transcripts-with-deepgram-and-directus-automate","tutorials/7.workflows/generate-transcripts-with-deepgram-and-directus-automate","Learn how to integrate Deepgram's Speech-to-Text API with Directus Automate.",{"title":1796,"path":1797,"stem":1798,"description":1799,"icon":14,"links":14},"Integrating Multilingual Content with Directus and Crowdin","/tutorials/workflows/integrating-multilingual-content-with-directus-and-crowdin","tutorials/7.workflows/integrating-multilingual-content-with-directus-and-crowdin","Learn how to localize content in Directus using Crowdin's connector with Directus.",{"title":1801,"path":1802,"stem":1803,"description":1804,"icon":14,"links":14},"Invincible AI content workflows with Inngest and Directus","/tutorials/workflows/invincible-ai-content-workflows-with-inngest-and-directus","tutorials/7.workflows/invincible-ai-content-workflows-with-inngest-and-directus","Learn how to configure integration Directus and Inngest to build durable workflows for any scale.",{"title":1806,"path":1807,"stem":1808,"description":1809,"icon":14,"links":14},"Schedule Future Content with Directus Automate","/tutorials/workflows/schedule-future-content-with-directus-automate","tutorials/7.workflows/schedule-future-content-with-directus-automate","Learn how to set content to be scheduled on a future date with Directs Automate.",{"title":1811,"path":1812,"stem":1813,"description":1814,"icon":14,"links":14},"Tag Images with Clarifai and Directus Automate","/tutorials/workflows/tag-images-with-clarifai-and-directus-automate","tutorials/7.workflows/tag-images-with-clarifai-and-directus-automate","Learn how to integrate Clarifai's image recognition APIs with Directus Automate.",{"title":1816,"path":1817,"stem":1818,"description":1819,"icon":14,"links":14},"Trigger Netlify Site Builds with Directus Automate","/tutorials/workflows/trigger-netlify-site-builds-with-directus-automate","tutorials/7.workflows/trigger-netlify-site-builds-with-directus-automate","Learn how to trigger new Netlify website builds through Directus Automate.",{"title":1821,"path":1822,"stem":1823,"description":1824,"icon":14,"links":14},"Trigger Vercel Site Builds with Directus Automate","/tutorials/workflows/trigger-vercel-site-builds-with-directus-automate","tutorials/7.workflows/trigger-vercel-site-builds-with-directus-automate","Learn how to trigger new Vercel website builds through Directus Automate.",{"id":1826,"icon":1827,"content":1828,"link":1829},"812bf73d-ebfb-4246-9538-937a09a0c795","connected_tv","Learn more about our native MCP","https://directus.io/mcp",{"id":1831,"title":1593,"authors":1832,"body":1836,"description":1596,"extension":3769,"headline":14,"icon":14,"links":14,"meta":3770,"navigation":2268,"path":1594,"rawbody":3772,"seo":3773,"stem":1595,"technologies":3774,"__hash__":3776},"content/tutorials/4.migration/migrate-from-wordpress-to-directus.md",[1833],{"name":1834,"title":1835},"Muhammed Ali","Guest Author",{"type":1837,"value":1838,"toc":3745},"minimark",[1839,1843,1848,1851,1854,1858,1861,1865,1868,1871,1874,1878,1881,1884,1887,1891,1894,1898,1901,1905,1913,1916,1923,1926,1930,1933,1937,1940,1943,1954,1977,1980,1989,1996,2000,2003,2006,2009,2019,2022,2043,2046,2050,2053,2059,2062,2065,2069,2072,2075,2190,2194,2201,2208,2214,2607,2618,2629,2633,2640,2906,2929,2940,2943,2957,2961,2968,3359,3373,3376,3426,3433,3688,3691,3703,3706,3712,3716,3719,3723,3726,3729,3741],[1840,1841,1842],"p",{},"If you are considering transitioning your content management system from WordPress to Directus, this tutorial is for you. By the end, you will understand the process in migrating content, data, and other functionality from WordPress to Directus.",[1844,1845,1847],"h2",{"id":1846},"understanding-the-differences","Understanding the Differences",[1840,1849,1850],{},"WordPress is often used as an integrated CMS, meaning it tightly couples content management with presentation. This approach simplifies many tasks but can limit flexibility and performance.",[1840,1852,1853],{},"Directus on the other hand, being a headless CMS, separates the content repository from the presentation layer, offering freedom to use any frontend technology while managing content through a REST or GraphQL API. This separation implies a paradigm shift in how content is being managed and served.",[1844,1855,1857],{"id":1856},"directus-terminology","Directus Terminology",[1840,1859,1860],{},"Here is some key terminology you will come across while following this article or while trying to migrate your WordPress project to Directus:",[1862,1863,493],"h3",{"id":1864},"collections",[1840,1866,1867],{},"Collections in Directus are similar to tables in a database. They are used to organize and store data of a similar type. For example, you might have a collection for blog posts, another for users, and another for products. Each collection contains fields that define the structure of the data stored within it.",[1862,1869,498],{"id":1870},"fields",[1840,1872,1873],{},"Fields are the individual data points within a collection, similar to columns in a database table. Fields define the type of data that can be stored in them, such as text, numbers, dates, or relationships to other collections.",[1862,1875,1877],{"id":1876},"items","Items",[1840,1879,1880],{},"Items are the individual records within a collection, similar to rows in a database table. An item is a single unit of data that adheres to the structure defined by the fields in its collection. For instance, in a blog post collection, each blog post would be an item.",[1862,1882,508],{"id":1883},"relationships",[1840,1885,1886],{},"Relationships are connections between items in different collections. Directus allows you to create one-to-one, one-to-many, and many-to-many relationships, enabling complex data structures and interconnections. This may come in handy if you want to create a relational content structure, such as linking authors to their blog posts or products to their categories.",[1862,1888,1890],{"id":1889},"roles-and-permissions","Roles and Permissions",[1840,1892,1893],{},"Directus provides a powerful role-based access control system. Roles are assigned to users to define what actions they can perform within the Directus App, and permissions are set at a granular level to control access to collections, fields, and items based on the user’s role. This ensures that users only have access to the content and functionalities relevant to them.",[1862,1895,1897],{"id":1896},"directus-api-application-programming-interface","Directus API (Application Programming Interface)",[1840,1899,1900],{},"Directus exposes a RESTful API and a GraphQL API, allowing external applications and services to interact with the content stored in Directus programmatically. These APIs make it possible to retrieve, create, update, and delete content dynamically, enabling headless CMS functionalities for any frontend or application.",[1844,1902,1904],{"id":1903},"auditing-wordpress-plugins","Auditing WordPress Plugins",[1840,1906,1907,1908,1912],{},"Before the migration, audit your WordPress plugins to understand their functionality and the need they fulfill. Unlike WordPress, Directus might not offer direct plugin equivalents, so it is important to understand the ",[1909,1910,1911],"strong",{},"why"," behind each plugin being used. Also note that not all plugins need alternatives and the outcomes might be achievable within the Directus' core functionality.",[1840,1914,1915],{},"This understanding will guide you in seeking or developing alternatives that align with Directus's architecture.",[1840,1917,1918,1919,1922],{},"Start by making a comprehensive list of all the plugins currently active on your WordPress site. For each plugin, note down what it does. You might have something like ",[1909,1920,1921],{},"Yoast SEO"," for your blog which enhances SEO capabilities, including meta tags, sitemaps, and readability analysis.",[1840,1924,1925],{},"Directus doesn't have a built-in SEO plugin equivalent as a headless system - it is down to your application to implement features based on data held in Directus. For example, you can manage SEO metadata by creating custom fields in your collections for titles, meta descriptions, and other SEO-related information. You might also develop or use existing extensions to generate sitemaps.",[1844,1927,1929],{"id":1928},"migrating-content-from-wordpress","Migrating Content From WordPress",[1840,1931,1932],{},"This transition requires a systematic approach to ensure that all data is accurately transferred and that the new system is configured to meet your specific needs. In the following sections, you will export your posts and pages from WordPress. We will then use a Python script to import the data into Directus.",[1862,1934,1936],{"id":1935},"exporting-wordpress-data","Exporting WordPress Data",[1840,1938,1939],{},"Start by exporting your WordPress data. Here it is assumed you already have a Wordpress site.",[1840,1941,1942],{},"WordPress offers a built-in export tool that generates an XML file of your content. However, for a more comprehensive export, especially for custom post types and metadata, we will be using a plugin that can export to formats more conducive to manipulation like JSON.",[1840,1944,1945,1946,1949,1950,1953],{},"On your Wordpress Admin, in the ",[1909,1947,1948],{},"Plugins"," tab search for “",[1909,1951,1952],{},"WP Import Export Lite”",". Install and activate it.",[1840,1955,1956,1957,1960,1961,1964,1965,1968,1969,1976],{},"After the installation select “",[1909,1958,1959],{},"WP Imp Exp","” on the tab then select “",[1909,1962,1963],{},"Post","” and select the format JSON in “",[1909,1966,1967],{},"Advanced Options","” dropdown. Now you can download the ",[1970,1971,1975],"a",{"href":1972,"rel":1973},"https://github.com/directus-labs/blog-example-migrating-wordpress-directus/blob/main/WP-data.json",[1974],"nofollow","JSON file",".",[1840,1978,1979],{},"The JSON file we will use in this tutorial is a collection of blog posts from a WordPress site, each containing information such as the post ID, title, content, date, and permalink.",[1840,1981,1982,1983,1988],{},"You can use this same step to export the ",[1970,1984,1987],{"href":1985,"rel":1986},"https://github.com/directus-labs/blog-example-migrating-wordpress-directus/blob/main/pages-export.json",[1974],"Pages JSON data",". This file contains two pages with its title, content, and date it was created.",[1840,1990,1991],{},[1992,1993],"img",{"alt":1994,"src":1995},"JSON export from Wordpress","/img/8640fc5b-8b19-4533-a9cb-4465cc1a8255.webp",[1862,1997,1999],{"id":1998},"designing-your-directus-schema","Designing Your Directus Schema",[1840,2001,2002],{},"Before importing data into Directus, design your schema in Directus by creating collections (equivalent to WordPress's post types. In the JSON exports Post Type \"post\" and \"page\" ) and fields (similar to WordPress's fields: Title, Content, Date, etc). This step is critical and requires a deep understanding of your content structure to ensure the data is imported correctly into your Directus setup.",[1840,2004,2005],{},"In our case, we have two export with post types \"post\" and \"page\" so in the Directus Data Studio, create a collection with the name “Posts” and \"Pages\".",[1840,2007,2008],{},"Now we will create the fields that will hold the data items. If you are using my JSON exports create the following fields:",[1840,2010,2011,2015],{},[1992,2012],{"alt":2013,"src":2014},"Pages fields","/img/285156db-942e-49df-b9d2-ffb9c89bc9ac.webp",[1992,2016],{"alt":2017,"src":2018},"Fields for Collection","/img/bb47c0fb-0ca5-4ba2-984a-ba40f9d15cba.webp",[1840,2020,2021],{},"::{callout icon=\"material-symbols:info-outline\"}",[1840,2023,2024,2025,2031,2032,2037,2038,2042],{},"*Note that the “Content” field has a Field type of ",[2026,2027,2028],"em",{},[1909,2029,2030],{},"WYSIWYG",", the rest are ",[2026,2033,2034],{},[1909,2035,2036],{},"Input"," type. we are using ",[2026,2039,2040],{},[1909,2041,2030],{}," because the exported data is in raw HTML",[1840,2044,2045],{},"::",[1844,2047,2049],{"id":2048},"importing-data-into-directus","Importing Data into Directus",[1840,2051,2052],{},"After the JSON file is extracted and the schema is developed on Directus, you can go to your Collections page on Directus admin and you will see a button there to import and export. Just choose export and select the JSON file you downloaded.",[1840,2054,2055],{},[1992,2056],{"alt":2057,"src":2058},"Import in Directus Collection","/img/ec2f9808-5775-45a1-bac8-715095434502.webp",[1840,2060,2061],{},"If you have images in the post or pages, you won’t be able to access them. With the Directus REST API we will be able to manipulate the JSON to extact the images and save to Directus Files so we can access the files in the post.",[1840,2063,2064],{},"To use the API we need to get the API token at User Directory → Administrator → Admin User → Token. Copy the token and Keep it somewhere, we will use it later.",[1844,2066,2068],{"id":2067},"creating-import-scripts","Creating Import Scripts",[1840,2070,2071],{},"In this section, we will work on the code to export the JSON data into our Directus fields. We will use Python to develop the script but if you are not familiar with Python don’t worry, I will explain everything and show you how to run the code.",[1840,2073,2074],{},"The files gotten from WordPress have the following keys, but what we will be extracting will be \"Title\", \"Content\", and \"Date\".",[2076,2077,2081],"pre",{"className":2078,"code":2079,"language":2080,"meta":24,"style":24},"language-json shiki shiki-themes github-light github-light github-dark","{\n    \"ID\": \"2\",\n    \"Title\": \"Sample Page\",\n    \"Content\": \"...\",\n    \"Excerpt\": \"...\",\n    \"Date\": \"2024-04-08 15:33:50\",\n    \"Post Type\": \"...\",\n    \"Permalink\": \"...\"\n  },\n","json",[2082,2083,2084,2093,2110,2123,2136,2148,2161,2173,2184],"code",{"__ignoreMap":24},[2085,2086,2089],"span",{"class":2087,"line":2088},"line",1,[2085,2090,2092],{"class":2091},"sxrX7","{\n",[2085,2094,2096,2100,2103,2107],{"class":2087,"line":2095},2,[2085,2097,2099],{"class":2098},"sBjJW","    \"ID\"",[2085,2101,2102],{"class":2091},": ",[2085,2104,2106],{"class":2105},"sIIMD","\"2\"",[2085,2108,2109],{"class":2091},",\n",[2085,2111,2113,2116,2118,2121],{"class":2087,"line":2112},3,[2085,2114,2115],{"class":2098},"    \"Title\"",[2085,2117,2102],{"class":2091},[2085,2119,2120],{"class":2105},"\"Sample Page\"",[2085,2122,2109],{"class":2091},[2085,2124,2126,2129,2131,2134],{"class":2087,"line":2125},4,[2085,2127,2128],{"class":2098},"    \"Content\"",[2085,2130,2102],{"class":2091},[2085,2132,2133],{"class":2105},"\"...\"",[2085,2135,2109],{"class":2091},[2085,2137,2139,2142,2144,2146],{"class":2087,"line":2138},5,[2085,2140,2141],{"class":2098},"    \"Excerpt\"",[2085,2143,2102],{"class":2091},[2085,2145,2133],{"class":2105},[2085,2147,2109],{"class":2091},[2085,2149,2151,2154,2156,2159],{"class":2087,"line":2150},6,[2085,2152,2153],{"class":2098},"    \"Date\"",[2085,2155,2102],{"class":2091},[2085,2157,2158],{"class":2105},"\"2024-04-08 15:33:50\"",[2085,2160,2109],{"class":2091},[2085,2162,2164,2167,2169,2171],{"class":2087,"line":2163},7,[2085,2165,2166],{"class":2098},"    \"Post Type\"",[2085,2168,2102],{"class":2091},[2085,2170,2133],{"class":2105},[2085,2172,2109],{"class":2091},[2085,2174,2176,2179,2181],{"class":2087,"line":2175},8,[2085,2177,2178],{"class":2098},"    \"Permalink\"",[2085,2180,2102],{"class":2091},[2085,2182,2183],{"class":2105},"\"...\"\n",[2085,2185,2187],{"class":2087,"line":2186},9,[2085,2188,2189],{"class":2091},"  },\n",[1862,2191,2193],{"id":2192},"uploading-images","Uploading Images",[1840,2195,2196,2197,2200],{},"As you notice in the ",[1970,2198,1975],{"href":1972,"rel":2199},[1974],", the image URLs (e.g directus-test.local:33913/wp-content/uploads/2024/04/image-1.png) can not be accessed by Directus. All images present in posts must be extracted and saved to Directus.",[1840,2202,2203,2204,2207],{},"Here we will develop the function to post each downloaded image to Directus and get the new URL.\nTo start, first, create a file with the name ",[2082,2205,2206],{},"extract-image.py",". The name is arbitrary.",[1840,2209,2210,2213],{},[2026,2211,2212],{},"Note: The Python file should be in the same directory as the JSON file.","\nWe will start with the code below. Paste it in the file you just created.",[2076,2215,2219],{"className":2216,"code":2217,"language":2218,"meta":24,"style":24},"language-python shiki shiki-themes github-light github-light github-dark","import json\nimport requests\nimport os\n# Replace with the path to your JSON file\njson_file_path = \"WP-data.json\" # Change this with the Pages JSON file to extract images for pages.\n\n# Simulated function to upload an image to Directus and return the new image URL\ndef upload_to_directus(image_url):\n    # This is where you'd upload the image to Directus using its API.\n    # Below is a simulated Directus URL for demonstration purposes.\n    print(image_url)\n    image_content = requests.get(image_url).content\n    temp_image_path = \"temp_image.jpg\"  # Temporary file path for the downloaded image\n    with open(temp_image_path, \"wb\") as file:\n        file.write(image_content)\n    headers = {\"Authorization\": \"Bearer your-api-token\"}\n    files = {\n        \"file\": open(\n            temp_image_path, \"rb\"\n        )  # Open the temporary file to include in the request\n    }\n    directus_upload_url = \"https://your.directus.app/files\"\n    print(f\"Uploading image to Directus: {directus_upload_url}\")\n    response = requests.post(directus_upload_url, files=files, headers=headers)\n    response_str = response.json()\n    directus_image_id = response_str\\[\"data\"\\][\"id\"]\n    # Cleanup: remove the temporary image file\n    os.remove(temp_image_path)\n    # Construct the Directus image URL from the response\n    directus_image_url = f\"https://your.directus.app/assets/{directus_image_id}\"\n    print(f\"Directus Image URL: {directus_image_url}\")\n    return directus_image_url\n","python",[2082,2220,2221,2230,2237,2244,2250,2264,2270,2275,2287,2292,2298,2307,2318,2332,2360,2369,2391,2402,2416,2425,2434,2440,2451,2480,2507,2518,2533,2539,2545,2551,2575,2598],{"__ignoreMap":24},[2085,2222,2223,2227],{"class":2087,"line":2088},[2085,2224,2226],{"class":2225},"s8jYJ","import",[2085,2228,2229],{"class":2091}," json\n",[2085,2231,2232,2234],{"class":2087,"line":2095},[2085,2233,2226],{"class":2225},[2085,2235,2236],{"class":2091}," requests\n",[2085,2238,2239,2241],{"class":2087,"line":2112},[2085,2240,2226],{"class":2225},[2085,2242,2243],{"class":2091}," os\n",[2085,2245,2246],{"class":2087,"line":2125},[2085,2247,2249],{"class":2248},"sCsY4","# Replace with the path to your JSON file\n",[2085,2251,2252,2255,2258,2261],{"class":2087,"line":2138},[2085,2253,2254],{"class":2091},"json_file_path ",[2085,2256,2257],{"class":2225},"=",[2085,2259,2260],{"class":2105}," \"WP-data.json\"",[2085,2262,2263],{"class":2248}," # Change this with the Pages JSON file to extract images for pages.\n",[2085,2265,2266],{"class":2087,"line":2150},[2085,2267,2269],{"emptyLinePlaceholder":2268},true,"\n",[2085,2271,2272],{"class":2087,"line":2163},[2085,2273,2274],{"class":2248},"# Simulated function to upload an image to Directus and return the new image URL\n",[2085,2276,2277,2280,2284],{"class":2087,"line":2175},[2085,2278,2279],{"class":2225},"def",[2085,2281,2283],{"class":2282},"snPdu"," upload_to_directus",[2085,2285,2286],{"class":2091},"(image_url):\n",[2085,2288,2289],{"class":2087,"line":2186},[2085,2290,2291],{"class":2248},"    # This is where you'd upload the image to Directus using its API.\n",[2085,2293,2295],{"class":2087,"line":2294},10,[2085,2296,2297],{"class":2248},"    # Below is a simulated Directus URL for demonstration purposes.\n",[2085,2299,2301,2304],{"class":2087,"line":2300},11,[2085,2302,2303],{"class":2098},"    print",[2085,2305,2306],{"class":2091},"(image_url)\n",[2085,2308,2310,2313,2315],{"class":2087,"line":2309},12,[2085,2311,2312],{"class":2091},"    image_content ",[2085,2314,2257],{"class":2225},[2085,2316,2317],{"class":2091}," requests.get(image_url).content\n",[2085,2319,2321,2324,2326,2329],{"class":2087,"line":2320},13,[2085,2322,2323],{"class":2091},"    temp_image_path ",[2085,2325,2257],{"class":2225},[2085,2327,2328],{"class":2105}," \"temp_image.jpg\"",[2085,2330,2331],{"class":2248},"  # Temporary file path for the downloaded image\n",[2085,2333,2335,2338,2341,2344,2347,2350,2353,2357],{"class":2087,"line":2334},14,[2085,2336,2337],{"class":2225},"    with",[2085,2339,2340],{"class":2098}," open",[2085,2342,2343],{"class":2091},"(temp_image_path, ",[2085,2345,2346],{"class":2105},"\"wb\"",[2085,2348,2349],{"class":2091},") ",[2085,2351,2352],{"class":2225},"as",[2085,2354,2356],{"class":2355},"sP4rz"," file",[2085,2358,2359],{"class":2091},":\n",[2085,2361,2363,2366],{"class":2087,"line":2362},15,[2085,2364,2365],{"class":2355},"        file",[2085,2367,2368],{"class":2091},".write(image_content)\n",[2085,2370,2372,2375,2377,2380,2383,2385,2388],{"class":2087,"line":2371},16,[2085,2373,2374],{"class":2091},"    headers ",[2085,2376,2257],{"class":2225},[2085,2378,2379],{"class":2091}," {",[2085,2381,2382],{"class":2105},"\"Authorization\"",[2085,2384,2102],{"class":2091},[2085,2386,2387],{"class":2105},"\"Bearer your-api-token\"",[2085,2389,2390],{"class":2091},"}\n",[2085,2392,2394,2397,2399],{"class":2087,"line":2393},17,[2085,2395,2396],{"class":2091},"    files ",[2085,2398,2257],{"class":2225},[2085,2400,2401],{"class":2091}," {\n",[2085,2403,2405,2408,2410,2413],{"class":2087,"line":2404},18,[2085,2406,2407],{"class":2105},"        \"file\"",[2085,2409,2102],{"class":2091},[2085,2411,2412],{"class":2098},"open",[2085,2414,2415],{"class":2091},"(\n",[2085,2417,2419,2422],{"class":2087,"line":2418},19,[2085,2420,2421],{"class":2091},"            temp_image_path, ",[2085,2423,2424],{"class":2105},"\"rb\"\n",[2085,2426,2428,2431],{"class":2087,"line":2427},20,[2085,2429,2430],{"class":2091},"        )  ",[2085,2432,2433],{"class":2248},"# Open the temporary file to include in the request\n",[2085,2435,2437],{"class":2087,"line":2436},21,[2085,2438,2439],{"class":2091},"    }\n",[2085,2441,2443,2446,2448],{"class":2087,"line":2442},22,[2085,2444,2445],{"class":2091},"    directus_upload_url ",[2085,2447,2257],{"class":2225},[2085,2449,2450],{"class":2105}," \"https://your.directus.app/files\"\n",[2085,2452,2454,2456,2459,2462,2465,2468,2471,2474,2477],{"class":2087,"line":2453},23,[2085,2455,2303],{"class":2098},[2085,2457,2458],{"class":2091},"(",[2085,2460,2461],{"class":2225},"f",[2085,2463,2464],{"class":2105},"\"Uploading image to Directus: ",[2085,2466,2467],{"class":2098},"{",[2085,2469,2470],{"class":2091},"directus_upload_url",[2085,2472,2473],{"class":2098},"}",[2085,2475,2476],{"class":2105},"\"",[2085,2478,2479],{"class":2091},")\n",[2085,2481,2483,2486,2488,2491,2494,2496,2499,2502,2504],{"class":2087,"line":2482},24,[2085,2484,2485],{"class":2091},"    response ",[2085,2487,2257],{"class":2225},[2085,2489,2490],{"class":2091}," requests.post(directus_upload_url, ",[2085,2492,2493],{"class":2355},"files",[2085,2495,2257],{"class":2225},[2085,2497,2498],{"class":2091},"files, ",[2085,2500,2501],{"class":2355},"headers",[2085,2503,2257],{"class":2225},[2085,2505,2506],{"class":2091},"headers)\n",[2085,2508,2510,2513,2515],{"class":2087,"line":2509},25,[2085,2511,2512],{"class":2091},"    response_str ",[2085,2514,2257],{"class":2225},[2085,2516,2517],{"class":2091}," response.json()\n",[2085,2519,2521,2524,2526,2529],{"class":2087,"line":2520},26,[2085,2522,2523],{"class":2091},"    directus_image_id ",[2085,2525,2257],{"class":2225},[2085,2527,2528],{"class":2091}," response_str\\",[2085,2530,2532],{"class":2531},"sPrNH","[\"data\"\\][\"id\"]\n",[2085,2534,2536],{"class":2087,"line":2535},27,[2085,2537,2538],{"class":2248},"    # Cleanup: remove the temporary image file\n",[2085,2540,2542],{"class":2087,"line":2541},28,[2085,2543,2544],{"class":2091},"    os.remove(temp_image_path)\n",[2085,2546,2548],{"class":2087,"line":2547},29,[2085,2549,2550],{"class":2248},"    # Construct the Directus image URL from the response\n",[2085,2552,2554,2557,2559,2562,2565,2567,2570,2572],{"class":2087,"line":2553},30,[2085,2555,2556],{"class":2091},"    directus_image_url ",[2085,2558,2257],{"class":2225},[2085,2560,2561],{"class":2225}," f",[2085,2563,2564],{"class":2105},"\"https://your.directus.app/assets/",[2085,2566,2467],{"class":2098},[2085,2568,2569],{"class":2091},"directus_image_id",[2085,2571,2473],{"class":2098},[2085,2573,2574],{"class":2105},"\"\n",[2085,2576,2578,2580,2582,2584,2587,2589,2592,2594,2596],{"class":2087,"line":2577},31,[2085,2579,2303],{"class":2098},[2085,2581,2458],{"class":2091},[2085,2583,2461],{"class":2225},[2085,2585,2586],{"class":2105},"\"Directus Image URL: ",[2085,2588,2467],{"class":2098},[2085,2590,2591],{"class":2091},"directus_image_url",[2085,2593,2473],{"class":2098},[2085,2595,2476],{"class":2105},[2085,2597,2479],{"class":2091},[2085,2599,2601,2604],{"class":2087,"line":2600},32,[2085,2602,2603],{"class":2225},"    return",[2085,2605,2606],{"class":2091}," directus_image_url\n",[1840,2608,2609,2610,2613,2614,2617],{},"The function accepts an ",[2082,2611,2612],{},"image_url",", which is the URL of the image that needs to be uploaded. The script retrieves this image using the ",[2082,2615,2616],{},"requests.get"," method and writes the image content to a temporary local file named \"temp_image.jpg\". After storing the image, the script sends a POST request to upload the image to Directus. This request includes authentication via a Bearer token (your directus token). Once the upload is successful, the function parses the JSON response to extract the new image ID assigned by Directus. It then constructs the URL for the newly upload.",[1840,2619,2620,2621,2624,2625,2628],{},"Replace ",[2082,2622,2623],{},"your-api-token"," in the code above with the token you generated earlier. Also, replace ",[2082,2626,2627],{},"https://your.directus.app"," with your Directus app URL.",[1862,2630,2632],{"id":2631},"replacing-image-urls","Replacing Image URLs",[1840,2634,2635,2636,2639],{},"Now we will start getting the new images URL generated from the code earlier(",[2082,2637,2638],{},"upload_to_directus()","). The JSON file is then updated with the new Directus asset URL. Then a new JSON file is saved locally.\nTo do this, paste the following code below the code you have already.",[2076,2641,2643],{"className":2216,"code":2642,"language":2218,"meta":24,"style":24},"# Load JSON data from the file\nwith open(json_file_path, \"r\") as file:\n    data = json.load(file)\n# Iterate through each post in the JSON data\nfor post in data:\n    content = post[\"Content\"]\n    # Check if there is an image in the content\n    if '\u003Cimg src=\"' in content:\n        # Extract the image URL\n        start_index = content.index('\u003Cimg src=\"') + 10\n        end_index = content.index('\"', start_index)\n        image_url = content[start_index:end_index]\n        # Upload the image to Directus and get the new URL\n        new_image_url = upload_to_directus(image_url)\n        print(new_image_url)\n        # Replace the old image URL with the new one in the content\n        post[\"Content\"] = content.replace(image_url, new_image_url)\n# Output the modified JSON data to a new file or print it out\noutput_file_path = \"modified_WP-data.json\"\nwith open(output_file_path, \"w\") as file:\n    json.dump(data, file, indent=4)\n# Print a message to indicate completion\nprint(\"The JSON data has been updated with Directus image URLs.\")\n",[2082,2644,2645,2650,2671,2686,2691,2705,2721,2726,2740,2745,2766,2781,2791,2796,2806,2814,2819,2834,2839,2849,2869,2889,2894],{"__ignoreMap":24},[2085,2646,2647],{"class":2087,"line":2088},[2085,2648,2649],{"class":2248},"# Load JSON data from the file\n",[2085,2651,2652,2655,2657,2660,2663,2665,2667,2669],{"class":2087,"line":2095},[2085,2653,2654],{"class":2225},"with",[2085,2656,2340],{"class":2098},[2085,2658,2659],{"class":2091},"(json_file_path, ",[2085,2661,2662],{"class":2105},"\"r\"",[2085,2664,2349],{"class":2091},[2085,2666,2352],{"class":2225},[2085,2668,2356],{"class":2355},[2085,2670,2359],{"class":2091},[2085,2672,2673,2676,2678,2681,2684],{"class":2087,"line":2112},[2085,2674,2675],{"class":2091},"    data ",[2085,2677,2257],{"class":2225},[2085,2679,2680],{"class":2091}," json.load(",[2085,2682,2683],{"class":2355},"file",[2085,2685,2479],{"class":2091},[2085,2687,2688],{"class":2087,"line":2125},[2085,2689,2690],{"class":2248},"# Iterate through each post in the JSON data\n",[2085,2692,2693,2696,2699,2702],{"class":2087,"line":2138},[2085,2694,2695],{"class":2225},"for",[2085,2697,2698],{"class":2091}," post ",[2085,2700,2701],{"class":2225},"in",[2085,2703,2704],{"class":2091}," data:\n",[2085,2706,2707,2710,2712,2715,2718],{"class":2087,"line":2150},[2085,2708,2709],{"class":2091},"    content ",[2085,2711,2257],{"class":2225},[2085,2713,2714],{"class":2091}," post[",[2085,2716,2717],{"class":2105},"\"Content\"",[2085,2719,2720],{"class":2091},"]\n",[2085,2722,2723],{"class":2087,"line":2163},[2085,2724,2725],{"class":2248},"    # Check if there is an image in the content\n",[2085,2727,2728,2731,2734,2737],{"class":2087,"line":2175},[2085,2729,2730],{"class":2225},"    if",[2085,2732,2733],{"class":2105}," '\u003Cimg src=\"'",[2085,2735,2736],{"class":2225}," in",[2085,2738,2739],{"class":2091}," content:\n",[2085,2741,2742],{"class":2087,"line":2186},[2085,2743,2744],{"class":2248},"        # Extract the image URL\n",[2085,2746,2747,2750,2752,2755,2758,2760,2763],{"class":2087,"line":2294},[2085,2748,2749],{"class":2091},"        start_index ",[2085,2751,2257],{"class":2225},[2085,2753,2754],{"class":2091}," content.index(",[2085,2756,2757],{"class":2105},"'\u003Cimg src=\"'",[2085,2759,2349],{"class":2091},[2085,2761,2762],{"class":2225},"+",[2085,2764,2765],{"class":2098}," 10\n",[2085,2767,2768,2771,2773,2775,2778],{"class":2087,"line":2300},[2085,2769,2770],{"class":2091},"        end_index ",[2085,2772,2257],{"class":2225},[2085,2774,2754],{"class":2091},[2085,2776,2777],{"class":2105},"'\"'",[2085,2779,2780],{"class":2091},", start_index)\n",[2085,2782,2783,2786,2788],{"class":2087,"line":2309},[2085,2784,2785],{"class":2091},"        image_url ",[2085,2787,2257],{"class":2225},[2085,2789,2790],{"class":2091}," content[start_index:end_index]\n",[2085,2792,2793],{"class":2087,"line":2320},[2085,2794,2795],{"class":2248},"        # Upload the image to Directus and get the new URL\n",[2085,2797,2798,2801,2803],{"class":2087,"line":2334},[2085,2799,2800],{"class":2091},"        new_image_url ",[2085,2802,2257],{"class":2225},[2085,2804,2805],{"class":2091}," upload_to_directus(image_url)\n",[2085,2807,2808,2811],{"class":2087,"line":2362},[2085,2809,2810],{"class":2098},"        print",[2085,2812,2813],{"class":2091},"(new_image_url)\n",[2085,2815,2816],{"class":2087,"line":2371},[2085,2817,2818],{"class":2248},"        # Replace the old image URL with the new one in the content\n",[2085,2820,2821,2824,2826,2829,2831],{"class":2087,"line":2393},[2085,2822,2823],{"class":2091},"        post[",[2085,2825,2717],{"class":2105},[2085,2827,2828],{"class":2091},"] ",[2085,2830,2257],{"class":2225},[2085,2832,2833],{"class":2091}," content.replace(image_url, new_image_url)\n",[2085,2835,2836],{"class":2087,"line":2404},[2085,2837,2838],{"class":2248},"# Output the modified JSON data to a new file or print it out\n",[2085,2840,2841,2844,2846],{"class":2087,"line":2418},[2085,2842,2843],{"class":2091},"output_file_path ",[2085,2845,2257],{"class":2225},[2085,2847,2848],{"class":2105}," \"modified_WP-data.json\"\n",[2085,2850,2851,2853,2855,2858,2861,2863,2865,2867],{"class":2087,"line":2427},[2085,2852,2654],{"class":2225},[2085,2854,2340],{"class":2098},[2085,2856,2857],{"class":2091},"(output_file_path, ",[2085,2859,2860],{"class":2105},"\"w\"",[2085,2862,2349],{"class":2091},[2085,2864,2352],{"class":2225},[2085,2866,2356],{"class":2355},[2085,2868,2359],{"class":2091},[2085,2870,2871,2874,2876,2879,2882,2884,2887],{"class":2087,"line":2436},[2085,2872,2873],{"class":2091},"    json.dump(data, ",[2085,2875,2683],{"class":2355},[2085,2877,2878],{"class":2091},", ",[2085,2880,2881],{"class":2355},"indent",[2085,2883,2257],{"class":2225},[2085,2885,2886],{"class":2098},"4",[2085,2888,2479],{"class":2091},[2085,2890,2891],{"class":2087,"line":2442},[2085,2892,2893],{"class":2248},"# Print a message to indicate completion\n",[2085,2895,2896,2899,2901,2904],{"class":2087,"line":2453},[2085,2897,2898],{"class":2098},"print",[2085,2900,2458],{"class":2091},[2085,2902,2903],{"class":2105},"\"The JSON data has been updated with Directus image URLs.\"",[2085,2905,2479],{"class":2091},[1840,2907,2908,2909,2912,2913,2915,2916,2919,2920,2922,2923,2925,2926,2928],{},"The code above opens and reads a JSON file specified by ",[2082,2910,2911],{},"json_file_path",". It then loops through ",[2082,2914,2717],{}," field.  Within each post's content, the code checks for the presence of an ",[2082,2917,2918],{},"\u003Cimg>"," tag by looking for the substring ",[2082,2921,2757],{},". If such a substring is found, it means the post contains an image. The code then extracts the URL of this image by locating the substring that starts immediately after ",[2082,2924,2757],{}," and ends at the next double-quote (",[2082,2927,2476],{},").",[1840,2930,2931,2932,2935,2936,2939],{},"The extracted image URL is then passed to a function named ",[2082,2933,2934],{},"upload_to_directus"," (this will be created next) to upload the image to Directus. The function returns ",[2082,2937,2938],{},"new_image_url"," to this loop to replace the old URL in the post's content with this new URL.",[1840,2941,2942],{},"Assuming you have Python installed already you can run the code to create the new JSON file.",[2076,2944,2948],{"className":2945,"code":2946,"language":2947,"meta":24,"style":24},"language-bash shiki shiki-themes github-light github-light github-dark","python extract-image.py\n","bash",[2082,2949,2950],{"__ignoreMap":24},[2085,2951,2952,2954],{"class":2087,"line":2088},[2085,2953,2218],{"class":2282},[2085,2955,2956],{"class":2105}," extract-image.py\n",[1862,2958,2960],{"id":2959},"uploading-posts","Uploading Posts",[1840,2962,2963,2964,2967],{},"Now we will build the script to store our posts in our Fields in Directus. Create a new file with the name ",[2026,2965,2966],{},"directus.py"," and paste the following code:",[2076,2969,2971],{"className":2216,"code":2970,"language":2218,"meta":24,"style":24},"import json\nimport requests\n\ndef import_posts_to_directus(json_file_path, directus_url, api_key):\n    \"\"\"\n    Reads posts from a JSON file and imports them into Directus, including handling featured images.\n    \"\"\"\n    with open(json_file_path, \"r\") as file:\n        posts = json.load(file)\n    headers = {\"Authorization\": f\"Bearer {api_key}\", \"Content-Type\": \"application/json\"}\n    for post in posts:\n        # Extract the first image URL from the content and simulate its upload to Directus\n        # Prepare the payload for Directus\n        payload = {\n            \"Title\": post[\"Title\"],\n            \"Content\": post[\"Content\"],\n            \"Date\": post[\"Date\"],\n        }\n        # POST the data to the Directus API\n        response = requests.post(\n            f\"{directus_url}/items/Posts\", headers=headers, json=payload\n        ) # path for pages is /Pages\n        if response.status_code in [200, 201]:\n            print(f\"Post '{post['Title']}' imported successfully.\")\n        else:\n            print(f\"Failed to import post '{post['Title']}': {response.text}\")\n\n# Example usage\njson_file_path = \"modified_WP-data.json\" # change to modified file to post Pages to Directus\ndirectus_url = \"https://your.directus.app\"\napi_key = \"your-api-token\"\n# Uncomment the line below to run the function with your actual Directus URL and API key\nimport_posts_to_directus(json_file_path, directus_url, api_key)\n",[2082,2972,2973,2979,2985,2989,2999,3004,3009,3013,3031,3044,3082,3094,3099,3104,3113,3127,3138,3150,3155,3160,3170,3203,3211,3235,3265,3272,3307,3311,3316,3328,3338,3348,3353],{"__ignoreMap":24},[2085,2974,2975,2977],{"class":2087,"line":2088},[2085,2976,2226],{"class":2225},[2085,2978,2229],{"class":2091},[2085,2980,2981,2983],{"class":2087,"line":2095},[2085,2982,2226],{"class":2225},[2085,2984,2236],{"class":2091},[2085,2986,2987],{"class":2087,"line":2112},[2085,2988,2269],{"emptyLinePlaceholder":2268},[2085,2990,2991,2993,2996],{"class":2087,"line":2125},[2085,2992,2279],{"class":2225},[2085,2994,2995],{"class":2282}," import_posts_to_directus",[2085,2997,2998],{"class":2091},"(json_file_path, directus_url, api_key):\n",[2085,3000,3001],{"class":2087,"line":2138},[2085,3002,3003],{"class":2105},"    \"\"\"\n",[2085,3005,3006],{"class":2087,"line":2150},[2085,3007,3008],{"class":2105},"    Reads posts from a JSON file and imports them into Directus, including handling featured images.\n",[2085,3010,3011],{"class":2087,"line":2163},[2085,3012,3003],{"class":2105},[2085,3014,3015,3017,3019,3021,3023,3025,3027,3029],{"class":2087,"line":2175},[2085,3016,2337],{"class":2225},[2085,3018,2340],{"class":2098},[2085,3020,2659],{"class":2091},[2085,3022,2662],{"class":2105},[2085,3024,2349],{"class":2091},[2085,3026,2352],{"class":2225},[2085,3028,2356],{"class":2355},[2085,3030,2359],{"class":2091},[2085,3032,3033,3036,3038,3040,3042],{"class":2087,"line":2186},[2085,3034,3035],{"class":2091},"        posts ",[2085,3037,2257],{"class":2225},[2085,3039,2680],{"class":2091},[2085,3041,2683],{"class":2355},[2085,3043,2479],{"class":2091},[2085,3045,3046,3048,3050,3052,3054,3056,3058,3061,3063,3066,3068,3070,3072,3075,3077,3080],{"class":2087,"line":2294},[2085,3047,2374],{"class":2091},[2085,3049,2257],{"class":2225},[2085,3051,2379],{"class":2091},[2085,3053,2382],{"class":2105},[2085,3055,2102],{"class":2091},[2085,3057,2461],{"class":2225},[2085,3059,3060],{"class":2105},"\"Bearer ",[2085,3062,2467],{"class":2098},[2085,3064,3065],{"class":2091},"api_key",[2085,3067,2473],{"class":2098},[2085,3069,2476],{"class":2105},[2085,3071,2878],{"class":2091},[2085,3073,3074],{"class":2105},"\"Content-Type\"",[2085,3076,2102],{"class":2091},[2085,3078,3079],{"class":2105},"\"application/json\"",[2085,3081,2390],{"class":2091},[2085,3083,3084,3087,3089,3091],{"class":2087,"line":2300},[2085,3085,3086],{"class":2225},"    for",[2085,3088,2698],{"class":2091},[2085,3090,2701],{"class":2225},[2085,3092,3093],{"class":2091}," posts:\n",[2085,3095,3096],{"class":2087,"line":2309},[2085,3097,3098],{"class":2248},"        # Extract the first image URL from the content and simulate its upload to Directus\n",[2085,3100,3101],{"class":2087,"line":2320},[2085,3102,3103],{"class":2248},"        # Prepare the payload for Directus\n",[2085,3105,3106,3109,3111],{"class":2087,"line":2334},[2085,3107,3108],{"class":2091},"        payload ",[2085,3110,2257],{"class":2225},[2085,3112,2401],{"class":2091},[2085,3114,3115,3118,3121,3124],{"class":2087,"line":2362},[2085,3116,3117],{"class":2105},"            \"Title\"",[2085,3119,3120],{"class":2091},": post[",[2085,3122,3123],{"class":2105},"\"Title\"",[2085,3125,3126],{"class":2091},"],\n",[2085,3128,3129,3132,3134,3136],{"class":2087,"line":2371},[2085,3130,3131],{"class":2105},"            \"Content\"",[2085,3133,3120],{"class":2091},[2085,3135,2717],{"class":2105},[2085,3137,3126],{"class":2091},[2085,3139,3140,3143,3145,3148],{"class":2087,"line":2393},[2085,3141,3142],{"class":2105},"            \"Date\"",[2085,3144,3120],{"class":2091},[2085,3146,3147],{"class":2105},"\"Date\"",[2085,3149,3126],{"class":2091},[2085,3151,3152],{"class":2087,"line":2404},[2085,3153,3154],{"class":2091},"        }\n",[2085,3156,3157],{"class":2087,"line":2418},[2085,3158,3159],{"class":2248},"        # POST the data to the Directus API\n",[2085,3161,3162,3165,3167],{"class":2087,"line":2427},[2085,3163,3164],{"class":2091},"        response ",[2085,3166,2257],{"class":2225},[2085,3168,3169],{"class":2091}," requests.post(\n",[2085,3171,3172,3175,3177,3179,3182,3184,3187,3189,3191,3193,3196,3198,3200],{"class":2087,"line":2436},[2085,3173,3174],{"class":2225},"            f",[2085,3176,2476],{"class":2105},[2085,3178,2467],{"class":2098},[2085,3180,3181],{"class":2091},"directus_url",[2085,3183,2473],{"class":2098},[2085,3185,3186],{"class":2105},"/items/Posts\"",[2085,3188,2878],{"class":2091},[2085,3190,2501],{"class":2355},[2085,3192,2257],{"class":2225},[2085,3194,3195],{"class":2091},"headers, ",[2085,3197,2080],{"class":2355},[2085,3199,2257],{"class":2225},[2085,3201,3202],{"class":2091},"payload\n",[2085,3204,3205,3208],{"class":2087,"line":2442},[2085,3206,3207],{"class":2091},"        ) ",[2085,3209,3210],{"class":2248},"# path for pages is /Pages\n",[2085,3212,3213,3216,3219,3221,3224,3227,3229,3232],{"class":2087,"line":2453},[2085,3214,3215],{"class":2225},"        if",[2085,3217,3218],{"class":2091}," response.status_code ",[2085,3220,2701],{"class":2225},[2085,3222,3223],{"class":2091}," [",[2085,3225,3226],{"class":2098},"200",[2085,3228,2878],{"class":2091},[2085,3230,3231],{"class":2098},"201",[2085,3233,3234],{"class":2091},"]:\n",[2085,3236,3237,3240,3242,3244,3247,3249,3252,3255,3258,3260,3263],{"class":2087,"line":2482},[2085,3238,3239],{"class":2098},"            print",[2085,3241,2458],{"class":2091},[2085,3243,2461],{"class":2225},[2085,3245,3246],{"class":2105},"\"Post '",[2085,3248,2467],{"class":2098},[2085,3250,3251],{"class":2091},"post[",[2085,3253,3254],{"class":2105},"'Title'",[2085,3256,3257],{"class":2091},"]",[2085,3259,2473],{"class":2098},[2085,3261,3262],{"class":2105},"' imported successfully.\"",[2085,3264,2479],{"class":2091},[2085,3266,3267,3270],{"class":2087,"line":2509},[2085,3268,3269],{"class":2225},"        else",[2085,3271,2359],{"class":2091},[2085,3273,3274,3276,3278,3280,3283,3285,3287,3289,3291,3293,3296,3298,3301,3303,3305],{"class":2087,"line":2520},[2085,3275,3239],{"class":2098},[2085,3277,2458],{"class":2091},[2085,3279,2461],{"class":2225},[2085,3281,3282],{"class":2105},"\"Failed to import post '",[2085,3284,2467],{"class":2098},[2085,3286,3251],{"class":2091},[2085,3288,3254],{"class":2105},[2085,3290,3257],{"class":2091},[2085,3292,2473],{"class":2098},[2085,3294,3295],{"class":2105},"': ",[2085,3297,2467],{"class":2098},[2085,3299,3300],{"class":2091},"response.text",[2085,3302,2473],{"class":2098},[2085,3304,2476],{"class":2105},[2085,3306,2479],{"class":2091},[2085,3308,3309],{"class":2087,"line":2535},[2085,3310,2269],{"emptyLinePlaceholder":2268},[2085,3312,3313],{"class":2087,"line":2541},[2085,3314,3315],{"class":2248},"# Example usage\n",[2085,3317,3318,3320,3322,3325],{"class":2087,"line":2547},[2085,3319,2254],{"class":2091},[2085,3321,2257],{"class":2225},[2085,3323,3324],{"class":2105}," \"modified_WP-data.json\"",[2085,3326,3327],{"class":2248}," # change to modified file to post Pages to Directus\n",[2085,3329,3330,3333,3335],{"class":2087,"line":2553},[2085,3331,3332],{"class":2091},"directus_url ",[2085,3334,2257],{"class":2225},[2085,3336,3337],{"class":2105}," \"https://your.directus.app\"\n",[2085,3339,3340,3343,3345],{"class":2087,"line":2577},[2085,3341,3342],{"class":2091},"api_key ",[2085,3344,2257],{"class":2225},[2085,3346,3347],{"class":2105}," \"your-api-token\"\n",[2085,3349,3350],{"class":2087,"line":2600},[2085,3351,3352],{"class":2248},"# Uncomment the line below to run the function with your actual Directus URL and API key\n",[2085,3354,3356],{"class":2087,"line":3355},33,[2085,3357,3358],{"class":2091},"import_posts_to_directus(json_file_path, directus_url, api_key)\n",[3360,3361,3364],"callout",{"icon":3362,"title":3363},"material-symbols:info-outline","Replace Data",[1840,3365,3366,3367,3369,3370,3372],{},"Note: Replace ",[2082,3368,2627],{}," and ",[2082,3371,2623],{}," with the appropriate details.",[1840,3374,3375],{},"The code above:",[3377,3378,3379,3393,3405,3408],"ol",{},[3380,3381,3382,3383,3385,3386,2878,3388,3390,3391,1976],"li",{},"Opens and reading a JSON file specified by ",[2082,3384,2911],{},". It expects the file to contain an array of posts, with each post represented as a dictionary. These dictionaries must at least include keys for ",[2082,3387,3123],{},[2082,3389,2717],{},", and ",[2082,3392,3147],{},[3380,3394,3395,3396,3398,3399,3401,3402,3404],{},"Sets up HTTP headers for the request to the Directus API, including authorization via a Bearer token (specified by ",[2082,3397,3065],{},") and setting ",[2082,3400,3074],{}," to ",[2082,3403,3079],{}," to indicate that the payload will be in JSON format.",[3380,3406,3407],{},"For each post in the JSON file, it constructs a payload dictionary that contains the post's title, content, and date.",[3380,3409,3410,3411,3414,3415,3418,3419,3422,3423,3425],{},"Sends a ",[2082,3412,3413],{},"POST"," request to the Directus API to create a new item in the ",[2082,3416,3417],{},"article"," collection (or table) using the prepared payload. The Directus URL and the specific endpoint (",[2082,3420,3421],{},"/items/article",") are constructed using the ",[2082,3424,3181],{}," parameter. Authentication and content type are handled by the previously prepared headers.",[1840,3427,3428,3429,3432],{},"To post the Pages to its collection, your code will be a little different since it has different endpoints. Everything will remain as before except the ",[2082,3430,3431],{},"response"," section:",[2076,3434,3436],{"className":2216,"code":3435,"language":2218,"meta":24,"style":24},"import json\nimport requests\n\ndef import_posts_to_directus(json_file_path, directus_url, api_key):\n    \"\"\"\n    Reads posts from a JSON file and imports them into Directus, including handling featured images.\n    \"\"\"\n    with open(json_file_path, \"r\") as file:\n        posts = json.load(file)\n    headers = {\"Authorization\": f\"Bearer {api_key}\", \"Content-Type\": \"application/json\"}\n    for post in posts:\n        ...\n        # POST the data to the Directus API\n        response = requests.post(\n            f\"{directus_url}/items/Pages\", headers=headers, json=payload\n        )\n        if response.status_code in [200, 201]:\n            print(f\"Post '{post['Title']}' imported successfully.\")\n        else:\n            print(f\"Failed to import post '{post['Title']}': {response.text}\")\n\n...\n",[2082,3437,3438,3444,3450,3454,3462,3466,3470,3474,3492,3504,3538,3548,3553,3557,3565,3594,3599,3617,3641,3647,3679,3683],{"__ignoreMap":24},[2085,3439,3440,3442],{"class":2087,"line":2088},[2085,3441,2226],{"class":2225},[2085,3443,2229],{"class":2091},[2085,3445,3446,3448],{"class":2087,"line":2095},[2085,3447,2226],{"class":2225},[2085,3449,2236],{"class":2091},[2085,3451,3452],{"class":2087,"line":2112},[2085,3453,2269],{"emptyLinePlaceholder":2268},[2085,3455,3456,3458,3460],{"class":2087,"line":2125},[2085,3457,2279],{"class":2225},[2085,3459,2995],{"class":2282},[2085,3461,2998],{"class":2091},[2085,3463,3464],{"class":2087,"line":2138},[2085,3465,3003],{"class":2105},[2085,3467,3468],{"class":2087,"line":2150},[2085,3469,3008],{"class":2105},[2085,3471,3472],{"class":2087,"line":2163},[2085,3473,3003],{"class":2105},[2085,3475,3476,3478,3480,3482,3484,3486,3488,3490],{"class":2087,"line":2175},[2085,3477,2337],{"class":2225},[2085,3479,2340],{"class":2098},[2085,3481,2659],{"class":2091},[2085,3483,2662],{"class":2105},[2085,3485,2349],{"class":2091},[2085,3487,2352],{"class":2225},[2085,3489,2356],{"class":2355},[2085,3491,2359],{"class":2091},[2085,3493,3494,3496,3498,3500,3502],{"class":2087,"line":2186},[2085,3495,3035],{"class":2091},[2085,3497,2257],{"class":2225},[2085,3499,2680],{"class":2091},[2085,3501,2683],{"class":2355},[2085,3503,2479],{"class":2091},[2085,3505,3506,3508,3510,3512,3514,3516,3518,3520,3522,3524,3526,3528,3530,3532,3534,3536],{"class":2087,"line":2294},[2085,3507,2374],{"class":2091},[2085,3509,2257],{"class":2225},[2085,3511,2379],{"class":2091},[2085,3513,2382],{"class":2105},[2085,3515,2102],{"class":2091},[2085,3517,2461],{"class":2225},[2085,3519,3060],{"class":2105},[2085,3521,2467],{"class":2098},[2085,3523,3065],{"class":2091},[2085,3525,2473],{"class":2098},[2085,3527,2476],{"class":2105},[2085,3529,2878],{"class":2091},[2085,3531,3074],{"class":2105},[2085,3533,2102],{"class":2091},[2085,3535,3079],{"class":2105},[2085,3537,2390],{"class":2091},[2085,3539,3540,3542,3544,3546],{"class":2087,"line":2300},[2085,3541,3086],{"class":2225},[2085,3543,2698],{"class":2091},[2085,3545,2701],{"class":2225},[2085,3547,3093],{"class":2091},[2085,3549,3550],{"class":2087,"line":2309},[2085,3551,3552],{"class":2098},"        ...\n",[2085,3554,3555],{"class":2087,"line":2320},[2085,3556,3159],{"class":2248},[2085,3558,3559,3561,3563],{"class":2087,"line":2334},[2085,3560,3164],{"class":2091},[2085,3562,2257],{"class":2225},[2085,3564,3169],{"class":2091},[2085,3566,3567,3569,3571,3573,3575,3577,3580,3582,3584,3586,3588,3590,3592],{"class":2087,"line":2362},[2085,3568,3174],{"class":2225},[2085,3570,2476],{"class":2105},[2085,3572,2467],{"class":2098},[2085,3574,3181],{"class":2091},[2085,3576,2473],{"class":2098},[2085,3578,3579],{"class":2105},"/items/Pages\"",[2085,3581,2878],{"class":2091},[2085,3583,2501],{"class":2355},[2085,3585,2257],{"class":2225},[2085,3587,3195],{"class":2091},[2085,3589,2080],{"class":2355},[2085,3591,2257],{"class":2225},[2085,3593,3202],{"class":2091},[2085,3595,3596],{"class":2087,"line":2371},[2085,3597,3598],{"class":2091},"        )\n",[2085,3600,3601,3603,3605,3607,3609,3611,3613,3615],{"class":2087,"line":2393},[2085,3602,3215],{"class":2225},[2085,3604,3218],{"class":2091},[2085,3606,2701],{"class":2225},[2085,3608,3223],{"class":2091},[2085,3610,3226],{"class":2098},[2085,3612,2878],{"class":2091},[2085,3614,3231],{"class":2098},[2085,3616,3234],{"class":2091},[2085,3618,3619,3621,3623,3625,3627,3629,3631,3633,3635,3637,3639],{"class":2087,"line":2404},[2085,3620,3239],{"class":2098},[2085,3622,2458],{"class":2091},[2085,3624,2461],{"class":2225},[2085,3626,3246],{"class":2105},[2085,3628,2467],{"class":2098},[2085,3630,3251],{"class":2091},[2085,3632,3254],{"class":2105},[2085,3634,3257],{"class":2091},[2085,3636,2473],{"class":2098},[2085,3638,3262],{"class":2105},[2085,3640,2479],{"class":2091},[2085,3642,3643,3645],{"class":2087,"line":2418},[2085,3644,3269],{"class":2225},[2085,3646,2359],{"class":2091},[2085,3648,3649,3651,3653,3655,3657,3659,3661,3663,3665,3667,3669,3671,3673,3675,3677],{"class":2087,"line":2427},[2085,3650,3239],{"class":2098},[2085,3652,2458],{"class":2091},[2085,3654,2461],{"class":2225},[2085,3656,3282],{"class":2105},[2085,3658,2467],{"class":2098},[2085,3660,3251],{"class":2091},[2085,3662,3254],{"class":2105},[2085,3664,3257],{"class":2091},[2085,3666,2473],{"class":2098},[2085,3668,3295],{"class":2105},[2085,3670,2467],{"class":2098},[2085,3672,3300],{"class":2091},[2085,3674,2473],{"class":2098},[2085,3676,2476],{"class":2105},[2085,3678,2479],{"class":2091},[2085,3680,3681],{"class":2087,"line":2436},[2085,3682,2269],{"emptyLinePlaceholder":2268},[2085,3684,3685],{"class":2087,"line":2442},[2085,3686,3687],{"class":2098},"...\n",[1840,3689,3690],{},"Now run with the following command:",[2076,3692,3694],{"className":2945,"code":3693,"language":2947,"meta":24,"style":24},"python directus.py\n",[2082,3695,3696],{"__ignoreMap":24},[2085,3697,3698,3700],{"class":2087,"line":2088},[2085,3699,2218],{"class":2282},[2085,3701,3702],{"class":2105}," directus.py\n",[1840,3704,3705],{},"After the code is complete you should be able to see your items on Directus.",[1840,3707,3708],{},[1992,3709],{"alt":3710,"src":3711},"Items on Directus","/img/1f9d38a1-e7e1-42f3-9589-02f48eaadbd1.webp",[1844,3713,3715],{"id":3714},"testing-and-validation","Testing and Validation",[1840,3717,3718],{},"Because you are moving from one platform to another, you might have some text formatting not appearing right. It’s unlikely but possible so look through the imported content in Directus to ensure all data has been accurately migrated and maintains its formatting.",[1844,3720,3722],{"id":3721},"summary","Summary",[1840,3724,3725],{},"Preparing a detailed migration plan, and carefully executing the data migration, organizations can leverage the flexibility and performance benefits offered by Directus. You don’t need to compromise on content quality or delivery.",[1840,3727,3728],{},"Hopefully, this process has provided you with an opportunity to rethink and optimize how content is managed, delivered, and experienced across different channels.",[1840,3730,3731,3732,3734,3735,3740],{},"To build on the knowledge you have gotten here you can learn more about ",[1970,3733,1883],{"href":509}," and how it can be use in Directus. This will come in handy for more complex migrations.\nHere is the ",[1970,3736,3739],{"href":3737,"rel":3738},"https://github.com/directus-labs/blog-example-migrating-wordpress-directus",[1974],"code repo"," for this article.",[3742,3743,3744],"style",{},"html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sPrNH, html code.shiki .sPrNH{--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":24,"searchDepth":2088,"depth":2095,"links":3746},[3747,3748,3756,3757,3761,3762,3767,3768],{"id":1846,"depth":2095,"text":1847},{"id":1856,"depth":2095,"text":1857,"children":3749},[3750,3751,3752,3753,3754,3755],{"id":1864,"depth":2112,"text":493},{"id":1870,"depth":2112,"text":498},{"id":1876,"depth":2112,"text":1877},{"id":1883,"depth":2112,"text":508},{"id":1889,"depth":2112,"text":1890},{"id":1896,"depth":2112,"text":1897},{"id":1903,"depth":2095,"text":1904},{"id":1928,"depth":2095,"text":1929,"children":3758},[3759,3760],{"id":1935,"depth":2112,"text":1936},{"id":1998,"depth":2112,"text":1999},{"id":2048,"depth":2095,"text":2049},{"id":2067,"depth":2095,"text":2068,"children":3763},[3764,3765,3766],{"id":2192,"depth":2112,"text":2193},{"id":2631,"depth":2112,"text":2632},{"id":2959,"depth":2112,"text":2960},{"id":3714,"depth":2095,"text":3715},{"id":3721,"depth":2095,"text":3722},"md",{"slug":3771},"migrate-from-wordpress-to-directus","---\nid: 5a282783-0fd8-4a2c-9c4c-47b00c5ad3d1\nslug: migrate-from-wordpress-to-directus\ntitle: Migrate from WordPress to Directus\ntechnologies:\n  - wordpress\nauthors:\n  - name: Muhammed Ali\n    title: Guest Author\ndescription: Learn how to migrate posts and images to Directus, with tips on plugins.\n---\n\nIf you are considering transitioning your content management system from WordPress to Directus, this tutorial is for you. By the end, you will understand the process in migrating content, data, and other functionality from WordPress to Directus.\n\n## Understanding the Differences\n\nWordPress is often used as an integrated CMS, meaning it tightly couples content management with presentation. This approach simplifies many tasks but can limit flexibility and performance.\n\nDirectus on the other hand, being a headless CMS, separates the content repository from the presentation layer, offering freedom to use any frontend technology while managing content through a REST or GraphQL API. This separation implies a paradigm shift in how content is being managed and served.\n\n## Directus Terminology\nHere is some key terminology you will come across while following this article or while trying to migrate your WordPress project to Directus:\n\n### Collections\nCollections in Directus are similar to tables in a database. They are used to organize and store data of a similar type. For example, you might have a collection for blog posts, another for users, and another for products. Each collection contains fields that define the structure of the data stored within it.\n\n### Fields\nFields are the individual data points within a collection, similar to columns in a database table. Fields define the type of data that can be stored in them, such as text, numbers, dates, or relationships to other collections.\n\n### Items\nItems are the individual records within a collection, similar to rows in a database table. An item is a single unit of data that adheres to the structure defined by the fields in its collection. For instance, in a blog post collection, each blog post would be an item.\n\n### Relationships\nRelationships are connections between items in different collections. Directus allows you to create one-to-one, one-to-many, and many-to-many relationships, enabling complex data structures and interconnections. This may come in handy if you want to create a relational content structure, such as linking authors to their blog posts or products to their categories.\n\n### Roles and Permissions\nDirectus provides a powerful role-based access control system. Roles are assigned to users to define what actions they can perform within the Directus App, and permissions are set at a granular level to control access to collections, fields, and items based on the user’s role. This ensures that users only have access to the content and functionalities relevant to them.\n\n### Directus API (Application Programming Interface)\nDirectus exposes a RESTful API and a GraphQL API, allowing external applications and services to interact with the content stored in Directus programmatically. These APIs make it possible to retrieve, create, update, and delete content dynamically, enabling headless CMS functionalities for any frontend or application.\n\n## Auditing WordPress Plugins\nBefore the migration, audit your WordPress plugins to understand their functionality and the need they fulfill. Unlike WordPress, Directus might not offer direct plugin equivalents, so it is important to understand the **why** behind each plugin being used. Also note that not all plugins need alternatives and the outcomes might be achievable within the Directus' core functionality.\n\nThis understanding will guide you in seeking or developing alternatives that align with Directus's architecture.\n\nStart by making a comprehensive list of all the plugins currently active on your WordPress site. For each plugin, note down what it does. You might have something like **Yoast SEO** for your blog which enhances SEO capabilities, including meta tags, sitemaps, and readability analysis.\n\nDirectus doesn't have a built-in SEO plugin equivalent as a headless system - it is down to your application to implement features based on data held in Directus. For example, you can manage SEO metadata by creating custom fields in your collections for titles, meta descriptions, and other SEO-related information. You might also develop or use existing extensions to generate sitemaps.\n\n## Migrating Content From WordPress\nThis transition requires a systematic approach to ensure that all data is accurately transferred and that the new system is configured to meet your specific needs. In the following sections, you will export your posts and pages from WordPress. We will then use a Python script to import the data into Directus.\n\n### Exporting WordPress Data\nStart by exporting your WordPress data. Here it is assumed you already have a Wordpress site.\n\nWordPress offers a built-in export tool that generates an XML file of your content. However, for a more comprehensive export, especially for custom post types and metadata, we will be using a plugin that can export to formats more conducive to manipulation like JSON.\n\nOn your Wordpress Admin, in the **Plugins** tab search for “**WP Import Export Lite”**. Install and activate it.\n\nAfter the installation select “**WP Imp Exp**” on the tab then select “**Post**” and select the format JSON in “**Advanced Options**” dropdown. Now you can download the [JSON file](https://github.com/directus-labs/blog-example-migrating-wordpress-directus/blob/main/WP-data.json).\n\nThe JSON file we will use in this tutorial is a collection of blog posts from a WordPress site, each containing information such as the post ID, title, content, date, and permalink.\n\nYou can use this same step to export the [Pages JSON data](https://github.com/directus-labs/blog-example-migrating-wordpress-directus/blob/main/pages-export.json). This file contains two pages with its title, content, and date it was created.\n\n![JSON export from Wordpress](/img/8640fc5b-8b19-4533-a9cb-4465cc1a8255.webp)\n\n### Designing Your Directus Schema\nBefore importing data into Directus, design your schema in Directus by creating collections (equivalent to WordPress's post types. In the JSON exports Post Type \"post\" and \"page\" ) and fields (similar to WordPress's fields: Title, Content, Date, etc). This step is critical and requires a deep understanding of your content structure to ensure the data is imported correctly into your Directus setup.\n\nIn our case, we have two export with post types \"post\" and \"page\" so in the Directus Data Studio, create a collection with the name “Posts” and \"Pages\".\n\nNow we will create the fields that will hold the data items. If you are using my JSON exports create the following fields:\n\n![Pages fields](/img/285156db-942e-49df-b9d2-ffb9c89bc9ac.webp)\n![Fields for Collection](/img/bb47c0fb-0ca5-4ba2-984a-ba40f9d15cba.webp)\n\n::{callout icon=\"material-symbols:info-outline\"}\n\n*Note that the “Content” field has a Field type of ***WYSIWYG***, the rest are ***Input*** type. we are using ***WYSIWYG*** because the exported data is in raw HTML\n\n::\n\n## Importing Data into Directus\nAfter the JSON file is extracted and the schema is developed on Directus, you can go to your Collections page on Directus admin and you will see a button there to import and export. Just choose export and select the JSON file you downloaded.\n\n![Import in Directus Collection](/img/ec2f9808-5775-45a1-bac8-715095434502.webp)\n\nIf you have images in the post or pages, you won’t be able to access them. With the Directus REST API we will be able to manipulate the JSON to extact the images and save to Directus Files so we can access the files in the post.\n\nTo use the API we need to get the API token at User Directory → Administrator → Admin User → Token. Copy the token and Keep it somewhere, we will use it later.\n\n## Creating Import Scripts\n\nIn this section, we will work on the code to export the JSON data into our Directus fields. We will use Python to develop the script but if you are not familiar with Python don’t worry, I will explain everything and show you how to run the code.\n\nThe files gotten from WordPress have the following keys, but what we will be extracting will be \"Title\", \"Content\", and \"Date\".\n\n```json\n{\n    \"ID\": \"2\",\n    \"Title\": \"Sample Page\",\n    \"Content\": \"...\",\n    \"Excerpt\": \"...\",\n    \"Date\": \"2024-04-08 15:33:50\",\n    \"Post Type\": \"...\",\n    \"Permalink\": \"...\"\n  },\n```\n\n### Uploading Images\n\nAs you notice in the [JSON file](https://github.com/directus-labs/blog-example-migrating-wordpress-directus/blob/main/WP-data.json), the image URLs (e.g directus-test.local:33913\\/wp-content\\/uploads\\/2024\\/04\\/image-1.png) can not be accessed by Directus. All images present in posts must be extracted and saved to Directus.\n\nHere we will develop the function to post each downloaded image to Directus and get the new URL.\nTo start, first, create a file with the name `extract-image.py`. The name is arbitrary.\n\n*Note: The Python file should be in the same directory as the JSON file.*\nWe will start with the code below. Paste it in the file you just created.\n\n```python\nimport json\nimport requests\nimport os\n# Replace with the path to your JSON file\njson_file_path = \"WP-data.json\" # Change this with the Pages JSON file to extract images for pages.\n\n# Simulated function to upload an image to Directus and return the new image URL\ndef upload_to_directus(image_url):\n    # This is where you'd upload the image to Directus using its API.\n    # Below is a simulated Directus URL for demonstration purposes.\n    print(image_url)\n    image_content = requests.get(image_url).content\n    temp_image_path = \"temp_image.jpg\"  # Temporary file path for the downloaded image\n    with open(temp_image_path, \"wb\") as file:\n        file.write(image_content)\n    headers = {\"Authorization\": \"Bearer your-api-token\"}\n    files = {\n        \"file\": open(\n            temp_image_path, \"rb\"\n        )  # Open the temporary file to include in the request\n    }\n    directus_upload_url = \"https://your.directus.app/files\"\n    print(f\"Uploading image to Directus: {directus_upload_url}\")\n    response = requests.post(directus_upload_url, files=files, headers=headers)\n    response_str = response.json()\n    directus_image_id = response_str\\[\"data\"\\][\"id\"]\n    # Cleanup: remove the temporary image file\n    os.remove(temp_image_path)\n    # Construct the Directus image URL from the response\n    directus_image_url = f\"https://your.directus.app/assets/{directus_image_id}\"\n    print(f\"Directus Image URL: {directus_image_url}\")\n    return directus_image_url\n```\nThe function accepts an `image_url`, which is the URL of the image that needs to be uploaded. The script retrieves this image using the `requests.get` method and writes the image content to a temporary local file named \"temp_image.jpg\". After storing the image, the script sends a POST request to upload the image to Directus. This request includes authentication via a Bearer token (your directus token). Once the upload is successful, the function parses the JSON response to extract the new image ID assigned by Directus. It then constructs the URL for the newly upload.\n\nReplace `your-api-token` in the code above with the token you generated earlier. Also, replace `https://your.directus.app` with your Directus app URL.\n\n### Replacing Image URLs\nNow we will start getting the new images URL generated from the code earlier(`upload_to_directus()`). The JSON file is then updated with the new Directus asset URL. Then a new JSON file is saved locally.\nTo do this, paste the following code below the code you have already.\n\n```python\n# Load JSON data from the file\nwith open(json_file_path, \"r\") as file:\n    data = json.load(file)\n# Iterate through each post in the JSON data\nfor post in data:\n    content = post[\"Content\"]\n    # Check if there is an image in the content\n    if '\u003Cimg src=\"' in content:\n        # Extract the image URL\n        start_index = content.index('\u003Cimg src=\"') + 10\n        end_index = content.index('\"', start_index)\n        image_url = content[start_index:end_index]\n        # Upload the image to Directus and get the new URL\n        new_image_url = upload_to_directus(image_url)\n        print(new_image_url)\n        # Replace the old image URL with the new one in the content\n        post[\"Content\"] = content.replace(image_url, new_image_url)\n# Output the modified JSON data to a new file or print it out\noutput_file_path = \"modified_WP-data.json\"\nwith open(output_file_path, \"w\") as file:\n    json.dump(data, file, indent=4)\n# Print a message to indicate completion\nprint(\"The JSON data has been updated with Directus image URLs.\")\n```\n\nThe code above opens and reads a JSON file specified by `json_file_path`. It then loops through `\"Content\"` field.  Within each post's content, the code checks for the presence of an `\u003Cimg>` tag by looking for the substring `'\u003Cimg src=\"'`. If such a substring is found, it means the post contains an image. The code then extracts the URL of this image by locating the substring that starts immediately after `'\u003Cimg src=\"'` and ends at the next double-quote (`\"`).\n\nThe extracted image URL is then passed to a function named `upload_to_directus` (this will be created next) to upload the image to Directus. The function returns `new_image_url` to this loop to replace the old URL in the post's content with this new URL.\n\nAssuming you have Python installed already you can run the code to create the new JSON file.\n```bash\npython extract-image.py\n```\n\n### Uploading Posts\nNow we will build the script to store our posts in our Fields in Directus. Create a new file with the name *directus.py* and paste the following code:\n```python\nimport json\nimport requests\n\ndef import_posts_to_directus(json_file_path, directus_url, api_key):\n    \"\"\"\n    Reads posts from a JSON file and imports them into Directus, including handling featured images.\n    \"\"\"\n    with open(json_file_path, \"r\") as file:\n        posts = json.load(file)\n    headers = {\"Authorization\": f\"Bearer {api_key}\", \"Content-Type\": \"application/json\"}\n    for post in posts:\n        # Extract the first image URL from the content and simulate its upload to Directus\n        # Prepare the payload for Directus\n        payload = {\n            \"Title\": post[\"Title\"],\n            \"Content\": post[\"Content\"],\n            \"Date\": post[\"Date\"],\n        }\n        # POST the data to the Directus API\n        response = requests.post(\n            f\"{directus_url}/items/Posts\", headers=headers, json=payload\n        ) # path for pages is /Pages\n        if response.status_code in [200, 201]:\n            print(f\"Post '{post['Title']}' imported successfully.\")\n        else:\n            print(f\"Failed to import post '{post['Title']}': {response.text}\")\n\n# Example usage\njson_file_path = \"modified_WP-data.json\" # change to modified file to post Pages to Directus\ndirectus_url = \"https://your.directus.app\"\napi_key = \"your-api-token\"\n# Uncomment the line below to run the function with your actual Directus URL and API key\nimport_posts_to_directus(json_file_path, directus_url, api_key)\n```\n::callout{icon=\"material-symbols:info-outline\" title=\"Replace Data\"}\n\nNote: Replace `https://your.directus.app` and `your-api-token` with the appropriate details.\n\n::\nThe code above:\n1. Opens and reading a JSON file specified by `json_file_path`. It expects the file to contain an array of posts, with each post represented as a dictionary. These dictionaries must at least include keys for `\"Title\"`, `\"Content\"`, and `\"Date\"`.\n2. Sets up HTTP headers for the request to the Directus API, including authorization via a Bearer token (specified by `api_key`) and setting `\"Content-Type\"` to `\"application/json\"` to indicate that the payload will be in JSON format.\n3. For each post in the JSON file, it constructs a payload dictionary that contains the post's title, content, and date.\n4. Sends a `POST` request to the Directus API to create a new item in the `article` collection (or table) using the prepared payload. The Directus URL and the specific endpoint (`/items/article`) are constructed using the `directus_url` parameter. Authentication and content type are handled by the previously prepared headers.\n\nTo post the Pages to its collection, your code will be a little different since it has different endpoints. Everything will remain as before except the `response` section:\n\n```python\nimport json\nimport requests\n\ndef import_posts_to_directus(json_file_path, directus_url, api_key):\n    \"\"\"\n    Reads posts from a JSON file and imports them into Directus, including handling featured images.\n    \"\"\"\n    with open(json_file_path, \"r\") as file:\n        posts = json.load(file)\n    headers = {\"Authorization\": f\"Bearer {api_key}\", \"Content-Type\": \"application/json\"}\n    for post in posts:\n        ...\n        # POST the data to the Directus API\n        response = requests.post(\n            f\"{directus_url}/items/Pages\", headers=headers, json=payload\n        )\n        if response.status_code in [200, 201]:\n            print(f\"Post '{post['Title']}' imported successfully.\")\n        else:\n            print(f\"Failed to import post '{post['Title']}': {response.text}\")\n\n...\n```\nNow run with the following command:\n```bash\npython directus.py\n```\nAfter the code is complete you should be able to see your items on Directus.\n\n![Items on Directus](/img/1f9d38a1-e7e1-42f3-9589-02f48eaadbd1.webp)\n\n## Testing and Validation\n\nBecause you are moving from one platform to another, you might have some text formatting not appearing right. It’s unlikely but possible so look through the imported content in Directus to ensure all data has been accurately migrated and maintains its formatting.\n\n## Summary\n\nPreparing a detailed migration plan, and carefully executing the data migration, organizations can leverage the flexibility and performance benefits offered by Directus. You don’t need to compromise on content quality or delivery.\n\nHopefully, this process has provided you with an opportunity to rethink and optimize how content is managed, delivered, and experienced across different channels.\n\nTo build on the knowledge you have gotten here you can learn more about [relationships](/guides/data-model/relationships) and how it can be use in Directus. This will come in handy for more complex migrations.\nHere is the [code repo](https://github.com/directus-labs/blog-example-migrating-wordpress-directus) for this article.\n",{"title":1593,"description":1596},[3775],"wordpress","HIFmOfFxSvH4zssJGraLeMm0_ETmkUqQwaCcXtFGZWo",1775038784078]