Set up the Magento 2 backend
The CMS stores its pages and media through your connector. With the Magento 2 flavour, the PageBuilder module and an admin integration must be in place before content managers can edit pages.
Enabling cms("magento2") in your front-commerce.config.ts is only the
Front-Commerce side of the setup (see
the CMS overview). The Magento 2 backend must also
be configured for the editor and publishing to work.
Register the extension after Magento 2
cms("magento2") reads the Magento 2 connector's services when the server
starts — to resolve content storage and the media library. It must therefore be
registered after magento2() in your extensions array:
export default defineConfig({
extensions: [
magento2({ storesConfig }),
cms("magento2"),
],
// …
});
A Magento 2 connector that is itself correctly configured is a prerequisite — see Set up the Magento 2 extension and its environment variables.
Install the PageBuilder module
Content storage and the media library are served by the
FrontCommerce_PageBuilder Magento 2 module. Install it on your Magento 2
instance and keep it enabled — see
Set up the Magento module.
While the module is disabled, every CMS route returns 404 and the editor and
media library stay unavailable.
Grant the FrontCommerce_PageBuilder::manage ACL
The CMS reaches Magento through its REST API, gated by Magento's ACL. The whole
media API is admin-only: browsing folders, searching, uploading, creating,
renaming, and deleting all go through an admin OAuth integration (System >
Extensions > Integrations) whose resource access must include the
FrontCommerce_PageBuilder::manage resource.
Without this resource the media library is unreachable. Who may edit on the storefront is a separate, Front-Commerce-side decision driven by contribution mode.
Media storage
Media is stored in your Magento instance, under the pagebuilder/ media
subtree, and referenced by its Magento /media/ URL — unlike the filesystem
backend, binaries are not proxied through Front-Commerce's /cms/media/<id>
route. For local development against an instance with no media set up, you can
force the built-in filesystem backend instead:
FRONT_COMMERCE_CMS_MEDIA_DANGEROUSLY_FORCE_FILESYSTEM=true
As its name suggests, this is a development-only escape hatch: it ignores the connector's media backend entirely and stores files on the local filesystem.
Limitations
Renaming a file is available on Magento 2: it edits the asset title, so the file's id and URL stay stable. Renaming a folder is not available.
Next
- Using the CMS — edit pages with the in-context Page Editor.