• Blog
  • Documentation
  • Courses
  • Changelog
  • AI Starters
  • UI Kit
  • FAQ
  • Supamode
    New
  • Pricing

Launch your next SaaS in record time with Makerkit, a React SaaS Boilerplate for Next.js and Supabase.

Makerkit is a product of Makerkit Pte Ltd (registered in the Republic of Singapore)Company Registration No: 202407149CFor support or inquiries, please contact us

About
  • FAQ
  • Contact
  • Verify your Discord
  • Consultation
  • Open Source
  • Become an Affiliate
Product
  • Documentation
  • Blog
  • Changelog
  • UI Blocks
  • Figma UI Kit
  • AI SaaS Starters
License
  • Activate License
  • Upgrade License
  • Invite Member
Legal
  • Terms of License
    • CMS
    • Keystatic
    • Wordpress
    • CMS API
    • Creating your own CMS client | React Router Supabase SaaS Kit

Using Wordpress in Makerkit | React Router Supabase Kit

Wordpress is a popular CMS that you can use with Makerkit. Learn how to set it up and use it in your project.

The Wordpress implementation is used when the host app's environment variable is set as:

bash
CMS_CLIENT=wordpress

Additionally, please set the following environment variables:

bash
WORDPRESS_API_URL=http://localhost:8080

For development purposes, we ship a Docker container that runs a Wordpress instance. To start the container, run:

bash
docker-compose up

or

bash
pnpm run start

from this package's root directory.

The credentials for the Wordpress instance are:

bash
WORDPRESS_DB_HOST=db
WORDPRESS_DB_USER=wordpress
WORDPRESS_DB_PASSWORD=wordpress
WORDPRESS_DB_NAME=wordpress

You will be asked to set up the Wordpress instance when you visit http://localhost:8080 for the first time.

Note for Wordpress REST API

To make the REST API in your Wordpress instance work, please change the permalink structure to /%post%/ from the Wordpress admin panel.

Blog

To include Blog Posts from Wordpress - please create a post with category named blog and add posts to it.

Documentation

To include Documentation from Wordpress - please create a page with category named documentation and add pages to it.

This **involves enabling categories for pages. To do this, add the following code to your theme's functions.php file:

php
function add_categories_to_pages() {
register_taxonomy_for_object_type('category', 'page');
}
add_action('init', 'add_categories_to_pages');

Please refer to wp-content/themes/twentytwentyfour/functions.php for an example of a theme that includes this code.

Language Filtering

To make the language filtering work, please add a tag with the language name to the post. For example, if you have a post in English, add the tag en to it, and if you have a post in German, add the tag de to it.

On this page
  1. Note for Wordpress REST API
    1. Blog
      1. Documentation
        1. Language Filtering