ristekusdi/wp-template

The skeleton application for the WordPress template.

v1.1.0 2025-08-05 07:24 UTC

This package is auto-updated.

Last update: 2025-08-05 07:25:09 UTC


README

A scaffolding template to develop WordPress site with better security.

How to run?

Important

You must have install wp-cli in order to make this scaffolding work. You may use curl or [Composer](composer global require wp-cli/wp-cli-bundle) or Homebrew to install wp-cli.

  1. Create new project using Composer.
composer create-project ristekusdi/wp-template <project-name>
  1. Change directory to the project.
cd <project-name>
  1. Create env variable by copy the .env.example file.
cp .env.example .env

Then adjust values for:

  • DB_HOST
  • DB_NAME
  • DB_USER
  • DB_PASSWORD
  • AUTH_KEY
  • SECURE_AUTH_KEY
  • LOGGED_IN_KEY
  • NONCE_KEY
  • AUTH_SALT
  • SECURE_AUTH_SALT
  • LOGGED_IN_SALT
  • NONCE_SALT
  • WP_CACHE_KEY_SALT
  1. Install composer dependencies.
composer install
  1. Install WordPress with wp command.

Note: Replace DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, SITE_URL, and SITE_TITLE with actual value.

wp core download
wp db check 2>/dev/null || wp db create
wp core install --url=<SITE_URL> --title=<SITE_TITLE> --admin_user=admin --admin_password=password --admin_email=no-reply@unud.ac.id
wp server

Happy programming.

How to deploy?

The deployment use Deployer with GitLab CI/CD. You need to provide:

  • A user named deployer. This user used for deployment CI/CD.
  • SSH Private Key and Known Hosts. Please visit ristekusdi/deploy-web-app to learn how to create it.
  • Replace <ip-address-or-hostname> value in deploy.php with IP address server.
  • Replace <example.com> value in deploy.php with your domain name.