Prior to proceeding, ensure that Docker is operational to prevent any failures.
The main file structure includes essential directories and files that are crucial for managing the WordPress theme development workflow. Here is a breakdown of the key components to highlight:
src/theme/
src/plugins/
src/assets/css/
src/assets/fonts/
src/assets/img/
src/assets/js/
These directories play a crucial role in organizing and managing the various assets and components of the WordPress theme. Additionally, the repoository includes configuration files, build files, distribution files, and Docker-related files to streamline the development process effectively.
Before starting, customize your template name by renaming .env_example
to .env
and replace the variable name.
# If you want to connect to BrowserSync on a different port. Default: 3010
PROXY_PORT=3010
# Theme name. Default: "wordpressify"
THEME_NAME=wordpressify
To initiate the development server, use the following command:
npm run start
If NodeJS is not installed locally, utilize Docker commands:
docker compose up
Ensure Docker is running to avoid any command failures.
To rebuild the WordPressify environment with a fresh installation and clean database, run:
npm run rebuild
For non-local NodeJS installations, use Docker commands:
docker compose down -v && docker compose build
For adding or building WordPress plugins, navigate to the directory:
src/plugins
To generate distribution files, execute:
npm run export
For non-local NodeJS setups, use Docker commands:
docker compose run --rm nodejs npm run prod
The template will be saved as a zip file in:
dist/wordpressify.zip
You are now equipped to delve into your WordPress development journey. Happy coding!