@@ -10,12 +10,15 @@ WordPress Plugin for `Tutor`_
1010 :target: https://www.gnu.org/licenses/agpl-3.0.en.html
1111
1212Overview
13- --------
13+ ********
1414
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:
16+
17+ - Full WordPress installation and management
18+ - Integration with the `Open edX Commerce WordPress Plugin `_
19+ - Built-in phpMyAdmin for database management (optional)
20+
21+ If you need help installing the WordPress plugin, check out this `installation guide `_.
1922
2023Before you start
2124----------------
@@ -25,13 +28,13 @@ configuration and integration of the Open edX platform with an existing WordPres
2528feel free to open an issue or better yet, a PR.
2629
2730Prerequisites
28- -------------
31+ *************
2932
30- - A running WordPress site with the ` Open edX Commerce WordPress Plugin `_ installed.
31- - Installation of Tutor version >= 15.0.0.
33+ - Installation of Tutor version >= 15.0.0
34+ - MySQL database (can use the same one as Open edX)
3235
3336Installation
34- ------------
37+ ************
3538
3639Ensure you are using Tutor v15+ (Olive onwards). First, install the plugin by running:
3740
@@ -51,55 +54,132 @@ Alternatively, if you already have a running Open edX instance, just run the nec
5154.. code-block :: bash
5255
5356 tutor dev| local| k8s do init --limit=wordpress
57+ tutor dev| local| k8s start wordpress
58+
59+ phpMyAdmin
60+ **********
61+
62+ The plugin includes optional phpMyAdmin support for managing your WordPress database. To enable it:
63+
64+ 1. Set ``RUN_PHPMYADMIN: true `` in your ``config.yml `` by running:
65+
66+ .. code-block :: bash
67+
68+ tutor config save -s RUN_PHPMYADMIN=true
69+
70+ 2. Start phpMyAdmin by running:
71+
72+ .. code-block :: bash
73+
74+ tutor dev| local| k8s launch
75+ # or
76+ tutor dev| local| k8s start phpmyadmin
77+
78+ 3. Access phpMyAdmin at: http://phpmyadmin.local.edly.io:8081 (local) or https://phpmyadmin.yourdomain.com (production)
79+
80+ **Important **
5481
55- Configuration
56- -------------
82+ Enabling phpMyAdmin can be useful for managing your WordPress database directly. However, please be aware that exposing
83+ phpMyAdmin can pose security risks if not properly secured. Ensure that you have strong passwords, and consider
84+ restricting access to phpMyAdmin to trusted IP addresses only.
5785
58- Inside your WordPress admin panel, you will need to configure the following values:
86+ WordPress Configuration
87+ ***********************
88+
89+ The plugin automatically installs WordPress with the Open edX Commerce and Woocommerce plugins. Inside your WordPress
90+ admin panel, go to Settings -> Open edX Sync plugin, and configure:
5991
6092- **Open edX Domain **
6193- **Client ID **
6294- **Client Secret **
6395
96+ To verify the connection, click on "Generate JWT Token". If the process is successful, a new token will be generated.
97+
6498.. image :: https://raw.githubusercontent.com/codewithemad/tutor-contrib-wordpress/master/images/openedx-sync-plugin-settings.png
6599 :alt: Open edX Sync Plugin Settings in your WordPress Settings
66100
67-
68101You can retrieve these configuration values by running:
69102
70103.. code-block :: bash
71104
72105 tutor wordpress config
73106
107+ This command will output the current configurations, including the Client ID, Client Secret, Open edX Domain,
108+ WordPress Domain, and phpMyAdmin Domain (if enabled). Here is an example of the output:
74109
75110.. code-block :: text
76111
77112 ===============================================
78- WordPress Plugin Configurations
113+ WordPress Plugin Configurations
79114 ===============================================
80115
81- Open edX Domain: http://local.edly.io
82- Client ID: qjCayDktffXrU09N17NrslKyWQ2EwzWn
83- Client ID (dev): JDx6Uy0hN67VUfacxKcLyYQz7HK9liVx
84- Client Secret: P4w82huaZQdyz4qolknsIHYneGEoIggc
116+ Client ID: vvpTamiepPwjZhr0uOQGr5PhYBzp2hQw
117+ Client ID (dev): MlbXk1V3wB7nWPAAyLF3McyfBBMqExa4
118+ Client Secret: MdrgbtU8Q94He3gejF6Zf5MDookoeozO
85119
120+ Open edX Domain: http://local.edly.io:8000
121+ Wordpress Domain: http://site.local.edly.io:8080
122+ phpMyAdmin Domain: http://phpmyadmin.local.edly.io:8081
86123
87- Or by using Tutor to print them individually:
88124
89- .. code-block :: bash
125+ Configuration Variables
126+ ***********************
127+
128+ The plugin supports the following configuration variables:
129+
130+ WordPress Settings
131+ ==================
132+
133+ - ``WORDPRESS_VERSION ``: Plugin version
134+ - ``WORDPRESS_HOST ``: WordPress site hostname
135+ - ``WORDPRESS_PORT ``: WordPress port (default: 8080)
136+ - ``WORDPRESS_DEBUG ``: Enable WordPress debug mode (default: false)
137+ - ``WORDPRESS_DOCKER_IMAGE ``: Docker image for WordPress
138+ - ``WORDPRESS_OPENEDX_PLUGIN ``: URL to the Open edX Commerce plugin
139+ - ``WORDPRESS_WOOCOMMERCE_PLUGIN ``: (default: "https://downloads.wordpress.org/plugin/woocommerce.9.4.2.zip")
140+ The WooCommerce plugin zip file URL. You can specify a different version if needed.
141+ - ``WORDPRESS_OFFICIAL_IMAGE ``: (default: "wordpress:6.7.1-php8.1")
142+ The official WordPress Docker image used as the base for building the plugin's custom image.
143+ This image includes PHP and Apache server. You can specify a different version or PHP variant
144+ if needed.
145+
146+ Database Settings
147+ =================
148+
149+ - ``WORDPRESS_MYSQL_HOST ``: MySQL host
150+ - ``WORDPRESS_MYSQL_PORT ``: MySQL port
151+ - ``WORDPRESS_MYSQL_DATABASE ``: Database name (default: wordpress)
152+ - ``WORDPRESS_MYSQL_USERNAME ``: Database username
153+ - ``WORDPRESS_MYSQL_PASSWORD ``: Database password (auto-generated)
154+ - ``WORDPRESS_TABLE_PREFIX ``: Table prefix (default: wp _)
155+
156+ Storage Settings
157+ ================
158+
159+ - ``WORDPRESS_DATA_VOLUME_SIZE ``: Size of WordPress persistent volume (default: 5Gi)
160+
161+ OAuth2 Settings
162+ ===============
163+
164+ - ``WORDPRESS_OAUTH2_SECRET ``: OAuth2 secret key (auto-generated)
165+ - ``WORDPRESS_OAUTH2_KEY_SSO ``: OAuth2 client ID (auto-generated)
166+ - ``WORDPRESS_OAUTH2_KEY_SSO_DEV ``: OAuth2 development client ID (auto-generated)
167+
168+ phpMyAdmin Settings
169+ ===================
90170
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
171+ - `` RUN_PHPMYADMIN ``: Enable/disable phpMyAdmin (default: false)
172+ - `` PHPMYADMIN_HOST ``: phpMyAdmin hostname
173+ - `` PHPMYADMIN_PORT ``: phpMyAdmin port (default: 8081)
174+ - `` PHPMYADMIN_DOCKER_IMAGE ``: Docker image for phpMyAdmin
95175
96176Contributing
97- ------------
177+ ************
98178
99- We welcome all contributions! Feel free to open a Pull Request.
179+ We welcome all contributions! Feel free to open a Pull Request or an Issue .
100180
101181License
102- -------
182+ *******
103183
104184This software is licensed under the terms of the `AGPLv3 `_.
105185
0 commit comments