- Install Docker.
- Run
docker compose up
to start all needed containers. You can stop them with Ctrl+C.- Alternatively, you can run
docker compose up -d
to start them in the detached mode anddocker compose stop
to stop them.
- Alternatively, you can run
- Run
./docker-provision.sh
for the initial WordPress setup.
You should be able to access the WP admin panel now: http://wordpress.localhost/wp-admin
The default username/password is admin/admin.
Once signed in you'll need to go to your local Memberful site, and setup a WordPress integration
(Memberful Admin -> Settings -> Integrate -> I'm using WordPress
), then copy and paste the activation
code into the WordPress admin panel (WP admin -> Settings -> Memberful). Submit the form and then
WordPress should be connected to your local vm, ready for development!
Run docker compose down
to remove the Docker containers and follow the previous section to start them again.
If you need to update the Docker images, you can run docker compose pull
to pull the latest images. Then you can run docker compose up
to start the updated containers.
The command-line interface from WordPress can be useful in debugging plugin issues and reading/editing the database.
An easy way to work with the CLI from outside the container is to take the wp()
bash function from the provision script:
wp() {
docker run -it --rm \
--volumes-from memberful-wp-wordpress-1 \
--network container:memberful-wp-wordpress-1 \
--env-file envfile \
--user 33:33 \
wordpress:cli wp $@
}
If your volume and container names match you can take the above function, copy/paste it into your command prompt, and then run wp
commands as if WordPress was installed directly (outside a container).
For example, to see all the metadata for user 2 directly from the db:
wp user meta list 2
The plugin is versioned using Semantic Versioning.
The gist of it is as follows:
+---+ Increment this number on every normal release
| that adds features and is not intended to
v break/remove existing features.
1.12.0
^ ^
| |
+----------+ +----------+ Change this number if you need to
+ release an update that ONLY includes
Increment this number bug fixes.
if you change compatibility
or stop supprting an old
version of WordPress.
It's worth noting that the version number is not a decimal number, and each
segment is a separate number. i.e. 1.12.0
> 1.11.0
.
Make sure you're added as a committer in WordPress.
The release script retrieves the WordPress committer username from the svn
server config file.
To setup, enter ~/.subversion/servers
and add a group with a URL match for WP's server URL, as well as your WP username, like so:
[groups]
memberful-wp = plugins.svn.wordpress.org
[memberful-wp]
username = YOUR_WP_COMMITTER_USERNAME
Any svn
actions to plugins.svn.wordpress.org
that require authentication will then use the username from the config file.
- Make sure that every change has an appropriate changelog entry in
readme.txt
. - Set correct version number in
readme.txt
andmemberful-wp.php
. - Ensure that all changes are ready in the
main
branch. - Run
./release.sh
. - A copy of the wordpress.org svn repo will be downloaded into
/tmp
, the version you tagged will be copied across to thetags
andtrunk
directories, (sans development files) and then committed to the svn repo, causing wordpress.org to release a new version. - The script will remove the
svn
directory.
From time to time we need to update WordPress SVN without releasing a new plugin
version. For example we need to do this after updating "Tested up to" in
readme.txt
. To do this simply follow the release instructions above without
updating the plugin version.
Very occasionally we may need to update the assets for the WordPress plugin. This includes the banner image, the icon, and the screenshots. To do this:
- Update the assets in the
assets
directory. - Run
./release.sh --assets
.
- Revert your changes.
- Release a new version with a version number greater than the current one, e.g. if the current version is
1.15.0
then release1.16.0
.