Overview
In this chapter, weβll explore how our team works within the WordPress ecosystem. The goal is to give you an understanding of our particular approach, from the tools we use to the way we organize our codebase.
We begin by developing our own custom WordPress theme. This theme usually starts from a shared starter template that we adjust to each projectβs needs. On the frontend, we rely on bundlers like Webpack or Vite to handle asset management, optimize performance, and streamline our development workflow.
For backend operations, we use PHP classes as blueprints. These classes help maintain clean, modular code and standardize how we implement features or data manipulation within WordPress. We also leverage well-known plugins, such as Advanced Custom Fields (ACF) for flexible content management, Yoast for SEO optimization, and All in One for additional site tools.
Finally, when itβs time to launch a project, we use Gulp to automate our deployment process. Gulp manages tasks like minifying files, optimizing images, and preparing all assets so the final product runs smoothly on production servers.
By the end of this chapter, you should have a clear picture of how we build, structure, and deploy WordPress projects in a way that keeps our workflow organized, efficient, and scalable.
This is how tipically a wordpress theme looks like, you can see more @ Terra Starter kit
π¦ {client-acronim}-wp-theme/βββ π¦ components/ // All PHP components live here (e.g. buttons, cards)βββ π¦ config/ // Config files (SFTP deploy, Vite settings)βββ π¦ documentation/ // Project docs: checklist, performance tips, etc.βββ π¦ flexible/ // Hero sections and modules used on the siteβββ π¦ functions/β βββ default/ // Terra's default framework (reusable functions)β βββ project/ // Custom functions for this specific projectβββ π¦ public/ // Files publicly accessible (e.g. favicon, robots.txt)βββ π¦ src/β βββ π¦ js/ // JavaScript codeβ βββ π¦ scss/ // SCSS stylesheetsβββ .env.local // Local environment variablesβββ .env.production // Production environment variablesβββ .env.virtual // Virtual/staging environment variablesβββ .gitignore // Files and folders Git should ignoreβββ 404.php // Custom 404 error pageβββ footer.php // Global footer templateβββ functions.php // Loads theme features and functionsβββ gulpfile.js // Used for deploying the siteβββ header.php // Global header templateβββ package.json // Project dependencies and scriptsβββ index.php // Main entry point for WordPressβββ style.scss // Main global SCSS fileβββ vite.config.js // Vite build tool config