@@ -10,28 +10,23 @@ WordPress Plugin for `Tutor`_
10
10
:target: https://www.gnu.org/licenses/agpl-3.0.en.html
11
11
12
12
Overview
13
- --------
13
+ ********
14
14
15
- This is a `Tutor `_ plugin for integrating the `Open edX Commerce WordPress Plugin `_ with your Open edX instance.
16
- The plugin allows seamless synchronization and interaction between your WordPress site and Open edX platform,
17
- providing a cohesive e-commerce experience. If you don't know how to install the WordPress plugin, check out
18
- this `installation guide `_.
15
+ This is a `Tutor `_ plugin that provides complete WordPress integration with your Open edX instance. It includes:
19
16
20
- Before you start
21
- ----------------
17
+ - Full WordPress installation and management
18
+ - Integration with the ` Open edX Commerce WordPress Plugin `_
22
19
23
- This plugin does **not ** create or manage a WordPress instance at the moment. It is designed to assist with the
24
- configuration and integration of the Open edX platform with an existing WordPress site. If you need this feature,
25
- feel free to open an issue or better yet, a PR.
20
+ If you need help installing the WordPress plugin, check out this `installation guide `_.
26
21
27
22
Prerequisites
28
- -------------
23
+ *************
29
24
30
- - A running WordPress site with the ` Open edX Commerce WordPress Plugin `_ installed.
31
- - Installation of Tutor version >= 15.0.0.
25
+ - Installation of Tutor version >= 15.0.0
26
+ - MySQL database (can use the same one as Open edX)
32
27
33
28
Installation
34
- ------------
29
+ ************
35
30
36
31
Ensure you are using Tutor v15+ (Olive onwards). First, install the plugin by running:
37
32
@@ -51,59 +46,96 @@ Alternatively, if you already have a running Open edX instance, just run the nec
51
46
.. code-block :: bash
52
47
53
48
tutor dev| local| k8s do init --limit=wordpress
49
+ tutor dev| local| k8s start wordpress
54
50
55
51
Configuration
56
- -------------
52
+ *************
57
53
58
- Inside your WordPress admin panel, you will need to configure the following values:
54
+ The plugin automatically installs WordPress with the Open edX Commerce and Woocommerce plugins. Inside your WordPress
55
+ admin panel, go to Settings -> Open edX Sync plugin, and configure:
59
56
60
57
- **Open edX Domain **
61
58
- **Client ID **
62
59
- **Client Secret **
63
60
61
+ To verify the connection, click on "Generate JWT Token". If the process is successful, a new token will be generated.
62
+
64
63
.. image :: https://raw.githubusercontent.com/codewithemad/tutor-contrib-wordpress/master/images/openedx-sync-plugin-settings.png
65
64
:alt: Open edX Sync Plugin Settings in your WordPress Settings
66
65
67
-
68
66
You can retrieve these configuration values by running:
69
67
70
68
.. code-block :: bash
71
69
72
- tutor wordpress config
70
+ tutor dev | local | k8s do wordpress config
73
71
72
+ This command will output the current configurations, including the Client ID, Client Secret, Open edX Domain,
73
+ and WordPress Domain. Here is an example of the output:
74
74
75
75
.. code-block :: text
76
76
77
77
===============================================
78
- WordPress Plugin Configurations
78
+ WordPress Plugin Configurations
79
79
===============================================
80
80
81
- Open edX Domain: http://local.edly.io
82
- Client ID: qjCayDktffXrU09N17NrslKyWQ2EwzWn
83
- Client ID (dev): JDx6Uy0hN67VUfacxKcLyYQz7HK9liVx
84
- Client Secret: P4w82huaZQdyz4qolknsIHYneGEoIggc
81
+ Client ID: vvpTamiepPwjZhr0uOQGr5PhYBzp2hQw
82
+ Client ID (dev): MlbXk1V3wB7nWPAAyLF3McyfBBMqExa4
83
+ Client Secret: MdrgbtU8Q94He3gejF6Zf5MDookoeozO
85
84
85
+ Open edX Domain: http://local.edly.io:8000
86
+ Wordpress Domain: http://site.local.edly.io:8080
86
87
87
- Or by using Tutor to print them individually:
88
+ Variables
89
+ *********
88
90
89
- .. code-block :: bash
91
+ The plugin supports the following configuration variables:
92
+
93
+ - ``WORDPRESS_VERSION ``: Plugin version
94
+ - ``WORDPRESS_HOST ``: WordPress site hostname
95
+ - ``WORDPRESS_PORT ``: WordPress port (default: 8080)
96
+ - ``WORDPRESS_DEBUG ``: Enable WordPress debug mode (default: false)
97
+ - ``WORDPRESS_DOCKER_IMAGE ``: Docker image for WordPress
98
+ - ``WORDPRESS_OPENEDX_PLUGIN ``: URL to the Open edX Commerce plugin
99
+ - ``WORDPRESS_WOOCOMMERCE_PLUGIN ``: (default: "https://downloads.wordpress.org/plugin/woocommerce.9.4.2.zip")
100
+ The WooCommerce plugin zip file URL. You can specify a different version if needed.
101
+ - ``WORDPRESS_OFFICIAL_IMAGE ``: (default: "wordpress:6.7.1-php8.1")
102
+ The official WordPress Docker image used as the base for building the plugin's custom image.
103
+ This image includes PHP and Apache server. You can specify a different version or PHP variant
104
+ if needed.
105
+
106
+ Database Settings
107
+ =================
108
+
109
+ - ``WORDPRESS_MYSQL_HOST ``: MySQL host
110
+ - ``WORDPRESS_MYSQL_PORT ``: MySQL port
111
+ - ``WORDPRESS_MYSQL_DATABASE ``: Database name (default: wordpress)
112
+ - ``WORDPRESS_MYSQL_USERNAME ``: Database username
113
+ - ``WORDPRESS_MYSQL_PASSWORD ``: Database password (auto-generated)
114
+ - ``WORDPRESS_TABLE_PREFIX ``: Table prefix (default: wp _)
90
115
91
- tutor config printvalue LMS_HOST
92
- tutor config printvalue WORDPRESS_OAUTH2_SECRET
93
- tutor config printvalue WORDPRESS_OAUTH2_KEY_SSO
94
- tutor config printvalue WORDPRESS_OAUTH2_KEY_SSO_DEV
116
+ Storage Settings
117
+ ================
118
+
119
+ - ``WORDPRESS_DATA_VOLUME_SIZE ``: Size of WordPress persistent volume (default: 5Gi)
120
+
121
+ OAuth2 Settings
122
+ ===============
123
+
124
+ - ``WORDPRESS_OAUTH2_SECRET ``: OAuth2 secret key (auto-generated)
125
+ - ``WORDPRESS_OAUTH2_KEY_SSO ``: OAuth2 client ID (auto-generated)
126
+ - ``WORDPRESS_OAUTH2_KEY_SSO_DEV ``: OAuth2 development client ID (auto-generated)
95
127
96
128
Contributing
97
- ------------
129
+ ************
98
130
99
- We welcome all contributions! Feel free to open a Pull Request.
131
+ We welcome all contributions! Feel free to open a Pull Request or an Issue .
100
132
101
133
License
102
- -------
134
+ *******
103
135
104
136
This software is licensed under the terms of the `AGPLv3 `_.
105
137
106
138
.. _Tutor : https://docs.tutor.edly.io
107
- .. _installation guide : https://docs.openedx.org/projects/wordpress-ecommerce-plugin/en/latest/plugin_quickstart.html
108
139
.. _Open edX Commerce WordPress Plugin : https://github.com/openedx/openedx-wordpress-ecommerce
109
140
.. _AGPLv3 : https://github.com/codewithemad/tutor-contrib-wordpress/blob/master/LICENSE.txt
141
+ .. _installation guide : https://docs.openedx.org/projects/wordpress-ecommerce-plugin/en/latest/plugin_quickstart.html
0 commit comments