Use the TiDB Serverless Tier cluster as the database for WordPress.
- TiDB Cloud Serverless Tier
- Docker
- Docker Compose (If you have installed Docker Desktop, Docker Compose should already be included)
In the Ubuntu, you can use this script to install the docker and docker compose:
sudo sh install.sh-
Clone submodule
git submodule update --init --recursive. -
Run
cp .env.example .env. -
Change the properties in
.envto match your TiDB Serverless Tier cluster information.- In Cluster Overview of TiDB Cloud Web Console, click Connect button on the top right of the screen.
- Select General in the Connect With dropdown list.
- Copy and paste the connection infomation into the
.envfile. By default, your TiDB Serverless comes with atestDB. You could change the valueTIDB_DB_NAMEto the DB you've created in your TiDB Serverless.
-
Run
docker compose up -d. -
That's it! You can now initialize the WordPress site by going to the localhost page.
To stop and clean up the Docker containers, run docker compose down.