📖 Documentation Language: Русский | English (current)
A modern WordPress block theme for gaming stores, built with full-site editing support and custom React-based blocks.
- Block Theme: Modern FSE (Full Site Editing) theme optimized for gaming stores
- Custom Blocks: React-based Gutenberg blocks for enhanced functionality
- Core Plugin: Essential functionality and customizations
- MU Plugin: Must-use plugin for site-wide features
- Automated Deployment: GitHub Actions CI/CD pipeline
game-store/
├── .github/workflows/
│ └── CICD.yml # Automated deployment pipeline
├── docs/
│ └── ru/ # Russian documentation
├── mu-plugins/
│ └── gamestore-general.php # Must-use plugin
├── plugins/
│ ├── blocks-gamestore/ # Custom React blocks
│ └── core-gamestore/ # Core functionality plugin
├── themes/
│ └── game-store/ # Main block theme
├── docker-compose.yml # Local development environment
├── wp-version-control.cfg # WordPress version management
└── README.md # This file
Purpose: WordPress block theme with Full Site Editing (FSE) support
Key files and directories:
themes/game-store/style.css- main theme styles and meta informationthemes/game-store/theme.json- theme configuration, color palette, typographythemes/game-store/templates/- HTML templates for different page typesthemes/game-store/patterns/- ready-made block patterns for quick insertionthemes/game-store/parts/- theme parts (header, footer)
Why needed: Provides the visual foundation of the site, defines the design system, colors, fonts, and overall appearance. FSE allows editing layouts through WordPress interface without code.
Purpose: React components for creating specialized Gutenberg blocks
Structure:
plugins/blocks-gamestore/src/- source code of React-based blocksplugins/blocks-gamestore/build/- compiled blocks for productionplugins/blocks-gamestore/package.json- dependencies and build scripts
Why needed: Extends standard WordPress blocks with gaming store-specific elements (game cards, galleries, ratings, etc.). React provides interactivity and modern UX.
Purpose: Centralized logic and site functionality
Contains:
- Custom post types (for games, reviews)
- API integrations (payment systems, game catalogs)
- Administrative settings
- WordPress hooks and filters
Why needed: Separates business logic from presentation, ensures function portability between themes, manages gaming store-specific data.
Purpose: Critical functionality that must always be active
Location: mu-plugins/ (Must Use plugins) - automatically activated
What it does:
- Basic security settings
- Essential redirects and rewrites
- System hooks that cannot be disabled
- Project constants initialization
Why separate folder: MU-plugins cannot be deactivated through WordPress admin, which is critical for site stability. They load before regular plugins and are always active.
- Node.js 18+
- Docker & Docker Compose
- Git
-
Clone the repository
git clone https://github.com/GKVSO/GameStore.git> cd game-store
-
Start development environment
docker-compose up -d
-
Build custom blocks
cd plugins/blocks-gamestore npm install npm run start
# Development mode with hot reload
npm run start
# Production build
npm run build
# Code formatting
npm run format
# Linting
npm run lint:js
npm run lint:css
# Create plugin zip
npm run plugin-zipThe automated deployment requires the following secrets to be configured in your GitHub repository:
| Secret Name | Description | Example |
|---|---|---|
SERVER_HOST |
Server IP address or domain | 192.168.1.100 or example.com |
SERVER_USER |
SSH username | ubuntu |
SERVER_SSH_PASSWORD |
SSH password | your-secure-password |
SERVER_PORT |
SSH port (usually 22) | 22 |
SERVER_DEV_TARGET_PATH |
Development deployment path | /var/www/dev.example.com |
SERVER_PROD_TARGET_PATH |
Production deployment path | /var/www/example.com |
- Go to your GitHub repository
- Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Add each secret with its corresponding value
The wp-version-control.cfg file contains the WordPress download URL:
https://wordpress.org/latest.zip
This ensures consistent WordPress versions across deployments.
- Automatic Development Deployment: Push to
devbranch - Automatic Production Deployment: Create a release
- Manual Deployment: Through GitHub Actions web interface with environment and WordPress version selection
- Go to your GitHub repository
- Open the Actions tab
- Select the GameStore Deploy workflow
- Click Run workflow
- Configure parameters:
- Environment:
devorprod - WordPress version: leave empty to use version from
wp-version-control.cfgor specify exact version (e.g.,6.3.2)
- Environment:
-
Preparation
- Download WordPress from
wp-version-control.cfg - Package plugins, themes, and mu-plugins
- Download WordPress from
-
File Transfer
- Upload WordPress and content packages to server
- Enable maintenance mode
-
WordPress Core Update
- Backup existing configuration
- Replace WordPress core files (preserving
wp-config.php) - Update admin and includes directories
-
Content Update
- Update plugins, themes, and mu-plugins
- Preserve existing uploads and configurations
-
Cleanup
- Disable maintenance mode
- Remove temporary files
- Verify deployment
- Zero-downtime deployment: Maintenance mode prevents broken states
- Complete WordPress Core update: Unlike standard deployments that only update themes and plugins, this approach downloads and replaces the entire WordPress Core. This is critical for large-scale projects where strict version control is essential
- WordPress version control: The
wp-version-control.cfgfile allows locking to a specific WordPress version across all environments, eliminating compatibility issues and ensuring stability - Selective updates: Preserves
wp-config.phpand uploads directory with media files - Automatic cleanup: Removes temporary files post-deployment
- Environment-specific paths: Different paths for dev/prod
-
Create new block
cd plugins/blocks-gamestore npx @wordpress/create-block new-block-name -
Development workflow
npm run start # Start development server # Edit files in src/ # Browser auto-refreshes
-
Production build
npm run build
- Edit template files in
themes/game-store/templates/ - Modify patterns in
themes/game-store/patterns/ - Update styles in
themes/game-store/style.css - Configure theme in
themes/game-store/theme.json
- Fork the repository
- Create a feature branch
- Make changes following WordPress coding standards
- Test locally with Docker
- Submit a pull request
This project is licensed under the GPL v2 or later - see the LICENSE file for details.
GKVSO
- Telegram: @GKVSO
📖 Documentation: Русская версия | English (current)