Skip to content

GoldenOwlAsia/go-wordpress-template

Repository files navigation

WordPress Boilerplate

This is a boilerplate WordPress project that can be used as a starting point for your WordPress development. It includes a basic file structure, essential configuration files, and some commonly used tools.

Table of Contents

Features

  • Clean and organized file structure.
  • Basic configuration files included.
  • Essential WordPress files pre-configured.
  • Placeholder themes and plugins for quick development setup.
  • Gitignore and editorconfig for consistency.

Prerequisites

Before starting the setup process, make sure you have the following installed on your system:

Getting Started

  1. Configuration:

    Copy the example environment into .env

    cp .env.example .env
  2. Installation:

    Open a terminal and cd to the folder in which docker-compose.yml is saved and run:

    docker-compose up -d --build

    This command will download the necessary Docker images and start the containers in detached mode.

    Access WordPress in your browser by navigating to http://localhost:8000.

    Complete the WordPress setup by providing the requested information.

  3. Stopping WordPress:

    To stop the WordPress containers, run:

    docker-compose down

    This will stop and remove the containers. The data in the database will persist, and you can start the containers again with docker-compose up -d when needed.

Usage

  • Develop your WordPress themes and plugins in the wp-content directory.
  • Use the wp-cli tool for common WordPress tasks.
  • Customize the project based on your specific requirements.

Configuration

  • Customize wp-config.php for WordPress configuration.
  • Adjust .gitignore for files and directories to be ignored by version control.
  • Modify .editorconfig for consistent code formatting in supported editors.

Folder Structure

/wp-root-path
│
├── wp-content/
│ ├── plugins/
│ ├── themes/
│
├── wp-includes/
├── wp-admin/
├── ...
│
├── wp-config.php
├── index.php
├── ...
│
├── .gitignore
├── .editorconfig
├── ...

Core

  • Documentation - Just a main docs of Wordpress
  • Wordpress Hooks Reference - WordPress includes many predefined hooks. Using an action or a filter, you may connect to one of them or create your own hooks.
  • WordPress Coding Standards - The purpose of the WordPress Coding Standards is to create a baseline for collaboration and review within various aspects of the WordPress open source project and community, from core code to themes to plugins. (Must be apply on project)
  • The Customizer API - The Customizer is a framework for live-previewing any change to WordPress. It provides a simple and consistent interface for users to customize various aspects of their theme and their site, from colors and layouts to widgets, menus, and more. Themes and plugins alike can add custom options to the Customizer. The Customizer is the canonical way to add options to your theme.

Gutenberg

The WordPress default editor, replacing the previous classic editor. It enables users to create and design content using individual blocks for text, images, videos, and other site elements on a drag-and-drop interface – providing enhanced flexibility and design capabilities

Recommended Plugins

SEO

  • Redirection - Redirection is a WordPress plugin to manage 301 redirections and keep track of 404 errors without requiring knowledge of Apache .htaccess files.
  • Yoast SEO - Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using Yoast SEO plugin.

Dev Plugins

  • Query Monitor - Query Monitor is the developer tools panel for WordPress. It enables debugging of database queries, PHP errors, hooks and actions, block editor blocks, enqueued scripts and stylesheets, HTTP API calls, and more.
  • Debug Bar - Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.

Installer and Generators

  • FakerPress - FakerPress is a clean way to generate fake and dummy content to your WordPress, great for developers who need testing

Performance

  • WP-Optimize - Simple but effective plugin allows you to extensively clean up your WordPress database and optimize it without doing manual queries.
  • Autoptimize - Autoptimize is an effective performance tool that speeds up a website by optimizing JS, CSS, images (incl. lazy-load), HTML and Google Fonts, asyncing JS, removing emoji cruft and more.
  • WP Rocket - WP Rocket is much more than just a WordPress caching plugin. It's the most powerful solution to boost your loading time, improve your PageSpeed performance

Releases

No releases published

Packages

No packages published