WordPress Plugin for Tutor
This is a Tutor plugin that provides complete WordPress integration with your Open edX instance. It includes:
- Full WordPress installation and management
- Integration with the Open edX Commerce WordPress Plugin
If you need help installing the WordPress plugin, check out this installation guide.
- Installation of Tutor version >= 15.0.0
- MySQL database (can use the same one as Open edX)
Ensure you are using Tutor v15+ (Olive onwards). First, install the plugin by running:
pip install -U tutor-contrib-wordpress
Enable the plugin and run the launch command:
tutor plugins enable wordpress
tutor dev|local|k8s launch
Alternatively, if you already have a running Open edX instance, just run the necessary jobs:
tutor dev|local|k8s do init --limit=wordpress
tutor dev|local|k8s start wordpress
The plugin automatically installs WordPress with the Open edX Commerce and Woocommerce plugins. Inside your WordPress admin panel, go to Settings -> Open edX Sync plugin, and configure:
- Open edX Domain
- Client ID
- Client Secret
To verify the connection, click on "Generate JWT Token". If the process is successful, a new token will be generated.
You can retrieve these configuration values by running:
tutor dev|local|k8s do wordpress config
This command will output the current configurations, including the Client ID, Client Secret, Open edX Domain, and WordPress Domain. Here is an example of the output:
===============================================
WordPress Plugin Configurations
===============================================
Client ID: vvpTamiepPwjZhr0uOQGr5PhYBzp2hQw
Client ID (dev): MlbXk1V3wB7nWPAAyLF3McyfBBMqExa4
Client Secret: MdrgbtU8Q94He3gejF6Zf5MDookoeozO
Open edX Domain: http://local.edly.io:8000
Wordpress Domain: http://site.local.edly.io:8080
The plugin supports the following configuration variables:
WORDPRESS_VERSION
: Plugin versionWORDPRESS_HOST
: WordPress site hostnameWORDPRESS_PORT
: WordPress port (default: 8080)WORDPRESS_DOCKER_IMAGE
: Docker image for WordPressWORDPRESS_OPENEDX_PLUGIN
: URL to the Open edX Commerce pluginWORDPRESS_WOOCOMMERCE_PLUGIN
: (default: "https://downloads.wordpress.org/plugin/woocommerce.9.4.2.zip") The WooCommerce plugin zip file URL. You can specify a different version if needed.WORDPRESS_OFFICIAL_IMAGE
: (default: "wordpress:6.7.1-php8.1") The official WordPress Docker image used as the base for building the plugin's custom image. This image includes PHP and Apache server. You can specify a different version or PHP variant if needed.
WORDPRESS_MYSQL_HOST
: MySQL hostWORDPRESS_MYSQL_PORT
: MySQL portWORDPRESS_MYSQL_DATABASE
: Database name (default: wordpress)WORDPRESS_MYSQL_USERNAME
: Database usernameWORDPRESS_MYSQL_PASSWORD
: Database password (auto-generated)WORDPRESS_TABLE_PREFIX
: Table prefix (default:wp_
)
WORDPRESS_DATA_VOLUME_SIZE
: Size of WordPress persistent volume (default: 5Gi)
WORDPRESS_OAUTH2_SECRET
: OAuth2 secret key (auto-generated)WORDPRESS_OAUTH2_KEY_SSO
: OAuth2 client ID (auto-generated)WORDPRESS_OAUTH2_KEY_SSO_DEV
: OAuth2 development client ID (auto-generated)
We welcome all contributions! Feel free to open a Pull Request or an Issue.
This software is licensed under the terms of the AGPLv3.