Note: This tutorial series is intended for advanced users. Advanced understanding of coding in PHP and JavaScript is required.
What's A Divi Extension?
A Divi Extension is a WordPress plugin that customizes Divi. For example, an extension can add custom modules to the Divi Builder or add new options to the theme — the possibilities are almost endless!
All Divi Extensions consist of some PHP code. Depending on their purpose, they can also consist of some JavaScript, HTML, and CSS. In this tutorial, you'll learn how to start a new Divi Extension.
Development Environment
Before creating a Divi Extension, you must ensure you have the proper environment set on your local system. The requirements are:
There's a guide if you don't have a development environment setup.
Create Divi Extension
Create Divi Extension is a command line utility that streamlines the process of creating and maintaining Divi Extensions.
Open a terminal and change to your WordPress plugins directory. If you followed our tutorial to set up your development environment, you should already have a command prompt inside your docker container. If so, you can change to the plugins directory using the following command:
cd wp-content/plugins
Now, run this command to create your extension:
npx create-divi-extension my-extension
You'll be prompted to provide some details about your extension, and then you'll be able to find it inside your WordPress plugins directory!
Inside your new extension's directory, you'll find an initial project structure that provides a minimal, fully functional Divi Extension waiting for you to make it your own.
What’s Next?
Now that you’ve created your Divi Extension, you’ll probably want to learn How To Create A Divi Builder Module.