This is a skelton of a project that allows you to easily set up VS Code to begin doing Wordpress plugin development immediately.
- You must have Docker and Docker compose installed
- You need VS Code installed and the Remote Containers Extension installed in it
-
Clone this repo into onto your computer
-
Open the folder in VS Code
-
Hit
Ctrl+Shift+P
orF1
to show the command palette -
Type
Remote-Containers: Reopen in Container
-
Write your plugin in the
my-new-plugin
folder -
To deploy the plugin, hit
Ctrl+Shift+P
to show the command palette and typeTasks: RunTask
-
Click enter (
Deploy Plugin
should be selected) -
You should see the plugin deployed. You will ned to hit activate for it to have any effect.
- The first time you open your wordpress instance you will need to go through the installation process. You only need to do this once unless you clear your my sql db volume.
- I would suggest renaming the folder from
my-new-plugin
to something more appropriate to your plugin. Once you do that, you will need to update tasks.json with the new folder name
- Sometimes the compose gets in a bad state after making changes to the file. You may need to delete the containers manually and prune your volumes to get it to start correctly again.